Skip to content

Commit

Permalink
fix(e2e): fix admin password, default redirect behavior for login
Browse files Browse the repository at this point in the history
  • Loading branch information
jahow committed Nov 28, 2023
1 parent 7ac55be commit 4bfcf33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/metadata-editor-e2e/src/e2e/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('avatar', () => {
})
describe('display avatar for user with hash', () => {
it('should display the correct profile picture', () => {
cy.login(fakeUser.username, fakeUser.password)
cy.login(fakeUser.username, fakeUser.password, true)
cy.get('gn-ui-avatar')
.children('img')
.should('have.attr', 'src')
Expand Down
4 changes: 2 additions & 2 deletions tools/e2e/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ declare namespace Cypress {

Cypress.Commands.add(
'login',
(username = 'admin', password = 'password', redirect = true) => {
(username = 'admin', password = 'admin', redirect = false) => {
// first request to get the XSRF cookie
cy.request({
method: 'GET',
url: '/geonetwork/srv/api/me',
headers: {
Accept: 'application/json, text/plain, */*',
Accept: 'application/json',
},
})
cy.getCookie('XSRF-TOKEN').then((xsrfTokenCookie) => {
Expand Down

0 comments on commit 4bfcf33

Please sign in to comment.