-
Notifications
You must be signed in to change notification settings - Fork 10
[RW-7893][no risk]lock workspace test #6326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmthibault79 @aweng98 Please review, Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmthibault79 the test steps at line 69-70 have been updated since this file has been refactored: workspace-base.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for the tab-selection problem ... I'll wait for you to work that out
}); | ||
|
||
// function to create cohort, dataset and notebook | ||
async function createDatasetNotebook(page: Page, pyNotebookName: string): Promise<NotebookPreviewPage> { |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update the requested changes as soon as #6342 is merged. Thanks!
}); | ||
|
||
// function to create cohort, dataset and notebook | ||
async function createDatasetNotebook(page: Page, pyNotebookName: string): Promise<NotebookPreviewPage> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review suggestion have been incorporated and with partial test steps I've been able to run the test successfully. But I would like to merge only when the createWorkspace issue is resolved. Please let me know if that works for both of you. Thanks!
export async function createDatasetNotebook(page: Page, pyNotebookName: string): Promise<NotebookPreviewPage> { | ||
await findOrCreateDataset(page, { openEditPage: true }); | ||
|
||
const datasetBuildPage = new DatasetBuildPage(page); | ||
const exportModal = await datasetBuildPage.clickAnalyzeButton(); | ||
|
||
await exportModal.enterNotebookName(pyNotebookName); | ||
await exportModal.pickLanguage(Language.Python); | ||
await exportModal.clickExportButton(); | ||
const notebookPreviewPage = new NotebookPreviewPage(page); | ||
return await notebookPreviewPage.waitForLoad(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aweng98 function moved from the lock-workspace and workspace-admin test file.
const selected = await getPropValue<string>(element, 'ariaSelected'); | ||
return selected !== undefined | ||
? selected === 'true' | ||
: (await getStyleValue<string>(this.page, element, 'border-bottom')) !== null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmthibault79 tab file updated with the help of Alex, it gets the aria-selected status. Now the tab-status verification works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
e2e/app/page/workspace-about-page.ts
Outdated
async getLockedWorkspaceReason(): Promise<string> { | ||
const xpath = '//*[@data-test-id="lock-workspace-msg"]//child::div[2]/div[1]/b'; | ||
const element = BaseElement.asBaseElement(this.page, await this.page.waitForXPath(xpath, { visible: true })); | ||
const textContent = element.getTextContent(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a await
.
TEST GOAL
Verify if lock workspace feature works as expected.
PR checklist
yarn test-local
or yarn test-local-devup