From 0a5c95ba11e8040afb0c5fb3e62b4672ab1d1f28 Mon Sep 17 00:00:00 2001 From: Niraj Patel Date: Mon, 4 Sep 2023 10:05:54 -0700 Subject: [PATCH] Re order the spec files for execution in CI/CD --- .../03-request-access-inactive-env.cy.ts | 143 ++++++++++++++++++ .../01-create-api.cy.ts | 0 .../02-namespace-preview-mode.cy.ts | 0 .../01-client-cred-team-access.ts | 0 .../02-multiple-org-admin.ts | 0 .../03-multiple-org-admin-org-unit.ts | 0 .../01-create-api.cy.ts | 0 .../02-organization.cy.ts | 0 .../03-documentation.cy.ts | 0 .../04-keycloak-shared-IDP-config.cy.ts | 0 .../05-authorizationProfiles.cy.ts | 0 .../06-products.cy.ts | 0 .../07-api-directory.cy.ts | 0 .../08-namespaces.cy.ts | 0 .../{17-CORS => 16-CORS}/01-create-api.cy.ts | 0 .../01-cli-commands.ts | 40 ++--- .../02-cli-generate-config.ts | 53 ++++--- e2e/cypress/tests/18 -gwa-cli/01-cli-demo.ts | 85 ----------- ...01-delete-application-without-access.cy.ts | 0 ...ete-application-with-pending-request.cy.ts | 0 ...te-application-with-approved-request.cy.ts | 0 .../04-delete-namespace-gwa.ts | 0 e2e/cypress/tests/19-gwa-test/01-cli-demo.ts | 37 ----- 23 files changed, 183 insertions(+), 175 deletions(-) create mode 100644 e2e/cypress/tests/01-api-key/03-request-access-inactive-env.cy.ts rename e2e/cypress/tests/{14-namespace-preview-mode => 13-namespace-preview-mode}/01-create-api.cy.ts (100%) rename e2e/cypress/tests/{14-namespace-preview-mode => 13-namespace-preview-mode}/02-namespace-preview-mode.cy.ts (100%) rename e2e/cypress/tests/{15-org-assignment => 14-org-assignment}/01-client-cred-team-access.ts (100%) rename e2e/cypress/tests/{15-org-assignment => 14-org-assignment}/02-multiple-org-admin.ts (100%) rename e2e/cypress/tests/{15-org-assignment => 14-org-assignment}/03-multiple-org-admin-org-unit.ts (100%) rename e2e/cypress/tests/{16-aps-api => 15-aps-api}/01-create-api.cy.ts (100%) rename e2e/cypress/tests/{16-aps-api => 15-aps-api}/02-organization.cy.ts (100%) rename e2e/cypress/tests/{16-aps-api => 15-aps-api}/03-documentation.cy.ts (100%) rename e2e/cypress/tests/{16-aps-api => 15-aps-api}/04-keycloak-shared-IDP-config.cy.ts (100%) rename e2e/cypress/tests/{16-aps-api => 15-aps-api}/05-authorizationProfiles.cy.ts (100%) rename e2e/cypress/tests/{16-aps-api => 15-aps-api}/06-products.cy.ts (100%) rename e2e/cypress/tests/{16-aps-api => 15-aps-api}/07-api-directory.cy.ts (100%) rename e2e/cypress/tests/{16-aps-api => 15-aps-api}/08-namespaces.cy.ts (100%) rename e2e/cypress/tests/{17-CORS => 16-CORS}/01-create-api.cy.ts (100%) rename e2e/cypress/tests/{18 -gwa-cli => 17-gwa-cli}/01-cli-commands.ts (71%) rename e2e/cypress/tests/{18 -gwa-cli => 17-gwa-cli}/02-cli-generate-config.ts (52%) delete mode 100644 e2e/cypress/tests/18 -gwa-cli/01-cli-demo.ts rename e2e/cypress/tests/{13-delete-application => 18-delete-application}/01-delete-application-without-access.cy.ts (100%) rename e2e/cypress/tests/{13-delete-application => 18-delete-application}/02-delete-application-with-pending-request.cy.ts (100%) rename e2e/cypress/tests/{13-delete-application => 18-delete-application}/03-delete-application-with-approved-request.cy.ts (100%) rename e2e/cypress/tests/{13-delete-application => 18-delete-application}/04-delete-namespace-gwa.ts (100%) delete mode 100644 e2e/cypress/tests/19-gwa-test/01-cli-demo.ts diff --git a/e2e/cypress/tests/01-api-key/03-request-access-inactive-env.cy.ts b/e2e/cypress/tests/01-api-key/03-request-access-inactive-env.cy.ts new file mode 100644 index 000000000..ddf82c7b4 --- /dev/null +++ b/e2e/cypress/tests/01-api-key/03-request-access-inactive-env.cy.ts @@ -0,0 +1,143 @@ +// import ApiDirectoryPage from '../../pageObjects/apiDirectory' +// import ApplicationPage from '../../pageObjects/applications' +// import HomePage from '../../pageObjects/home' +// import LoginPage from '../../pageObjects/login' +// import NamespaceAccessPage from '../../pageObjects/namespaceAccess' +// import Products from '../../pageObjects/products' +// import MyAccessPage from '../../pageObjects/myAccess' + +// describe('Change an Active environment to Inactive', () => { +// const login = new LoginPage() +// const home = new HomePage() +// const na = new NamespaceAccessPage() +// const pd = new Products() + +// before(() => { +// cy.visit('/') +// cy.deleteAllCookies() +// cy.reload() +// }) + +// beforeEach(() => { +// cy.preserveCookies() +// cy.fixture('apiowner').as('apiowner') +// // cy.visit(login.path) +// }) + +// it('authenticates Janis (api owner)', () => { +// cy.get('@apiowner').then(({ user, namespace }: any) => { +// cy.login(user.credentials.username, user.credentials.password) +// cy.log('Logged in!') +// home.useNamespace(namespace) +// }) +// }) + +// it('Navigate to Products Page', () => { +// cy.visit(pd.path) +// }) + +// it('Change the current active environment to inactive state', () => { +// cy.get('@apiowner').then(({ product }: any) => { +// pd.editProductEnvironment(product.name, product.environment.name) +// pd.editProductEnvironmentConfig(product.environment.config, true) +// }) +// }) + +// after(() => { +// cy.logout() +// cy.clearLocalStorage({ log: true }) +// cy.deleteAllCookies() +// }) +// }) + +// describe('Verify enactive environment in rrequest access pop up', () => { +// const apiDir = new ApiDirectoryPage() +// const app = new ApplicationPage() +// const myAccessPage = new MyAccessPage() + +// before(() => { +// cy.visit('/') +// cy.deleteAllCookies() +// cy.reload() +// }) + +// beforeEach(() => { +// cy.preserveCookies() +// cy.fixture('developer').as('developer') +// // cy.visit(login.path) +// }) + +// it('authenticates Harley (developer)', () => { +// cy.get('@developer').then(({ user }: any) => { +// cy.login(user.credentials.username, user.credentials.password) +// }) +// }) + +// it('creates an application', () => { +// cy.visit(app.path) +// cy.get('@developer').then(({ application }: any) => { +// app.createApplication(application) +// }) +// }) + +// it('Verify that inactive environment is not displayed', () => { +// cy.visit(apiDir.path) +// cy.get('@developer').then(({ product, application }: any) => { +// apiDir.checkInactiveEnvironmentAccessReqOption(product, application) +// }) +// }) + +// it('Close the popup by click on Cancel button', () => { +// myAccessPage.cancelRequestAccessPopUp() +// }) + +// after(() => { +// cy.logout() +// cy.clearLocalStorage({ log: true }) +// cy.deleteAllCookies() +// }) +// }) + +// describe('Change an the environment back to active', () => { +// const login = new LoginPage() +// const home = new HomePage() +// const na = new NamespaceAccessPage() +// const pd = new Products() + +// before(() => { +// cy.visit('/') +// cy.deleteAllCookies() +// cy.reload() +// }) + +// beforeEach(() => { +// cy.preserveCookies() +// cy.fixture('apiowner').as('apiowner') +// // cy.visit(login.path) +// }) + +// it('authenticates Janis (api owner)', () => { +// cy.get('@apiowner').then(({ user, namespace }: any) => { +// cy.login(user.credentials.username, user.credentials.password) +// cy.log('Logged in!') +// home.useNamespace(namespace) +// }) +// }) + +// it('Navigate to Products Page', () => { +// cy.visit(pd.path) +// }) + +// it('Change the environment back to active state', () => { +// cy.get('@apiowner').then(({ product }: any) => { +// pd.editProductEnvironment(product.name, product.environment.name) +// pd.editProductEnvironmentConfig(product.environment.config) +// }) +// }) + +// after(() => { +// cy.logout() +// cy.clearLocalStorage({ log: true }) +// cy.deleteAllCookies() +// }) +// }) \ No newline at end of file diff --git a/e2e/cypress/tests/14-namespace-preview-mode/01-create-api.cy.ts b/e2e/cypress/tests/13-namespace-preview-mode/01-create-api.cy.ts similarity index 100% rename from e2e/cypress/tests/14-namespace-preview-mode/01-create-api.cy.ts rename to e2e/cypress/tests/13-namespace-preview-mode/01-create-api.cy.ts diff --git a/e2e/cypress/tests/14-namespace-preview-mode/02-namespace-preview-mode.cy.ts b/e2e/cypress/tests/13-namespace-preview-mode/02-namespace-preview-mode.cy.ts similarity index 100% rename from e2e/cypress/tests/14-namespace-preview-mode/02-namespace-preview-mode.cy.ts rename to e2e/cypress/tests/13-namespace-preview-mode/02-namespace-preview-mode.cy.ts diff --git a/e2e/cypress/tests/15-org-assignment/01-client-cred-team-access.ts b/e2e/cypress/tests/14-org-assignment/01-client-cred-team-access.ts similarity index 100% rename from e2e/cypress/tests/15-org-assignment/01-client-cred-team-access.ts rename to e2e/cypress/tests/14-org-assignment/01-client-cred-team-access.ts diff --git a/e2e/cypress/tests/15-org-assignment/02-multiple-org-admin.ts b/e2e/cypress/tests/14-org-assignment/02-multiple-org-admin.ts similarity index 100% rename from e2e/cypress/tests/15-org-assignment/02-multiple-org-admin.ts rename to e2e/cypress/tests/14-org-assignment/02-multiple-org-admin.ts diff --git a/e2e/cypress/tests/15-org-assignment/03-multiple-org-admin-org-unit.ts b/e2e/cypress/tests/14-org-assignment/03-multiple-org-admin-org-unit.ts similarity index 100% rename from e2e/cypress/tests/15-org-assignment/03-multiple-org-admin-org-unit.ts rename to e2e/cypress/tests/14-org-assignment/03-multiple-org-admin-org-unit.ts diff --git a/e2e/cypress/tests/16-aps-api/01-create-api.cy.ts b/e2e/cypress/tests/15-aps-api/01-create-api.cy.ts similarity index 100% rename from e2e/cypress/tests/16-aps-api/01-create-api.cy.ts rename to e2e/cypress/tests/15-aps-api/01-create-api.cy.ts diff --git a/e2e/cypress/tests/16-aps-api/02-organization.cy.ts b/e2e/cypress/tests/15-aps-api/02-organization.cy.ts similarity index 100% rename from e2e/cypress/tests/16-aps-api/02-organization.cy.ts rename to e2e/cypress/tests/15-aps-api/02-organization.cy.ts diff --git a/e2e/cypress/tests/16-aps-api/03-documentation.cy.ts b/e2e/cypress/tests/15-aps-api/03-documentation.cy.ts similarity index 100% rename from e2e/cypress/tests/16-aps-api/03-documentation.cy.ts rename to e2e/cypress/tests/15-aps-api/03-documentation.cy.ts diff --git a/e2e/cypress/tests/16-aps-api/04-keycloak-shared-IDP-config.cy.ts b/e2e/cypress/tests/15-aps-api/04-keycloak-shared-IDP-config.cy.ts similarity index 100% rename from e2e/cypress/tests/16-aps-api/04-keycloak-shared-IDP-config.cy.ts rename to e2e/cypress/tests/15-aps-api/04-keycloak-shared-IDP-config.cy.ts diff --git a/e2e/cypress/tests/16-aps-api/05-authorizationProfiles.cy.ts b/e2e/cypress/tests/15-aps-api/05-authorizationProfiles.cy.ts similarity index 100% rename from e2e/cypress/tests/16-aps-api/05-authorizationProfiles.cy.ts rename to e2e/cypress/tests/15-aps-api/05-authorizationProfiles.cy.ts diff --git a/e2e/cypress/tests/16-aps-api/06-products.cy.ts b/e2e/cypress/tests/15-aps-api/06-products.cy.ts similarity index 100% rename from e2e/cypress/tests/16-aps-api/06-products.cy.ts rename to e2e/cypress/tests/15-aps-api/06-products.cy.ts diff --git a/e2e/cypress/tests/16-aps-api/07-api-directory.cy.ts b/e2e/cypress/tests/15-aps-api/07-api-directory.cy.ts similarity index 100% rename from e2e/cypress/tests/16-aps-api/07-api-directory.cy.ts rename to e2e/cypress/tests/15-aps-api/07-api-directory.cy.ts diff --git a/e2e/cypress/tests/16-aps-api/08-namespaces.cy.ts b/e2e/cypress/tests/15-aps-api/08-namespaces.cy.ts similarity index 100% rename from e2e/cypress/tests/16-aps-api/08-namespaces.cy.ts rename to e2e/cypress/tests/15-aps-api/08-namespaces.cy.ts diff --git a/e2e/cypress/tests/17-CORS/01-create-api.cy.ts b/e2e/cypress/tests/16-CORS/01-create-api.cy.ts similarity index 100% rename from e2e/cypress/tests/17-CORS/01-create-api.cy.ts rename to e2e/cypress/tests/16-CORS/01-create-api.cy.ts diff --git a/e2e/cypress/tests/18 -gwa-cli/01-cli-commands.ts b/e2e/cypress/tests/17-gwa-cli/01-cli-commands.ts similarity index 71% rename from e2e/cypress/tests/18 -gwa-cli/01-cli-commands.ts rename to e2e/cypress/tests/17-gwa-cli/01-cli-commands.ts index 08222a4b6..86e8972fa 100644 --- a/e2e/cypress/tests/18 -gwa-cli/01-cli-commands.ts +++ b/e2e/cypress/tests/17-gwa-cli/01-cli-commands.ts @@ -35,32 +35,20 @@ describe('Verify CLI commands', () => { }) }) - it('Check for gwa help', () => { - cy.executeCliCommand('gwa help').then((response) => { - debugger - assert.equal(response.stdout, cli.content.help) - }); - }) - - it('Check gwa command for login help', () => { - cy.executeCliCommand('gwa login -h').then((response) => { - assert.equal(response.stdout, cli.content.login_help) - }); - }) it('Check gwa command to login with client ID and secret', () => { let clientID = cli.credentials.clientID let clientSecret = cli.credentials.clientSecret cy.log('gwa login --host ${url} --scheme http') cy.executeCliCommand('gwa login --client-id ' + clientID + ' --client-secret ' + clientSecret + ' --host ' + cleanedUrl + ' --scheme http').then((response) => { - assert.equal(response.stdout, "Logged in") + expect(response.stdout).to.contain('Successfully logged in'); }); }) it('Check gwa command for login with invalid client id', () => { let clientID = "dummy-client" let clientSecret = cli.credentials.clientSecret - cy.executeCliCommand('gwa login --client-id '+clientID+' --client-secret '+clientSecret+' --host '+cleanedUrl+' --scheme http').then((response) => { + cy.executeCliCommand('gwa login --client-id ' + clientID + ' --client-secret ' + clientSecret + ' --host ' + cleanedUrl + ' --scheme http').then((response) => { assert.equal(response.stderr, "Error: unauthorized_client\nINVALID_CREDENTIALS: Invalid client credentials") }); }) @@ -68,21 +56,15 @@ describe('Verify CLI commands', () => { it('Check gwa command for login with invalid client secret', () => { let clientID = cli.credentials.clientID let clientSecret = "dummy-client-secret" - cy.executeCliCommand('gwa login --client-id '+clientID+' --client-secret '+clientSecret+' --host '+cleanedUrl+' --scheme http').then((response) => { + cy.executeCliCommand('gwa login --client-id ' + clientID + ' --client-secret ' + clientSecret + ' --host ' + cleanedUrl + ' --scheme http').then((response) => { assert.equal(response.stderr, "Error: unauthorized_client\nINVALID_CREDENTIALS: Invalid client credentials") }); }) - it('Check gwa command for config help', () => { - cy.executeCliCommand('gwa config -h').then((response) => { - debugger - assert.equal(response.stdout, cli.content.config_help) - }); - }) it('Check gwa config command to set environment', () => { var cleanedUrl = Cypress.env('BASE_URL').replace(/^http?:\/\//i, ""); - cy.executeCliCommand('gwa config set --host '+cleanedUrl+' --scheme http').then((response) => { + cy.executeCliCommand('gwa config set --host ' + cleanedUrl + ' --scheme http').then((response) => { expect(response.stdout).to.contain("Config settings saved") }); }) @@ -93,13 +75,6 @@ describe('Verify CLI commands', () => { }); }) - it('Check gwa command for namespace help', () => { - cy.executeCliCommand('gwa namespace -h').then((response) => { - debugger - assert.equal(response.stdout, cli.content.namespace_help) - }); - }) - it('Check gwa command to create namespace', () => { cy.executeCliCommand('gwa namespace create --host ' + cleanedUrl + ' --scheme http').then((response) => { assert.isNotNaN(response.stdout) @@ -107,10 +82,17 @@ describe('Verify CLI commands', () => { }); }) + it('Check gwa namespace list command and verify the created namespace in the list', () => { cy.executeCliCommand('gwa namespace list --host ' + cleanedUrl + ' --scheme http').then((response) => { expect(response.stdout).to.contain(namespace); }); }) + after(() => { + cy.logout() + cy.clearLocalStorage({ log: true }) + cy.deleteAllCookies() + }) + }) \ No newline at end of file diff --git a/e2e/cypress/tests/18 -gwa-cli/02-cli-generate-config.ts b/e2e/cypress/tests/17-gwa-cli/02-cli-generate-config.ts similarity index 52% rename from e2e/cypress/tests/18 -gwa-cli/02-cli-generate-config.ts rename to e2e/cypress/tests/17-gwa-cli/02-cli-generate-config.ts index 651edf39b..30d11a689 100644 --- a/e2e/cypress/tests/18 -gwa-cli/02-cli-generate-config.ts +++ b/e2e/cypress/tests/17-gwa-cli/02-cli-generate-config.ts @@ -10,7 +10,7 @@ let cli = require("../../fixtures/test_data/gwa-cli.json") const jose = require('node-jose') -describe('Verify CLI commands', () => { +describe('Verify CLI commands for generate/apply config', () => { const login = new LoginPage() const apiDir = new ApiDirectoryPage() const app = new ApplicationPage() @@ -39,31 +39,36 @@ describe('Verify CLI commands', () => { }) }) - // it('Check gwa config command to set token', () => { - // cy.executeCliCommand('gwa config set --token ' + userSession).then((response) => { - // expect(response.stdout).to.contain("Config settings saved") - // }); - // }) + it('Check gwa config command to set token', () => { + cy.executeCliCommand('gwa config set --token ' + userSession).then((response) => { + expect(response.stdout).to.contain("Config settings saved") + }); + }) + + it('Check gwa command to generate config for client credential template', () => { + cy.executeCliCommand('gwa generate-config --template client-credentials-shared-idp --service my-service --upstream https://httpbin.org --org ministry-of-health --org-unit planning-and-innovation-division').then((response) => { + assert.equal(response.stdout, "File gw-config.yml created") + }); + }) - // it('Check gwa command to generate config', () => { - // cy.executeCliCommand('gwa generate-config --template client-credentials-shared-idp --service my-service --upstream https://httpbin.org --org ministry-of-health --org-unit planning-and-innovation-division').then((response) => { - // assert.equal(response.stdout, "File gw-config.yml created") - // }); - // }) + it('Check gwa command to apply generated config', () => { + cy.executeCliCommand('gwa apply').then((response) => { + debugger + let wordOccurrences = (response.stdout.match(/\bcreated\b/g) || []).length; + expect(wordOccurrences).to.equal(3) + namespace = response.stdout.split('\n')[0] + namespace = namespace.replace('-', '').trim() + }); + }) - // it('Check gwa command to apply generated config', () => { - // cy.executeCliCommand('gwa apply').then((response) => { - // let wordOccurrences = (response.stdout.match(/\bcreated\b/g) || []).length; - // expect(wordOccurrences).to.equal(3) - // wordOccurrences = (response.stdout.match(/\published\b/g) || []).length; - // expect(wordOccurrences).to.equal(1) - // }); - // }) + it('Check gwa command to generate config for kong httpbin template', () => { + cy.executeCliCommand('gwa generate-config --template kong-httpbin --service my-service --upstream https://httpbin.org --org ministry-of-health --org-unit planning-and-innovation-division').then((response) => { + assert.equal(response.stdout, "File gw-config.yml created") + }); + }) it('activates new namespace', () => { - cy.get('@apiowner').then(({ namespace }: any) => { - home.useNamespace(namespace) - }) + home.useNamespace(namespace) }) it('Verify that the product created through gwa command is displayed in the portal', () => { @@ -76,11 +81,11 @@ describe('Verify CLI commands', () => { }) it('Verify the issuer details for the product', () => { - pd.verifyIssuer('gw-d4ed4 default (test)') + pd.verifyIssuer(namespace + ' default (test)') }) it('Verify that the dataset created through GWA comand is assocuated with the product', () => { cy.visit(pd.path) - pd.verifyDataset('my-service','my-service API') + pd.verifyDataset('my-service', 'my-service API') }) }) \ No newline at end of file diff --git a/e2e/cypress/tests/18 -gwa-cli/01-cli-demo.ts b/e2e/cypress/tests/18 -gwa-cli/01-cli-demo.ts deleted file mode 100644 index 9538323c9..000000000 --- a/e2e/cypress/tests/18 -gwa-cli/01-cli-demo.ts +++ /dev/null @@ -1,85 +0,0 @@ -import LoginPage from '../../pageObjects/login' -import ApplicationPage from '../../pageObjects/applications' -import ApiDirectoryPage from '../../pageObjects/apiDirectory' -import MyAccessPage from '../../pageObjects/myAccess' -const YAML = require('yamljs'); -let userSession: any -let cli = require("../../fixtures/test_data/gwa-cli.json") - -const jose = require('node-jose') - -describe('Verify CLI commands', () => { - const login = new LoginPage() - const apiDir = new ApiDirectoryPage() - const app = new ApplicationPage() - const ma = new MyAccessPage() - let namespace: string - - before(() => { - // cy.visit('/') - cy.deleteAllCookies() - cy.reload() - }) - - beforeEach(() => { - cy.preserveCookies() - cy.fixture('apiowner').as('apiowner') - // cy.visit(login.path) - }) - - it('authenticates Janis (api owner) to get the user session token', () => { - cy.get('@apiowner').then(({ apiTest }: any) => { - cy.getUserSessionTokenValue(apiTest.namespace, false).then((value) => { - userSession = value - }) - }) - }) - - it('Check gwa command to login with client ID and secret', () => { - let url = "oauth2proxy.localtest.me:4180" - let clientID = cli.credentials.clientID - let clientSecret = cli.credentials.clientSecret - cy.log('gwa login --host ${url} --scheme http') - cy.executeCliCommand('gwa login --client-id ' + clientID + ' --client-secret ' + clientSecret + ' --host ' + url + ' --scheme http').then((response) => { - assert.equal(response.stdout, "Logged in") - }); - }) - - - it('Check gwa config command to set environment', () => { - cy.executeCliCommand('gwa config set --host oauth2proxy.localtest.me:4180 --scheme http').then((response) => { - expect(response.stdout).to.contain("Config settings saved") - }); - }) - - it('Check gwa config command to set token', () => { - cy.executeCliCommand('gwa config set --token ' + userSession).then((response) => { - expect(response.stdout).to.contain("Config settings saved") - }); - }) - - it('Check gwa command to create namespace', () => { - let url = "oauth2proxy.localtest.me:4180" - cy.executeCliCommand('gwa namespace create --host ' + url + ' --scheme http').then((response) => { - assert.isNotNaN(response.stdout) - namespace = response.stdout - cy.replaceWordInJsonObject('newplatform', namespace, 'service-gwa.yml') - cy.updateJsonValue('apiowner.json', 'namespace', namespace) - }); - }) - - it('Check gwa namespace list command and verify the created namespace in the list', () => { - let url = "oauth2proxy.localtest.me:4180" - cy.executeCliCommand('gwa namespace list --host ' + url + ' --scheme http').then((response) => { - expect(response.stdout).to.contain(namespace); - }); - }) - - it('Check that deleted namespace does not display in gwa namespace list command', () => { - let url = "oauth2proxy.localtest.me:4180" - cy.executeCliCommand('gwa namespace list').then((response) => { - expect(response.stdout).not.to.contain(namespace); - }); - }) - -}) \ No newline at end of file diff --git a/e2e/cypress/tests/13-delete-application/01-delete-application-without-access.cy.ts b/e2e/cypress/tests/18-delete-application/01-delete-application-without-access.cy.ts similarity index 100% rename from e2e/cypress/tests/13-delete-application/01-delete-application-without-access.cy.ts rename to e2e/cypress/tests/18-delete-application/01-delete-application-without-access.cy.ts diff --git a/e2e/cypress/tests/13-delete-application/02-delete-application-with-pending-request.cy.ts b/e2e/cypress/tests/18-delete-application/02-delete-application-with-pending-request.cy.ts similarity index 100% rename from e2e/cypress/tests/13-delete-application/02-delete-application-with-pending-request.cy.ts rename to e2e/cypress/tests/18-delete-application/02-delete-application-with-pending-request.cy.ts diff --git a/e2e/cypress/tests/13-delete-application/03-delete-application-with-approved-request.cy.ts b/e2e/cypress/tests/18-delete-application/03-delete-application-with-approved-request.cy.ts similarity index 100% rename from e2e/cypress/tests/13-delete-application/03-delete-application-with-approved-request.cy.ts rename to e2e/cypress/tests/18-delete-application/03-delete-application-with-approved-request.cy.ts diff --git a/e2e/cypress/tests/13-delete-application/04-delete-namespace-gwa.ts b/e2e/cypress/tests/18-delete-application/04-delete-namespace-gwa.ts similarity index 100% rename from e2e/cypress/tests/13-delete-application/04-delete-namespace-gwa.ts rename to e2e/cypress/tests/18-delete-application/04-delete-namespace-gwa.ts diff --git a/e2e/cypress/tests/19-gwa-test/01-cli-demo.ts b/e2e/cypress/tests/19-gwa-test/01-cli-demo.ts deleted file mode 100644 index a51ddd82d..000000000 --- a/e2e/cypress/tests/19-gwa-test/01-cli-demo.ts +++ /dev/null @@ -1,37 +0,0 @@ -import LoginPage from '../../pageObjects/login' -import ApplicationPage from '../../pageObjects/applications' -import ApiDirectoryPage from '../../pageObjects/apiDirectory' -import MyAccessPage from '../../pageObjects/myAccess' -const YAML = require('yamljs'); -let userSession: any -let cli = require("../../fixtures/test_data/gwa-cli.json") - -const jose = require('node-jose') - -describe('Verify CLI commands', () => { - const login = new LoginPage() - const apiDir = new ApiDirectoryPage() - const app = new ApplicationPage() - const ma = new MyAccessPage() - let namespace: string - - before(() => { - // cy.visit('/') - cy.deleteAllCookies() - cy.reload() - }) - - beforeEach(() => { - cy.preserveCookies() - cy.fixture('apiowner').as('apiowner') - // cy.visit(login.path) - }) - - - it('Check gwa command for config help', () => { - cy.executeCliCommand('gwa config -h').then((response) => { - expect(response.stdout).to.contain("Configuration commands"); - }); - }) - -}) \ No newline at end of file