diff --git a/cypress/e2e/specs/application_registration.spec.ts b/cypress/e2e/specs/application_registration.spec.ts index 3b84ff65..a46585e8 100644 --- a/cypress/e2e/specs/application_registration.spec.ts +++ b/cypress/e2e/specs/application_registration.spec.ts @@ -127,12 +127,25 @@ describe('Application Registration', () => { cy.visit('/my-apps') cy.get('[data-testid="create-application-button"]').should('exist') - cy.get('[data-testid="create-application-link"]').should('exist') + cy.get('[data-testid="create-application-link"]').should('not.exist') cy.get('[data-testid="empty-state-card"]') .should('exist') .should('contain', 'No Applications') }) + it('displays empty dashboard with enabled buttons', () => { + cy.mockApplications([], 0) + cy.mockApplicationAuthStrategies([{ name: 'foo', id: '1', credential_type: 'client_credentials', auth_methods: ['session', 'bearer'] }], 0) + + cy.visit('/my-apps') + + cy.get('[data-testid="create-application-button"]').should('exist') + cy.get('[data-testid="create-application-link"]').should('exist') + cy.get('[data-testid="empty-state-card"]') + .should('exist') + .should('contain', 'No Applications') + }) + it('can return to My Apps from application details via breadcrumb', () => { cy.mockDeveloperRefresh() cy.mockApplications(apps, 4) diff --git a/src/locales/en.ts b/src/locales/en.ts index 2587b67d..8099e7ed 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -299,7 +299,7 @@ export const en = { logoAlt: 'logo' }, myApp: { - authStrategyWarning: 'You cannot create an application as this developer portal has no available application auth strategies. Please contact a developer portal admin.', + authStrategyWarning: 'There are no APIs that require authentication published to this portal. Application creation is disabled.', authStrategyFetchError: (errString: string) => `Error fetching auth strategies: ${errString}`, newApp: 'New App', plus: 'Plus', diff --git a/src/views/MyApps.vue b/src/views/MyApps.vue index 065f53af..22bdcf2f 100644 --- a/src/views/MyApps.vue +++ b/src/views/MyApps.vue @@ -144,7 +144,7 @@ :title="searchStr ? helpText.noSearchResults : helpText.noApp" >