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

PP-12395: Cypress test for API keys landing page #4392

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

oswaldquek
Copy link
Contributor

Cypress tests for #4385

@oswaldquek oswaldquek marked this pull request as ready for review December 18, 2024 15:38
@oswaldquek oswaldquek force-pushed the PP-12395-api-keys-landing-page-cypress-test branch from 637221f to d0dc26b Compare December 18, 2024 15:41
Comment on lines +68 to +80
cy.get('#api-keys').should('have.text', 'API keys')
cy.get('.service-settings-pane')
.find('a')
.contains('Create a new API key')
.should('exist')
cy.get('.service-settings-pane')
.find('h2')
.contains('Active test API keys (2)')
.should('exist')
cy.get('.service-settings-pane')
.find('a')
.contains('Show revoked API keys')
.should('exist')
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably test for more than just these bits of text - it should test that the summary cards are shown with the correct content - this could be in a separate test though to aid readability

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call - test added

Comment on lines +108 to +109
verifySummaryCard(0, apiKeys[0])
verifySummaryCard(1, apiKeys[1])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is one line less than a for-loop so don't ask me to use a for-loop 😂

Copy link
Contributor

@DomBelcher DomBelcher left a comment

Choose a reason for hiding this comment

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

Nice work

@oswaldquek oswaldquek merged commit c9643af into master Dec 19, 2024
14 checks passed
@oswaldquek oswaldquek deleted the PP-12395-api-keys-landing-page-cypress-test branch December 19, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants