mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixing workspaces adding/editing (#1405)
* Fix creating new workspace Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Show not yet enabled workspaces in list Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Not showing disabled workspaces Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
7489e5ff7b
commit
6fd0bebdd6
3 files changed
+23
-16
No files matched your search
@@ -38,15 +38,18 @@ describe("workspace store tests", () => {
|
||||
expect(() => ws.removeWorkspaceById(WorkspaceStore.defaultId)).toThrowError("Cannot remove");
|
||||
})
|
||||
|
||||
it("can update default workspace name", () => {
|
||||
it("can update workspace description", () => {
|
||||
const ws = WorkspaceStore.getInstance<WorkspaceStore>();
|
||||
|
||||
ws.addWorkspace(new Workspace({
|
||||
id: WorkspaceStore.defaultId,
|
||||
const workspace = ws.addWorkspace(new Workspace({
|
||||
id: "foobar",
|
||||
name: "foobar",
|
||||
}));
|
||||
|
||||
expect(ws.currentWorkspace.name).toBe("foobar");
|
||||
workspace.description = "Foobar description";
|
||||
ws.updateWorkspace(workspace);
|
||||
|
||||
expect(ws.getById("foobar").description).toBe("Foobar description");
|
||||
})
|
||||
|
||||
it("can add workspaces", () => {
|
||||
|
||||
Reference in new issue
Block a user