Skip to content

Commit

Permalink
Merge pull request #50 from newfold-labs/update/tests
Browse files Browse the repository at this point in the history
Update tests
  • Loading branch information
circlecube authored Feb 2, 2024
2 parents 03db8cc + 376c24f commit bdf2f27
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
File renamed without changes.
9 changes: 6 additions & 3 deletions tests/cypress/integration/marketplace.cy.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
// <reference types="Cypress" />
const productsFixture = require( '../fixtures/products.json' );
const marketplaceProductsFixture = require( '../fixtures/marketplace-products.json' );

describe( 'Marketplace Page', function () {
const appClass = '.' + Cypress.env( 'appId' );

before( () => {

cy.exec( 'npx wp-env run cli wp transient delete newfold_marketplace' );

cy.intercept(
{
method: 'GET',
url: /newfold-marketplace(\/|%2F)v1(\/|%2F)marketplace/,
},
productsFixture
);
marketplaceProductsFixture
).as( 'marketplace_products' );

cy.visit(
'/wp-admin/admin.php?page=' +
Expand Down
6 changes: 4 additions & 2 deletions tests/cypress/integration/premium-plugins-tab.cy.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
// <reference types="Cypress" />
const products = require( '../fixtures/products.json' );
const marketplaceProductsFixture = require( '../fixtures/marketplace-products.json' );

describe( 'Plugins Premium Tab', () => {
before( () => {
cy.exec( 'npx wp-env run cli wp transient delete newfold_marketplace' );

cy.intercept(
{
method: 'GET',
url: /newfold-marketplace(\/|%2F)v1(\/|%2F)marketplace/,
},
{
body: products,
body: marketplaceProductsFixture,
delay: 1000,
}
);
Expand Down

0 comments on commit bdf2f27

Please sign in to comment.