Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e9e6537
lock-workspace test case
chavanr2019 Feb 14, 2022
6e6fe82
functions to verfiy the locked-workspace card
chavanr2019 Feb 14, 2022
f9db396
function to click tje lock-workspace button
chavanr2019 Feb 14, 2022
0f3d3ad
created a generic getLockworkspaceButton function
chavanr2019 Feb 14, 2022
50e42b7
created new functions to verify the about-page of the locked workspace
chavanr2019 Feb 14, 2022
224b86d
workspaceActionMenuOptions for locked-workspace
chavanr2019 Feb 14, 2022
7d3395d
added 'Edit' to page title
chavanr2019 Feb 14, 2022
e8d348a
updated the Notebook name
chavanr2019 Feb 14, 2022
f073e0e
resolved conflict
chavanr2019 Feb 14, 2022
c780b0b
lint fixes
chavanr2019 Feb 14, 2022
8b68d09
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 15, 2022
9221b4a
have to refactor the code for these steps to work
chavanr2019 Feb 15, 2022
480d104
clickLockWorkpsace function is refactored
chavanr2019 Feb 15, 2022
b59b8e6
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 15, 2022
c19aa0e
refactored the opening- tabs steps
chavanr2019 Feb 15, 2022
918b44e
lint fixes
chavanr2019 Feb 15, 2022
3b39933
funation to getAttribute of the tabs
chavanr2019 Feb 16, 2022
73814ad
refactored steps to verify the tabs state
chavanr2019 Feb 16, 2022
426b0cf
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 16, 2022
148ed4e
removed the commented code
chavanr2019 Feb 16, 2022
4993153
function to verify the tabs state
chavanr2019 Feb 16, 2022
de5844e
added comments and refactored steps
chavanr2019 Feb 16, 2022
570a619
refactored steps
chavanr2019 Feb 16, 2022
df1ecc7
lint-fixes
chavanr2019 Feb 16, 2022
369743c
lint-fixes
chavanr2019 Feb 16, 2022
f7e4bca
function to getTabState
chavanr2019 Feb 17, 2022
2f09258
tab state verification steps
chavanr2019 Feb 17, 2022
8d6f4c8
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 17, 2022
dd556f0
lint-fixes
chavanr2019 Feb 17, 2022
459ea9e
this.page
chavanr2019 Feb 17, 2022
14aee44
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 17, 2022
171ad37
refactored the function to get the tab state
chavanr2019 Feb 18, 2022
a326922
added step to cancel edit an delete workspace to clean up
chavanr2019 Feb 18, 2022
8fc22d5
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 18, 2022
ed3bf1b
lint-fixes
chavanr2019 Feb 18, 2022
185115d
removed not needed wiatForLoad()
chavanr2019 Feb 18, 2022
48b3447
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 18, 2022
7ae8446
resolved conflicts
chavanr2019 Feb 21, 2022
6236800
refactored createDatasetNotebook function
chavanr2019 Feb 22, 2022
4d1fca4
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 22, 2022
38c2c81
lint-fixes
chavanr2019 Feb 22, 2022
fb575f9
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 22, 2022
594aa27
workspaceStatus
chavanr2019 Feb 22, 2022
f8ee989
lint-fixes
chavanr2019 Feb 22, 2022
72a0c5b
moved the createDatasetNotebook function in test-utils file
chavanr2019 Feb 23, 2022
6b14e36
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 23, 2022
2b99fed
lint-fixes
chavanr2019 Feb 23, 2022
040960f
missing await
chavanr2019 Feb 24, 2022
b599dd0
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Feb 24, 2022
b9629c0
resolved conflict
chavanr2019 Mar 1, 2022
3a44669
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Mar 2, 2022
55ace3b
Merge branch 'main' into chavanr/lock-workspace-test
chavanr2019 Mar 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added step to cancel edit an delete workspace to clean up
  • Loading branch information
chavanr2019 committed Feb 18, 2022
commit a3269224e19c2e67a6b698bbcac0e5f384f7c6c6
9 changes: 9 additions & 0 deletions e2e/app/page/workspace-edit-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import WorkspaceBase, { UseFreeCredits } from './workspace-base';
import { config } from 'resources/workbench-config';
import BaseElement from 'app/element/base-element';
import { makeWorkspaceName } from 'utils/str-utils';
import WorkspaceDataPage from './workspace-data-page';

const faker = require('faker/locale/en_US');

Expand Down Expand Up @@ -503,4 +504,12 @@ export default class WorkspaceEditPage extends WorkspaceBase {
await this.requestForReviewRadiobutton(false);
return workspaceName;
}

// click cancel button on edit page and navigate to dataPage
async clickCancelButton(): Promise<WorkspaceDataPage> {
const button = this.getCancelButton();
await button.click();
const dataPage = new WorkspaceDataPage(this.page);
return dataPage;
}
}
10 changes: 7 additions & 3 deletions e2e/tests/nightly/admin/lock-workspace.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import WorkspaceEditPage from 'app/page/workspace-edit-page';
import { MenuOption } from 'app/text-labels';
import WorkspaceAnalysisPage from 'app/page/workspace-analysis-page';


describe('Workspace Admin lock-workspace', () => {
const workspaceName = 'e2eLockWorkspace';
const reasonText = 'locking this workspace';
Expand All @@ -25,7 +26,7 @@ describe('Workspace Admin lock-workspace', () => {
await signInWithAccessToken(page, config.ADMIN_TEST_USER);
});

test.only('verify if workspace is locked', async () => {
test('verify if workspace is locked', async () => {
const workspacesPage = new WorkspacesPage(page);
await workspacesPage.load();
await workspacesPage.createWorkspace(workspaceName);
Expand Down Expand Up @@ -68,8 +69,7 @@ describe('Workspace Admin lock-workspace', () => {
// verify the lock icon is displaying for the locked workspace
const aboutLockedIcon = aboutPage.getAboutLockedWorkspaceIcon();
expect(aboutLockedIcon).toBeTruthy();
// expect(await aboutPage.getTabState(page, Tabs.Analysis)).toBe(false);
// expect(await aboutPage.getTabState(page, Tabs.Data)).toBe(false);

// verify DATA & ANALYSIS tabs are inactive for locked workspace
const analysisTab = await aboutPage.getTabState(Tabs.Analysis);
expect(analysisTab).toBe(false);
Expand Down Expand Up @@ -124,8 +124,12 @@ describe('Workspace Admin lock-workspace', () => {
await aboutPage.getAboutEditIcon();
const workspaceEdit = new WorkspaceEditPage(page);
await workspaceEdit.waitForLoad();
await workspaceEdit.clickCancelButton();
// cleanup
await dataPage.deleteWorkspace();
});

// function to create cohort, dataset and notebook
async function createDatasetNotebook(page: Page, pyNotebookName: string): Promise<NotebookPreviewPage> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is same as workspace-admin-ui.spec createDatasetNotebook(). I'm editing it in #6342. You can make this a common function in test-utils.ts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

const dataPage = new WorkspaceDataPage(page);
await dataPage.waitForLoad();
Expand Down