Browse Source

chore(cypress): persist localstorage across tests

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3798/head
Pranav C 2 years ago
parent
commit
a5f0bd1793
  1. 8
      scripts/cypress/integration/common/4g_table_view_expanded_form.js

8
scripts/cypress/integration/common/4g_table_view_expanded_form.js

@ -23,13 +23,18 @@ function verifyExpandFormHeader(title) {
export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(apiType, dbType)) return;
let clear;
describe(`${apiType.toUpperCase()} api - Table views: Expanded form`, () => {
before(() => {
cy.restoreLocalStorage();
// open a table to work on views
//
cy.openTableTab("Country", 25);
cy.openTableTab('Country', 25);
clear = Cypress.LocalStorage.clear;
Cypress.LocalStorage.clear = () => {}
});
beforeEach(() => {
@ -44,6 +49,7 @@ export const genTest = (apiType, dbType) => {
cy.restoreLocalStorage();
cy.closeTableTab("Country");
cy.saveLocalStorage();
Cypress.LocalStorage.clear = clear;
});
// Common routine to create/edit/delete GRID & GALLERY view

Loading…
Cancel
Save