Skip to content

Commit

Permalink
[Backport 4.4-2.3-wzd] Fixing login method for WZD (#4789)
Browse files Browse the repository at this point in the history
Fixing login method for WZD (#4784)

* Fixing login method for WZD

* Changing navigation method

(cherry picked from commit 6ad6561)

Co-authored-by: Mayons95 <[email protected]>
  • Loading branch information
github-actions[bot] and Mayons95 authored Nov 1, 2022
1 parent 9561c0a commit 2ffa5a4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ let urlBodys = [
];

Given('The wazuh admin user is logged', () => {
if (Cypress.env('type') != 'wzd') {
if (Cypress.env('type') != 'wzd') {
navigate('app/wazuh');
}
} else {
navigate('/');
}
elementIsVisible(wazuhMenuButton);
});

Expand Down
20 changes: 10 additions & 10 deletions test/cypress/cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ before(() => {

cy.log(`Parameter loginMethod is: ${loginMethod} and url from loginMethod is: ${Cypress.config('baseUrl')}`);

if (Cypress.env('type') == 'odfe') {
navigate("app/kibana?security_tenant=analysts#/visualize/edit/c501fa50-7e52-11e9-ae4e-b5d69947d32e?_g=()")
}
else if (Cypress.env('type') == 'wzd') {
navigate("/");
}
else {
navigate("app/wazuh");
}
// if (Cypress.env('type') == 'odfe') {
// navigate("app/kibana?security_tenant=analysts#/visualize/edit/c501fa50-7e52-11e9-ae4e-b5d69947d32e?_g=()")
// }
// else if (Cypress.env('type') == 'wzd') {
// navigate("/");
// }
// else {
navigate("app/wazuh");
// }

login ? login() : cy.log(`Error! loginMethod: "${loginMethod}" is not recognized`);

Expand Down Expand Up @@ -79,4 +79,4 @@ beforeEach(() => {
cy.setSessionStorage('healthCheck', 'executed');
if (Cypress.env('type') != 'wzd') navigate("/");
}
)
)

0 comments on commit 2ffa5a4

Please sign in to comment.