Skip to content

Commit

Permalink
hope IT pass now : take 2
Browse files Browse the repository at this point in the history
Signed-off-by: Deepak Devarakonda <devardee@amazon.com>
  • Loading branch information
devardee committed Jan 31, 2024
1 parent 6874f7f commit d126ece
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
6 changes: 3 additions & 3 deletions test/cypress/e2e/saml/saml_auth_test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ describe('Log in via SAML', () => {
it('Login to Dashboard with Goto URL', () => {
localStorage.setItem('home:newThemeModal:show', 'false');

cy.shortenUrl(SHORTEN_URL_DATA, 'global').then(response => {
const gotoUrl = `http://localhost:5601/goto/${response['urlId']}?security_tenant=global`;
cy.shortenUrl(SHORTEN_URL_DATA, 'global').then((response) => {
const gotoUrl = `http://localhost:5601/goto/${response.urlId}?security_tenant=global`;
cy.visit(gotoUrl, {
failOnStatusCode: false,
})
});

cy.getCookie('security_authentication').should('exist');
});
Expand Down
17 changes: 8 additions & 9 deletions test/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,12 @@ Cypress.Commands.add('loginWithSamlMultiauth', () => {
});

Cypress.Commands.add('shortenUrl', (data, tenant) => {
cy.request(
{
url : `${DASHBOARDS_API.SHORTEN_URL}`,
method: 'POST',
body: data,
headers: { 'securitytenant' : tenant, 'osd-xsrf': 'osd-fetch'}
}
).then((response) => {return response.body})

cy.request({
url: `${DASHBOARDS_API.SHORTEN_URL}`,
method: 'POST',
body: data,
headers: { securitytenant: tenant, 'osd-xsrf': 'osd-fetch' },
}).then((response) => {
return response.body;
});
});
6 changes: 3 additions & 3 deletions test/cypress/support/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ export const SEC_API = {
ROLE_MAPPING_BASE: `${SEC_API_PREFIX}/rolesmapping`,
};
export const DASHBOARDS_API = {
SHORTEN_URL: '/api/shorten_url'
}
export const SHORTEN_URL_DATA = {url : "/app/home#/tutorial_directory"}
SHORTEN_URL: '/api/shorten_url',
};
export const SHORTEN_URL_DATA = { url: '/app/home#/tutorial_directory' };

0 comments on commit d126ece

Please sign in to comment.