Skip to content

Commit

Permalink
fix: update warning msg [TDX-4640] (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
amerc15 authored Sep 27, 2024
1 parent df25f5d commit e9e1a23
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion cypress/e2e/specs/application_registration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/views/MyApps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
:title="searchStr ? helpText.noSearchResults : helpText.noApp"
>
<template #message>
<p>
<p v-if="hasAppAuthStrategies">
<router-link
data-testid="create-application-link"
:to="{
Expand Down

0 comments on commit e9e1a23

Please sign in to comment.