Skip to content
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

test: fix failing MAAS UI e2e tests #5198

Merged

Conversation

Jay-Topher
Copy link
Contributor

@Jay-Topher Jay-Topher commented Oct 17, 2023

Done

  • Add script to ensure successful image sync before test run
  • Update failing footer tests for legacy footer removal

QA steps

  • Ensure cypress CI runs succcessfully

Fixes

1967
Fixes:

@webteam-app
Copy link

Demo starting at https://maas-ui-5198.demos.haus

@petermakowski
Copy link
Contributor

@Jay-Topher Changes that are related to tests only are usually prefixed with test: per conventional commits convention https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type

@Jay-Topher Jay-Topher changed the title fix: maas UI e2e tests test: maas UI e2e tests Oct 17, 2023
Comment on lines 47 to 49
cy.get("button[type='submit']", { timeout: LONG_TIMEOUT })
.should("be.enabled")
.click();
Copy link
Contributor

Choose a reason for hiding this comment

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

As explained in the acceptance criteria, our goal here is to:

Wait for ephemeral OS to be available or provide a workaround allowing the test to pass when it’s unavailable

Generic timeout wait specific enough. I'd recommend to talk to someone from the MAAS core team, share a screenshot of the failing test where ephemeral message is visible and find if there are better ways of detecting this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, thanks I reach out to someone concerning this, this is not up for review yet, I created a draft PR as a sandbox to get Cypress test results.

@Jay-Topher Jay-Topher force-pushed the MAASENG-1967-fix-maas-ui-e2e-tests branch from 703df95 to b5cfe33 Compare October 24, 2023 09:12
@Jay-Topher Jay-Topher changed the title test: maas UI e2e tests test: fix failing MAAS UI e2e tests Oct 24, 2023
@Jay-Topher Jay-Topher marked this pull request as ready for review October 24, 2023 14:38
Copy link
Contributor

@petermakowski petermakowski left a comment

Choose a reason for hiding this comment

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

Glad you managed to figure this out! Let's clean this up a bit before we merge.

@@ -36,6 +36,7 @@ jobs:
run: |
export API_KEY=`sudo maas apikey --username=admin`
maas login admin http://localhost:5240/MAAS $API_KEY
while [ $(maas admin boot-resources is-importing | cat) == "true" ]; do sleep 10; done; echo "syncing finished"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think ideally it should be moved to a separate step (e.g. with a name "Wait for MAAS boot resources") which would help track its progress (and execution time).

@petermakowski petermakowski merged commit 74a3152 into canonical:main Oct 25, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants