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: Change api key name #4399

Merged
merged 4 commits into from
Jan 2, 2025
Merged

Conversation

oswaldquek
Copy link
Contributor

Changing the name uses the same view as the "API key name" view in #4394

@oswaldquek oswaldquek force-pushed the PP-12395-change-api-key-name branch 3 times, most recently from cd93997 to f53d54c Compare December 31, 2024 15:04
@oswaldquek oswaldquek force-pushed the PP-12395-change-api-key-name branch from f53d54c to 92b9e56 Compare December 31, 2024 15:31
Copy link
Contributor

@james-peacock-gds james-peacock-gds left a comment

Choose a reason for hiding this comment

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

I've added one comment about the order of require statements.
Also:

  • I assume there will be a cypress test for the change key name in a subsequent PR?
  • The Figma says that the 'Add description for the key' label should no longer be shown on this page.

const { changeApiKeyName } = require('@services/api-keys.service')
const DESCRIPTION_VALIDATION = require('@controllers/simplified-account/settings/api-keys/validations')
const { validationResult } = require('express-validator')
const formatValidationErrors = require('@utils/simplified-account/format/format-validation-errors')
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 there is a convention to order these require statements to improve readability, with core modules first and destructured imports last.

cy.contains('button', 'Continue').click()
cy.contains('h1', 'Test API keys').should('exist')
cy.get('.govuk-summary-card').within(() => {
cy.contains('h2', 'mathematical clothes').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.

shouldn't this change to the new name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohh you're right. I'm not sure this test line is relevant because we're stubbing out the response here. I remember mentioning in one of your PRs cypress testing isn't testing the database layer. I think we just need to know upon changing the name, the controller redirects to the index page so I think I can get rid of this line.

Copy link
Contributor

@james-peacock-gds james-peacock-gds left a comment

Choose a reason for hiding this comment

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

LGTM

@oswaldquek oswaldquek merged commit ebdea77 into master Jan 2, 2025
14 checks passed
@oswaldquek oswaldquek deleted the PP-12395-change-api-key-name branch January 2, 2025 14:00
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.

3 participants