Skip to content

Commit 68efec5

Browse files
authored
Merge pull request #9660 from jrafanie/fix-overvzealous-sharing-common-setup-teardown
Not all the tests in the describe blocks needed restore
2 parents 4b309e9 + 674c4bc commit 68efec5

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

cypress/e2e/ui/Settings/Application-Settings/tenant.cy.js

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,6 @@ describe('Automate Tenant form operations: Settings > Application Settings > Acc
273273
});
274274

275275
describe('Validate Parent Tenant operations: Edit, Add Project, Manage Quotas', () => {
276-
afterEach(() => {
277-
cy.appDbState('restore');
278-
});
279-
280276
describe('Validate Edit parent tenant', () => {
281277
beforeEach(() => {
282278
cy.toolbar(CONFIG_TOOLBAR_BUTTON, EDIT_TENANT_CONFIG_OPTION);
@@ -313,6 +309,10 @@ describe('Automate Tenant form operations: Settings > Application Settings > Acc
313309
});
314310

315311
describe('Validate Add Project to parent tenant', () => {
312+
afterEach(() => {
313+
cy.appDbState('restore');
314+
});
315+
316316
it('Validate Add Project function', () => {
317317
addProjectToTenant();
318318
});
@@ -323,6 +323,10 @@ describe('Automate Tenant form operations: Settings > Application Settings > Acc
323323
cy.toolbar(CONFIG_TOOLBAR_BUTTON, MANAGE_QUOTAS_CONFIG_OPTION);
324324
});
325325

326+
afterEach(() => {
327+
cy.appDbState('restore');
328+
});
329+
326330
it('Validate Reset & Cancel buttons in Manage Quotas form', () => {
327331
cy.getFormFooterButtonByTypeWithText({
328332
buttonText: RESET_BUTTON_TEXT,
@@ -341,15 +345,15 @@ describe('Automate Tenant form operations: Settings > Application Settings > Acc
341345
});
342346

343347
describe('Validate Child Tenant operations: Add, Edit, Add Project, Manage Quotas', () => {
344-
afterEach(() => {
345-
cy.appDbState('restore');
346-
});
347-
348348
describe('Validate Add child tenant function', () => {
349349
beforeEach(() => {
350350
cy.toolbar(CONFIG_TOOLBAR_BUTTON, ADD_CHILD_TENANT_CONFIG_OPTION);
351351
});
352352

353+
afterEach(() => {
354+
cy.appDbState('restore');
355+
});
356+
353357
it('Validate Add child tenant form elements', () => {
354358
validateFormElements(false);
355359
});
@@ -400,6 +404,10 @@ describe('Automate Tenant form operations: Settings > Application Settings > Acc
400404
cy.toolbar(CONFIG_TOOLBAR_BUTTON, EDIT_TENANT_CONFIG_OPTION);
401405
});
402406

407+
afterEach(() => {
408+
cy.appDbState('restore');
409+
});
410+
403411
it('Validate Edit child tenant form elements', () => {
404412
validateFormElements();
405413
cancelFormWithOptionalFlashCheck();
@@ -432,6 +440,10 @@ describe('Automate Tenant form operations: Settings > Application Settings > Acc
432440
createAndSelectChildTenant();
433441
});
434442

443+
afterEach(() => {
444+
cy.appDbState('restore');
445+
});
446+
435447
it('Validate Add Project function', () => {
436448
addProjectToTenant();
437449
});
@@ -449,6 +461,10 @@ describe('Automate Tenant form operations: Settings > Application Settings > Acc
449461
cy.toolbar(CONFIG_TOOLBAR_BUTTON, MANAGE_QUOTAS_CONFIG_OPTION);
450462
});
451463

464+
afterEach(() => {
465+
cy.appDbState('restore');
466+
});
467+
452468
it('Validate Reset & Cancel buttons in Manage Quotas form', () => {
453469
cy.getFormFooterButtonByTypeWithText({
454470
buttonText: RESET_BUTTON_TEXT,

0 commit comments

Comments
 (0)