Skip to content
Snippets Groups Projects

Teardown for cypress

Closed ilyaukin requested to merge IL/teardown-cypress into 1.0.x
3 files
+ 51
16
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -21,6 +21,9 @@ import atkConfig from '../../../cypress.atk.config';
import qaUserAccounts from '../../data/qaUsers.json';
describe('Entity tests.', () => {
// Node IDs to clean up after the test run.
const ctx = { tmpNid: [] }
//
// Create a page with an image, confirm it, update it, confirm update then delete it via the UI.
//
@@ -65,6 +68,7 @@ describe('Entity tests.', () => {
// Get the nid.
const nid = parseInt(match[1], 10);
ctx.tmpNid.push(nid);
// Update the node.
const nodeEditUrl = atkConfig.nodeEditUrl.replace('{nid}', nid);
@@ -136,6 +140,7 @@ describe('Entity tests.', () => {
// Get the nid.
const nid = parseInt(match[1], 10);
ctx.tmpNid.push(nid);
// Update the node.
const nodeEditUrl = atkConfig.nodeEditUrl.replace('{nid}', nid);
@@ -162,4 +167,10 @@ describe('Entity tests.', () => {
cy.deleteNodeViaUiWithNid(nid);
});
});
after(() => {
for (const nid of ctx.tmpNid) {
cy.deleteNodeWithNid(nid);
}
});
});
Loading