Skip to content

Commit

Permalink
useNamespace --> activateGateway
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyjux committed Jul 8, 2024
1 parent 1644caa commit ee2a7bb
Show file tree
Hide file tree
Showing 64 changed files with 84 additions and 84 deletions.
6 changes: 3 additions & 3 deletions e2e/cypress/support/auth-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Cypress.Commands.add('resetCredential', (accessRole: string) => {
cy.get('@common-testdata').then(({ checkPermission }: any) => {
cy.login(user.credentials.username, user.credentials.password)
cy.log('Logged in!')
home.useNamespace(checkPermission.namespace)
cy.activateGateway(checkPermission.namespace)
cy.visit(na.path)
na.revokeAllPermission(checkPermission.grantPermission[accessRole].userName)
cy.wait(2000)
Expand All @@ -192,9 +192,9 @@ Cypress.Commands.add(
cy.get('@apiowner').then(({ user }: any) => {
cy.login(user.credentials.username, user.credentials.password)
cy.log('Logged in!')
// home.useNamespace(apiTest.namespace)
// cy.activateGateway(apiTest.namespace)
if (isNamespaceSelected || undefined) {
home.useNamespace(namespace)
cy.activateGateway(namespace)
}
cy.get('@login').then(function (xhr: any) {
userSession = xhr.response.headers['x-auth-request-access-token']
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/01-api-key/02-team-access.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Team Access Spec', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
cy.log('Logged in!')
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Change an Active environment to Inactive', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
cy.log('Logged in!')
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down Expand Up @@ -129,7 +129,7 @@ describe('Change an the environment back to active', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
cy.log('Logged in!')
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Approve Pending Request without collecting credentials Spec', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.get('@access-manager').then(({ user }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/01-api-key/07-approve-pending-rqst.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Approve Pending Request Spec', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.get('@access-manager').then(({ user }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/01-api-key/08-grant-access.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Grant Access Spec', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.get('@access-manager').then(({ user }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/01-api-key/10-revoke-access.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Revoke product environment access for Kong API spec', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.get('@access-manager').then(({ user }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('Grant appropriate permissions to team members for client credential fl
})

it('activates new namespace', () => {
home.useNamespace(namespace)
cy.activateGateway(namespace)
})


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Generate Authorization Profiles', () => {

it('Select the namespace created for client credential ', () => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Create API, Product, and Authorization Profiles; Apply Auth Profiles t
cy.getUserSession().then(() => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
nameSpace = clientCredentials.namespace
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
cy.get('@login').then(function (xhr: any) {
userSession = xhr.response.headers['x-auth-request-access-token']
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Access manager approves developer access request for Client ID/Secret
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Deselect the scope from authorization tab', () => {
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
cy.login(user.credentials.username, user.credentials.password).then(() => {
home.useNamespace(clientCredentials.namespace);
cy.activateGateway(clientCredentials.namespace);
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Verify the selected client scoped is not displayed in assigned default
// cy.get('@apiowner').then(({ clientCredentials }: any) => {
// cy.get('@access-manager').then(({ user }: any) => {
// cy.login(user.credentials.username, user.credentials.password)
// home.useNamespace(clientCredentials.namespace);
// cy.activateGateway(clientCredentials.namespace);
// })
// })
// })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('Access manager approves developer access request for JWT - Generated K
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Access manager approves developer access request for JWKS URL flow', (
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('Access manager approves developer access request for JWT - Generated K
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Approve Pending Request Spec', () => {
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/03-manage-labels/03-filter-labels.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Filter Manage labels Spec', () => {
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/03-manage-labels/04-manage-labels.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Manage/Edit labels spec', () => {
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/03-manage-labels/05-link-consumers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Link Consumers to Namespace', () => {
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Verify Gateway Service details', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
cy.log('Logged in!')
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Filter Gateway Services Spec', () => {
cy.get('@apiowner').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
cy.log('Logged in!')
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Assign Access to existing user Spec', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
cy.log('Logged in!')
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down Expand Up @@ -68,7 +68,7 @@ describe('Authernticate with old user to initiate migration', () => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(oldUser.credentials.username, oldUser.credentials.password)
cy.log('Logged in!')
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down Expand Up @@ -105,14 +105,14 @@ describe('Verify that permission of old user is migrated to new user', () => {

// it('activates new namespace', () => {
// cy.get('@apiowner').then(({ namespace }: any) => {
// home.useNamespace(namespace)
// cy.activateGateway(namespace)
// })
// })

it('Get the permission of the user', () => {
cy.getUserSession().then(() => {
cy.get('@common-testdata').then(({ namespace }: any) => {
home.useNamespace(namespace)
cy.activateGateway(namespace)
cy.get('@login').then(function (xhr: any) {
userScopes = xhr.response.body.user.scopes
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import MyAccessPage from '../../pageObjects/myAccess'
// cy.get('@access-manager').then(({ user, clientCredentials }: any) => {
// cy.get('@developer').then(({ clientCredentials }: any) => {
// cy.login(user.credentials.username, user.credentials.password).then(() => {
// home.useNamespace(clientCredentials.namespace);
// cy.activateGateway(clientCredentials.namespace);
// cy.visit(consumers.path);
// consumers.filterConsumerByTypeAndValue('Environment', clientCredentials.clientIdSecret.product.environment)
// consumers.clickOnTheFirstConsumerID()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Manage Control-IP Restriction Spec', () => {
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password).then(() => {
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/07-manage-control/02-rate-limiting.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Manage Control-Rate Limiting Spec for Service as Scope and Local Polic
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password).then(() => {
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Apply Kong API key only plugin', () => {
cy.getUserSession().then(() => {
cy.get('@common-testdata').then(({ namespace }: any) => {
nameSpace = namespace
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down Expand Up @@ -204,7 +204,7 @@ describe('Approve Pending Request Spec', () => {
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace);
cy.activateGateway(namespace);
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Apply client roles to the Authorization Profile', () => {

it('Select the namespace created for client credential ', () => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})

Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/08-client-role/03-read-client-role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('Access manager apply "Read" role and approves developer access request
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/08-client-role/04-write-client-role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('Access manager apply "Write" role and approves developer access reques
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tests/08-client-role/05-check-without-role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Reset Authorization profile to default (without any role)', () => {
cy.getUserSession().then(() => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
nameSpace = clientCredentials.namespace
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Change Authorization profile', () => {
cy.getUserSession().then(() => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
nameSpace = clientCredentials.namespace
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
cy.get('@login').then(function (xhr: any) {
userSession = xhr.response.headers['x-auth-request-access-token']
})
Expand Down Expand Up @@ -182,7 +182,7 @@ describe('Access manager approves developer access request for Kong API ACL auth
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ clientCredentials }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(clientCredentials.namespace)
cy.activateGateway(clientCredentials.namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('Change Authorization profile from Kong ACL-API to Client Credential',
cy.getUserSession().then(() => {
cy.get('@common-testdata').then(({ namespace }: any) => {
nameSpace = namespace
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down Expand Up @@ -188,7 +188,7 @@ describe('Access manager approves developer access request for Client ID/Secret
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Apply multiple services to the product environment', () => {
cy.getUserSession().then(() => {
cy.get('@common-testdata').then(({ namespace }: any) => {
nameSpace = namespace
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down Expand Up @@ -215,7 +215,7 @@ describe('Access manager approves developer access request for Client ID/Secret
cy.get('@access-manager').then(({ user }: any) => {
cy.get('@common-testdata').then(({ namespace }: any) => {
cy.login(user.credentials.username, user.credentials.password)
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Change Product environment from active to inactive', () => {
cy.getUserSession().then(() => {
cy.get('@common-testdata').then(({ namespace }: any) => {
nameSpace = namespace
home.useNamespace(namespace)
cy.activateGateway(namespace)
})
})
})
Expand Down
Loading

0 comments on commit ee2a7bb

Please sign in to comment.