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
Sanlouise 11683 add connected apps cypress #13634
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.
Still poking around locally to see if I can do anything to help make the mobile tests less flaky but here are a couple little thoughts.
); | ||
|
||
// Click on the disocnnect button of the first app | ||
cy.contains('Disconnect').click(); |
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.
Might be good to use cy.findByRole('button', {name: /disconnect apple health from your account/i})
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.
It's so weird that we don't need to force this click on mobile, too. I'm going to be happy when we figure out why the mobile menu trigger does not show up in time to "block" this click.
|
||
// Click in disconnect in the confirmation modal | ||
cy.findByRole('button', { name: 'Disconnect' }).click(); | ||
cy.findByText(/processing update.../i).should('exist'); |
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.
Totally a matter of taste, but you could do a cy.findByRole('button', { name: 'Disconnect' }).should('not.exist')
here to make sure the button you just clicked is gone.
src/applications/personalization/profile-2/tests/e2e/connectedApps.cypress.spec.js
Outdated
Show resolved
Hide resolved
src/applications/personalization/profile-2/tests/e2e/connectedApps.cypress.spec.js
Outdated
Show resolved
Hide resolved
33598df
to
0eaf72a
Compare
); | ||
|
||
// Click on the disocnnect button of the first app | ||
cy.contains('Disconnect').click(); |
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.
It's so weird that we don't need to force this click on mobile, too. I'm going to be happy when we figure out why the mobile menu trigger does not show up in time to "block" this click.
cd3ec80
to
5eb8f39
Compare
dee3513
to
4b429ea
Compare
@@ -0,0 +1,106 @@ | |||
import { PROFILE_PATHS } from '../../constants'; |
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.
nit: can you rename this file to profile.connected-apps.cypress.spec.js
to match the convention used by the other Cypress tests?
cy.viewport('iphone-4'); | ||
} | ||
|
||
cy.route({ |
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.
nit: maybe move these route mocks up top with the mock GET
?
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.
Way to persevere :) My only real request is to change the name of the test file.
cy.findByRole('progressbar').should('exist'); | ||
cy.findByText(/loading your information/i).should('exist'); | ||
cy.findByText(/loading your information/i).should('not.exist'); | ||
|
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.
could add a check that cy.findByRole('progressbar').should('not.exist')
here
Description
Add sufficient integration test coverage for connected apps.
Testing done
Works locally.
Screenshots
Acceptance criteria
Definition of done