Skip to content

Commit 3152556

Browse files
committed
chore: improve test and ensure is not dependent
1 parent 0889802 commit 3152556

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

cypress/integration/default/free-upsell.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ describe('Test Free - upsells', function() {
88
cy.get('#wp-submit').click();
99
});
1010

11-
it('Check upsell links', function() {
11+
beforeEach(() => {
1212
cy.visit(Cypress.env('urls').library );
13-
cy.get('.visualizer-chart > .visualizer-chart-canvas > .visualizer-notfound > h2 > .add-new-h2').click()
13+
cy.get('.add-new-h2.add-new-chart').first().click();
1414
cy.wait( Cypress.env('wait') );
15+
});
1516

17+
it('Check upsell links', function() {
1618
cy.get('iframe')
1719
.then(function ($iframe) {
1820
const $body = $iframe.contents().find('body');
@@ -74,10 +76,6 @@ describe('Test Free - upsells', function() {
7476
});
7577

7678
it('Check Settings upsell links', function() {
77-
cy.visit(Cypress.env('urls').library );
78-
cy.get('.visualizer-chart > .visualizer-chart-canvas > .visualizer-notfound > h2 > .add-new-h2').click()
79-
cy.wait( Cypress.env('wait') );
80-
8179
cy.get('iframe')
8280
.then(function ($iframe) {
8381
const $body = $iframe.contents().find('body');

0 commit comments

Comments
 (0)