-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
cd93997
to
f53d54c
Compare
f53d54c
to
92b9e56
Compare
app/controllers/simplified-account/settings/api-keys/api-keys.controller.js
Show resolved
Hide resolved
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.
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') |
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.
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') |
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.
shouldn't this change to the new name?
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.
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.
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.
LGTM
Changing the name uses the same view as the "API key name" view in #4394