Skip to content

Commit

Permalink
feat(app-reg-v2): autoselect strategy from modal if param is present (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
davidma415 authored Feb 16, 2024
1 parent a166e0d commit f06d266
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cypress/e2e/specs/application_registration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,9 @@ describe('Application Registration', () => {
cy.get('[data-testid="app-reg-v2-register-btn"]', { timeout: 12000 }).click()
cy.get(selectors.appRegModal).should('exist')
cy.get(`${selectors.appRegModal} [data-testid="create-application"]`).should('exist')
cy.get(`${selectors.appRegModal} [data-testid="create-application"]`).should('have.prop', 'href').should('contain', `/application/create?product=${productWithKeyAuthAppAuthStrategy.id}&product_version=${versionWithKeyAuthAuthStrategy.id}&auth-strategy-id=${versionWithKeyAuthAuthStrategy.registration_configs[0].id}`)
cy.get(`${selectors.appRegModal} [data-testid="create-application"]`)
.should('have.prop', 'href')
.should('contain', `/application/create?product=${productWithKeyAuthAppAuthStrategy.id}&product_version=${versionWithKeyAuthAuthStrategy.id}&auth_strategy_id=${versionWithKeyAuthAuthStrategy.registration_configs[0].id}`)
})

it('does not show select available scopes if no scopes are available - feature flag on', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ViewSpecRegistrationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default defineComponent({
product: $route.params.product,
product_version: $route.params.product_version,
...(useAppRegV2 && authStrategyId.value)
? { 'auth-strategy-id': authStrategyId.value }
? { auth_strategy_id: authStrategyId.value }
: {}
}
})
Expand Down

0 comments on commit f06d266

Please sign in to comment.