Skip to content

Commit

Permalink
Fixes for tests pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
edro15 committed Feb 21, 2024
1 parent b3464ab commit b4b890f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
11 changes: 6 additions & 5 deletions test/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@ const { defineConfig } = require('cypress')

// Ref. https://docs.cypress.io/guides/references/configuration
module.exports = defineConfig({
env: {
cmc_uri: '/en-US/app/splunk-3D-graph-network-topology-viz',
splunk_user: 'admin',
splunk_password: 'changed!',
},
//defaultCommandTimeout: 40000,
//viewportWidth: 1000,
//viewportHeight: 1200,
//chromeWebSecurity: false,
//screenShotOnFailure: false,
e2e: {
env: {
cmc_uri: '/en-US/app/splunk-3D-graph-network-topology-viz',
splunk_user: 'admin',
splunk_password: 'changed!',
},
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:8000',
pageLoadTimeout: 600000,
videoCompression: false,
// Reference on skipping tests:
// https://www.browserstack.com/guide/cypress-skip-test
// excludeSpecPattern: [
Expand Down
14 changes: 5 additions & 9 deletions test/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,15 @@

Cypress.Commands.add('splunkLogin', () => {
const loginPath = '/en-US/account/login';
cy.clearCookies();

cy.clearCookies()

cy.visit(loginPath);
cy.visit(loginPath);

cy.get('#username')
.type(Cypress.env('splunk_user'));
cy.get('input[name=username]').type(Cypress.env('splunk_user'));

cy.get('#password')
.type(Cypress.env('splunk_password'));
cy.get('input[name=password]').type(Cypress.env('splunk_password'));

cy.get('input').contains('Sign')
.click();
cy.get("input[type=submit][value='Sign In']").click();
})

Cypress.Commands.add('splunkLogout', () => {
Expand Down

0 comments on commit b4b890f

Please sign in to comment.