Skip to content

Commit

Permalink
update tests to not wait on alias for fixture stubbed intercept
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Sep 19, 2023
1 parent d4cfb01 commit 6893ac5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions tests/cypress/integration/marketplace.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <reference types="Cypress" />
const products = require('../fixtures/products.json');
const productsFixture = require('../fixtures/products.json');

describe('Marketplace Page', function () {
let appClass = '.' + Cypress.env('appId');
Expand All @@ -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', () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/cypress/integration/premium-plugins-tab.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 6893ac5

Please sign in to comment.