Skip to content

Commit 192192e

Browse files
committed
tests:modified basedUrl
1 parent a30c6ab commit 192192e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/cypress.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = defineConfig({
55
//screenShotOnFailure: false,
66
e2e: {
77
env: {
8-
cmc_uri: '/en-US/app/splunk-3D-graph-network-topology-viz',
8+
cmc_uri: 'app/splunk-3D-graph-network-topology-viz',
99
splunk_user: 'admin',
1010
splunk_password: 'password',
1111
},
@@ -14,7 +14,7 @@ module.exports = defineConfig({
1414
setupNodeEvents(on, config) {
1515
return require('./cypress/plugins/index.js')(on, config)
1616
},
17-
baseUrl: 'http://localhost:8000',
17+
baseUrl: 'http://localhost:8000/en-US/',
1818
defaultCommandTimeout: 40000,
1919
// retries: 3,
2020
// chromeWebSecurity: false,

test/cypress/e2e/login.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ describe('Login and Cookie Preservation', () => {
1212
// 'session_id_8000']
1313
// })
1414
cy.splunkLogin();
15-
cy.visit('/en-US/app/splunk-3D-graph-network-topology-viz/graph_analysis');
15+
cy.visit(Cypress.env("cmc_uri") + "/graph_analysis");
1616
})
1717
})

test/cypress/support/commands.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
2626

2727
Cypress.Commands.add('splunkLogin', () => {
28-
const loginPath = '/en-US/account/login';
28+
const loginPath = 'account/login';
2929

3030
cy.visit(loginPath);
3131

32-
cy.get('input[name=username]').type(Cypress.env('splunk_user'));
32+
cy.get('input[name=username]').type(Cypress.env('splunk_user'));
3333
cy.get('input[name=password]').type(Cypress.env('splunk_password'));
3434
cy.get("input[type=submit][value='Sign In']").click();
3535

@@ -40,5 +40,5 @@ Cypress.Commands.add('splunkLogout', () => {
4040
// cy.window().then((win) => {
4141
// win.sessionStorage.removeItem('userToken');
4242
// });
43-
cy.request('/en-US/account/logout');
43+
cy.request('account/logout');
4444
})

0 commit comments

Comments
 (0)