Skip to content

Commit

Permalink
Fixes flaky test fail (#3951)
Browse files Browse the repository at this point in the history
  • Loading branch information
walmazacn authored Sep 30, 2024
1 parent bd33288 commit 2b62bc2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('Login Flow', () => {

//login again
cy.contains('Re-Login').click();
cy.expectPathToBe('/assets/auth-mock/login-mock.html', 5000);
cy.expectPathToBe('/assets/auth-mock/login-mock.html');
cy.get('body').should('contain', 'Login to Luigi sample app');
cy.login('tets@email.com', 'tets');
});
Expand Down
25 changes: 12 additions & 13 deletions test/e2e-test-application/src/logout.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,21 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title>Logout successful</title>
<meta name="description" content="" />
<meta name="keywords" content="logout" />
<script type="text/javascript">
function login() {
window.location.href = window.location.origin;
}

function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
var results = regex.exec(location.search);
return (results && decodeURIComponent(results[1].replace(/\+/g, ' '))) || '';
}
</script>
<link
rel="stylesheet"
type="text/css"
Expand Down Expand Up @@ -73,19 +84,7 @@
</div>
</div>
</div>

<script type="text/javascript">
function login() {
window.location.href = window.location.origin;
}

function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
var results = regex.exec(location.search);
return (results && decodeURIComponent(results[1].replace(/\+/g, ' '))) || '';
}

var error = getUrlParameter('error');
var errorDescription = getUrlParameter('errorDescription');

Expand Down

0 comments on commit 2b62bc2

Please sign in to comment.