-
Notifications
You must be signed in to change notification settings - Fork 32
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
regression: UI #354
regression: UI #354
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.
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.
…or checking the support bundle download. Also added in custom commands for cy.verifyDownload and associated yarn and dependency stuff
@lanfon72 I added in a test case for downloading the support bundle. I think I got it working without a timeout triggering. I found a solution that involved running an event listener here. I added in comments in the code. Take a look when you get a chance and let me know if you have any questions or concerns. The solution is a little fragile, but I think it should probably work. The issue is that it has three overlapping timeouts that it balances between. |
@noahgildersleeve, I had tried this solution, but I thought it is not fit our test case. After discuss with my frontend friend, I think this commit 335a5b0 should more fit our case. |
.get("@generateBtn").click() | ||
// Verify that the download has completed | ||
.verifyDownload('supportbundle', {timeout: constants.timeout.downloadTimeout, contains: true}) | ||
.intercept('/v1/harvester/supportbundles*/download', (req) => { |
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 API not always be called, so I will not check it.
.intercept("/v1/harvester/*supportbundles/**/bundle*", req => | ||
req.continue(res => { | ||
cy.log(res.body.status) | ||
filename = res.body.status?.filename || undefined |
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 last response will contains support bundle's filename
@lanfon72 - I'm wondering if this is something we can also scaffold on the backend for our tests. I know for: harvester/harvester#2321 - the introduction of "fleet-agent-" and "fleet-controller-" as directories inside of "logs", that could be something we could check for since I believe the feature will be backported. |
@irishgordo yeah it is good if API's test can cover it too. |
This PR will cover all of UI regression test cases.
Changes:
cypress/cypress
, which automatically generated by cypress.cy.login()
readYaml
for checking yaml content.deleteFolder
anddeleteFile
.Limitation:
context
be treated asdescribe
, so there is no scope for sub-tests, everyit
will triggerbefore/beforeEach/after/afterEach
. (thus, merge sub test cases of links into single test case)Footnotes
https://github.com/cypress-io/cypress/issues/8619 ↩
https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/testing-dom__download/cypress/integration/form-submission-spec.js ↩