diff --git a/packages/manager/cypress/e2e/profile/add-oauth-app.spec.ts b/packages/manager/cypress/e2e/core/account/add-oauth-app.spec.ts similarity index 93% rename from packages/manager/cypress/e2e/profile/add-oauth-app.spec.ts rename to packages/manager/cypress/e2e/core/account/add-oauth-app.spec.ts index 92938795a59..4287cff44e2 100644 --- a/packages/manager/cypress/e2e/profile/add-oauth-app.spec.ts +++ b/packages/manager/cypress/e2e/core/account/add-oauth-app.spec.ts @@ -7,7 +7,7 @@ import { mockGetOAuthApps, } from 'support/intercepts/profile'; import { ui } from 'support/ui'; -import { randomLabel } from 'support/util/random'; +import { randomLabel, randomSecret } from 'support/util/random'; import { OAuthClient } from '@linode/api-v4/types'; /** @@ -104,6 +104,10 @@ const createOAuthApp = (oauthApp: OAuthClient) => { .findByTitle('Client Secret') .should('be.visible') .within(() => { + cy.get('input[id="client-secret"]') + .should('be.visible') + .should('have.value', oauthApp.secret); + ui.button .findByTitle('I Have Saved My Client Secret') .should('be.visible') @@ -127,9 +131,11 @@ describe('Add OAuth Apps', () => { const oauthApps = oauthClientFactory.buildList(2); const privateOauthApp = oauthApps[0]; privateOauthApp.label = randomLabel(5); + privateOauthApp.secret = randomSecret(64); const publicOauthApp = oauthApps[1]; publicOauthApp.label = randomLabel(5); publicOauthApp.public = true; + publicOauthApp.secret = randomSecret(64); interceptGetProfile().as('getProfile'); cy.visitWithLogin('/profile/clients'); @@ -145,8 +151,7 @@ describe('Add OAuth Apps', () => { interceptGetProfile().as('getProfile'); mockGetOAuthApps(oauthApps).as('getOAuthApps'); cy.visitWithLogin('/profile/clients'); - cy.wait('@getProfile'); - cy.wait('@getOAuthApps'); + cy.wait(['@getProfile', '@getOAuthApps']); cy.findByText(privateOauthApp.label) .closest('tr') .within(() => { diff --git a/packages/manager/cypress/e2e/profile/delete-oauth-app.spec.ts b/packages/manager/cypress/e2e/core/account/delete-oauth-app.spec.ts similarity index 100% rename from packages/manager/cypress/e2e/profile/delete-oauth-app.spec.ts rename to packages/manager/cypress/e2e/core/account/delete-oauth-app.spec.ts diff --git a/packages/manager/cypress/e2e/profile/edit-oauth-app.spec.ts b/packages/manager/cypress/e2e/core/account/edit-oauth-app.spec.ts similarity index 100% rename from packages/manager/cypress/e2e/profile/edit-oauth-app.spec.ts rename to packages/manager/cypress/e2e/core/account/edit-oauth-app.spec.ts diff --git a/packages/manager/cypress/e2e/profile/reset-oauth-app.spec.ts b/packages/manager/cypress/e2e/core/account/reset-oauth-app.spec.ts similarity index 100% rename from packages/manager/cypress/e2e/profile/reset-oauth-app.spec.ts rename to packages/manager/cypress/e2e/core/account/reset-oauth-app.spec.ts diff --git a/packages/manager/cypress/support/api/profile.ts b/packages/manager/cypress/support/api/profile.ts index d494897e0ab..3c54d0dbd74 100644 --- a/packages/manager/cypress/support/api/profile.ts +++ b/packages/manager/cypress/support/api/profile.ts @@ -17,8 +17,6 @@ export const deleteAllTestOAuthApps = async (): Promise => { getOAuthClients({ page_size: pageSize, page }) ); - console.log(`oauth apps: ${JSON.stringify(oauthApps)}`); - const deletionPromises = oauthApps .filter((oauthApp: OAuthClient) => isTestLabel(oauthApp.label)) .map(async (oauthApp: OAuthClient) => { diff --git a/packages/manager/src/factories/accountOAuth.ts b/packages/manager/src/factories/accountOAuth.ts index a2f5a49712f..d7b9f8ff4b9 100644 --- a/packages/manager/src/factories/accountOAuth.ts +++ b/packages/manager/src/factories/accountOAuth.ts @@ -8,5 +8,5 @@ export const oauthClientFactory = Factory.Sync.makeFactory({ redirect_uri: 'http://localhost:3000/api/auth/callback/linode', status: 'active', thumbnail_url: null, - secret: Factory.each((id) => `1a2b3c4d5e6f0123456789abcdef${id}`), + secret: '', });