Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ryanrath
Copy link
Contributor

@ryanrath ryanrath commented Apr 8, 2025

Description

Motivation and Context

These minor changes were found while getting the playwright tests working for xdmod-supremm.

Tests performed

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

These minor changes were found while getting the playwright tests
working for xdmod-supremm.
@ryanrath ryanrath added maintenance / code quality Improvements and code cleanup. Not a new feature or enhancement to existing functionality. autodoc:ignore Auto documentation ignore this PR Category:Infrastructure Internal infrastructure updates/changes labels Apr 8, 2025
@ryanrath ryanrath added this to the 11.5.0 milestone Apr 8, 2025
@@ -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) {
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

image

Copy link
Member

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.

Copy link
Contributor Author

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();
Copy link
Member

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?

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autodoc:ignore Auto documentation ignore this PR Category:Infrastructure Internal infrastructure updates/changes maintenance / code quality Improvements and code cleanup. Not a new feature or enhancement to existing functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants