Skip to content

Commit 345beca

Browse files
authored
Fix tests for downstream usage (#4916)
No-Issue
1 parent a3cbc02 commit 345beca

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
@@ -14,7 +14,10 @@ function apiLogin(username, password, url = '/', title = 'Collections') {
1414
method: 'POST',
1515
url: loginUrl,
1616
body: { username, password },
17-
headers: { 'X-CSRFToken': csrftoken.value },
17+
headers: {
18+
'X-CSRFToken': csrftoken.value,
19+
Referer: Cypress.config().baseUrl,
20+
},
1821
});
1922
});
2023
});

0 commit comments

Comments
 (0)