diff --git a/cypress/e2e/specs/spec_renderer.spec.ts b/cypress/e2e/specs/spec_renderer.spec.ts index 2b401fcc..b47f2bd1 100644 --- a/cypress/e2e/specs/spec_renderer.spec.ts +++ b/cypress/e2e/specs/spec_renderer.spec.ts @@ -391,7 +391,7 @@ describe('Spec Renderer Page', () => { cy.visit(`/spec/${product.id}`) cy.get('[data-testid="kong-public-ui-spec-details-swagger"]', { timeout: 12000 }) - .get('.info h2').should('contain', 'Swagger Petstore') + .get('.info h2').should('contain', 'Swagger Petstore') cy.get('[data-testid="register-button"]').should('exist') @@ -427,5 +427,24 @@ describe('Spec Renderer Page', () => { cy.get('@apiNotCalled').should('not.been.called') }) + it.only('appregv2 - does not show auth strategy information if public portal', () => { + cy.mockLaunchDarklyFlags([ + { + name: 'tdx-3531-app-reg-v2', + value: true + } + ]) + + cy.intercept('GET', '**/portal_api/portal/portal_context', { + rbac_enabled: true + }).as('getPortalContext') + + cy.visit(`/spec/${product.id}`) + + cy.get('[data-testid="kong-public-ui-spec-details-swagger"]', { timeout: 12000 }) + .get('.info h2').should('contain', 'Swagger Petstore') + + cy.get('[data-testid="auth-strategy-card"]', { timeout: 1000 }).should('not.exist') + }) }) }) diff --git a/src/views/Spec.vue b/src/views/Spec.vue index ddcfc953..0d604c9f 100644 --- a/src/views/Spec.vue +++ b/src/views/Spec.vue @@ -6,7 +6,7 @@