-
Notifications
You must be signed in to change notification settings - Fork 69
Playwright updates for xdmod-supremm #2027
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
base: main
Are you sure you want to change the base?
Conversation
These minor changes were found while getting the playwright tests working for xdmod-supremm.
tests/playwright/lib/base.page.ts
Outdated
@@ -10,6 +11,9 @@ export class BasePage { | |||
this.page = page; | |||
this.maskSelector = '.ext-el-mask-msg'; | |||
this.mask = page.locator(this.maskSelector); | |||
if (baseUrl == undefined || baseUrl.length === 0) { |
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 type hinting says that baseUrl is a string - doesn't that mean it can't be undefined? I'm not 110% sure how the typescript type hinting functions
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.
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 like you could never make baseUrl undefined or null so that check is done by the compiler and you don't need to do it in code.
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.
Yup, I think I put this in as a precaution while developing. It'll be removed.
@@ -80,7 +80,6 @@ class MetricExplorer extends BasePage{ | |||
await this.page.click(this.newChart.modalDialog.ok()); | |||
await expect(this.page.locator(this.newChart.modalDialog.box)).toBeHidden(); | |||
await expect(this.page.locator(this.newChart.modalDialog.noDataMessage)).toBeVisible(); | |||
await expect(this.page.locator(this.mask)).toBeHidden(); |
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.
How come you removed this check?
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.
So I'm pretty sure I removed it because I misread it to be await this.page.locator(this.mask).isHidden();
which doesn't do anything. But it ends up that having it or not having it doesn't seem to affect whether or not tests that call this function pass.
Description
Motivation and Context
These minor changes were found while getting the playwright tests working for xdmod-supremm.
Tests performed
Checklist: