| 1 |
// Preserve WP cookies |
| 2 |
Cypress.Cookies.defaults({ |
| 3 |
preserve: /wordpress/, |
| 4 |
}); |
| 5 |
|
| 6 |
// Make sure no errors |
| 7 |
Cypress.on('window:before:load', (win) => { |
| 8 |
cy.spy(win.console, 'error'); |
| 9 |
}); |
| 10 |
afterEach(() => { |
| 11 |
cy.window().then((win) => { |
| 12 |
expect(win.console.error).to.have.callCount(0); |
| 13 |
}); |
| 14 |
}); |
| 15 |
|
| 16 |
beforeEach(() => { |
| 17 |
cy.loginUser(); |
| 18 |
cy.visitNewPageEditor(); |
| 19 |
}); |
| 20 |
|
| 21 |
afterEach(() => { |
| 22 |
cy.saveDraft(); // so we can leave without an alert |
| 23 |
// cy.uninstallPlugin('rust-starter') |
| 24 |
cy.logoutUser(); |
| 25 |
}); |
| 26 |
|