-
Notifications
You must be signed in to change notification settings - Fork 34
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
[WD-11114] Feat: Improving tests by using text assertion #789
Conversation
Observations from WD-11114:
|
9b07be7
to
00b264e
Compare
Did you run the 5.0-edge tests against a LXD backend from the
The cluster test relies on the clustering to be enabled. But be careful to enable it on your local host, it might block LXD on your machine in case the external ip changes -- which is not an expected behaviour for a cluster. |
I'm not sure what this means. Are you referring to the different Playwright projects / browsers that the tests can be performed on? If so, yes. |
a7646c7
to
01a68c4
Compare
The playwright tests for 5.0-edge are meant to run against a LXD backend with version 5.0 from the edge channel. If you run that test suite against a LXD version latest/stable or alike they will fail. You can check with I'd suggest to setup lxd inside a container or vm with various version (i.e. 1 container for 5.0 with |
- Renamed assertModificationStatus to assertTextValue and replaced instances of the former. - Reviewed all usages of "getByText()" in /lxd-ui/tests/ and replaced with assertTextValue where appropriate. - Rewrote the function to conditionally account for getByText instances where an Exact match was required. Signed-off-by: Nkeiruka <nkeiruka.whenu@canonical.com>
01a68c4
to
203611c
Compare
await page.locator(".view-lines").click(); | ||
await page.keyboard.press("PageDown"); | ||
await page.keyboard.press("PageDown"); | ||
await page.keyboard.press("PageDown"); |
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.
why was this removed?
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 test wasn't running with them in. The item that needed to be viewed was not visible after 3 pagedown clicks.
Looks good, thanks for doing this! 👍 Just one small clarification from my side. |
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, thanks for improving the tests!
Done
assertModificationStatus
toassertTextVisible
and replaced instances of the former.QA
Screenshots
N/A