diff --git a/tests/cypress/integration/marketplace.cy.js b/tests/cypress/integration/marketplace.cy.js index 2aecb9c..8d74600 100644 --- a/tests/cypress/integration/marketplace.cy.js +++ b/tests/cypress/integration/marketplace.cy.js @@ -1,5 +1,5 @@ // -const products = require('../fixtures/products.json'); +const productsFixture = require('../fixtures/products.json'); describe('Marketplace Page', function () { let appClass = '.' + Cypress.env('appId'); @@ -8,9 +8,11 @@ describe('Marketplace Page', function () { cy.intercept({ method: 'GET', url: /newfold-marketplace(\/|%2F)v1(\/|%2F)marketplace/ - }, products ).as('products'); + }, + productsFixture ); + cy.visit('/wp-admin/admin.php?page=' + Cypress.env('pluginId') + '#/marketplace'); - cy.wait('@products'); + }); it('Exists', () => { diff --git a/tests/cypress/integration/premium-plugins-tab.cy.js b/tests/cypress/integration/premium-plugins-tab.cy.js index 16ee0fa..a9617df 100644 --- a/tests/cypress/integration/premium-plugins-tab.cy.js +++ b/tests/cypress/integration/premium-plugins-tab.cy.js @@ -10,9 +10,9 @@ describe('Plugins Premium Tab', () => { }, { body: products, delay: 1000 - }).as('products'); + }); cy.visit('/wp-admin/plugin-install.php?tab=premium-marketplace'); - cy.wait('@products'); + }); it('Premium tab exist', () => {