diff --git a/cypress.config.js b/cypress.config.js index 97f47c41..17161e32 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,6 +1,6 @@ -const { defineConfig } = require("cypress"); +import { defineConfig } from "cypress"; -module.exports = defineConfig({ +export default defineConfig({ e2e: { setupNodeEvents(on, config) { // implement node event listeners here diff --git a/cypress/e2e/buy-product.cy.js b/cypress/e2e/buy-product.cy.js index b6252032..4bad8da4 100644 --- a/cypress/e2e/buy-product.cy.js +++ b/cypress/e2e/buy-product.cy.js @@ -10,5 +10,7 @@ describe("My First Test", () => { cy.get('input[data-test-name="cart-json"]').invoke("val").should( "not.be.empty", ); + + cy.visit("http://localhost:8000/checkout"); }); }); diff --git a/deno.json b/deno.json index 63ada2a2..c9e4f81e 100644 --- a/deno.json +++ b/deno.json @@ -47,7 +47,7 @@ "component": "deno eval 'import \"deco/scripts/component.ts\"'", "release": "deno eval 'import \"deco/scripts/release.ts\"'", "update": "deno run -Ar https://deco.cx/update", - "check": "deno fmt && deno lint && deno check dev.ts main.ts", + "check": "cypress run && deno fmt && deno lint && deno check dev.ts main.ts", "install": "deno eval 'import \"deco/scripts/apps/install.ts\"'", "uninstall": "deno eval 'import \"deco/scripts/apps/uninstall.ts\"'", "bundle": "deno run -A jsr:@deco/deco/scripts/bundle site",