Refactor profile page (#1636)

This commit is contained in:
Erik Michelson 2021-12-02 23:03:03 +01:00 committed by GitHub
parent 394b8bd199
commit f1117dbad3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 765 additions and 339 deletions

View file

@ -15,7 +15,10 @@ describe('profile page', () => {
body: [
{
label: 'cypress-App',
created: 1601991518
keyId: 'cypress',
createdAt: '2021-11-21T01:11:12+01:00',
lastUsed: '2021-11-21T01:11:12+01:00',
validUntil: '2023-11-21'
}
]
}
@ -28,14 +31,17 @@ describe('profile page', () => {
{
body: {
label: 'cypress',
keyId: 'cypress2',
secret: 'c-y-p-r-e-s-s',
created: Date.now()
createdAt: '2021-11-21T01:11:12+01:00',
lastUsed: '2021-11-21T01:11:12+01:00',
validUntil: '2023-11-21'
}
}
)
cy.intercept(
{
url: '/mock-backend/api/private/tokens/1601991518',
url: '/mock-backend/api/private/tokens/cypress',
method: 'DELETE'
},
{
@ -59,7 +65,7 @@ describe('profile page', () => {
it('add token', () => {
cy.getById('access-token-add-button').should('be.disabled')
cy.getById('access-token-add-input').type('cypress')
cy.getById('access-token-add-input-label').type('cypress')
cy.getById('access-token-modal-add').should('not.exist')
cy.getById('access-token-add-button').should('not.be.disabled').click()
cy.getById('access-token-modal-add')