fix: Intercepts are defined before login (no-changelog) (#16873)

This commit is contained in:
shortstacked 2025-07-01 12:05:25 +01:00 committed by GitHub
parent 7c8a152490
commit 1958b89d38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,16 +27,14 @@ before(() => {
});
beforeEach(() => {
if (!cy.config('disableAutoLogin')) {
cy.signinAsOwner();
}
cy.window().then((win): void => {
win.localStorage.setItem('N8N_THEME', 'light');
win.localStorage.setItem('N8N_AUTOCOMPLETE_ONBOARDED', 'true');
win.localStorage.setItem('N8N_MAPPING_ONBOARDED', 'true');
});
// #region ===== Intercepts =====
cy.intercept('GET', '/rest/settings', (req) => {
// Disable cache
delete req.headers['if-none-match'];
@ -106,4 +104,10 @@ beforeEach(() => {
items: [],
},
).as('getWhatsNew');
// #endregion ===== Intercepts =====
if (!cy.config('disableAutoLogin')) {
cy.signinAsOwner();
}
});