Skip to content

Commit 3ec68c1

Browse files
Fix tests for downstream usage (#4916) (#4920)
No-Issue (cherry picked from commit 345beca) Co-authored-by: Oleksii Baranov <oleksii.baranov.dev@gmail.com>
1 parent 4620da8 commit 3ec68c1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

test/cypress/support/commands.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Cypress.Commands.add('galaxykit', {}, (operation, ...args) => {
104104
return cy.exec(cmd, options).then(({ code, stderr, stdout }) => {
105105
console.log(`RUN ${cmd}`, options, { code, stderr, stdout });
106106

107-
if (code || stderr) {
107+
if (code) {
108108
cy.log('galaxykit code: ' + code);
109109
cy.log('galaxykit stderr: ' + stderr);
110110
return Promise.reject(new Error(`Galaxykit failed: ${stderr}`));

test/cypress/support/login.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ function apiLogin(username, password, url = '/', title = 'Collections') {
1212
method: 'POST',
1313
url: loginUrl,
1414
body: { username, password },
15-
headers: { 'X-CSRFToken': csrftoken.value },
15+
headers: {
16+
'X-CSRFToken': csrftoken.value,
17+
Referer: Cypress.config().baseUrl,
18+
},
1619
});
1720
});
1821
});

0 commit comments

Comments
 (0)