test: add cypress test
All checks were successful
/ Build (push) Successful in 1m2s

This commit is contained in:
log101 2024-06-13 16:57:22 +03:00
parent 70986dc137
commit 5af2dd63c1
4 changed files with 2097 additions and 5 deletions

7
cypress.config.js Normal file
View File

@ -0,0 +1,7 @@
import { defineConfig } from "cypress";
export default defineConfig({
e2e: {
supportFile: false,
},
});

7
cypress/e2e/index.cy.js Normal file
View File

@ -0,0 +1,7 @@
describe("Home", () =>
it("titles are correct", () => {
const page = cy.visit("http://localhost:4321");
page.get("title").should("have.text", "log101");
page.get("h1").should("have.text", "Log101");
}));

2084
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,8 @@
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
"astro": "astro",
"test": "cypress run --browser chrome && cypress run --browser firefox"
},
"dependencies": {
"@astrojs/check": "^0.5.10",
@ -17,6 +18,7 @@
"typescript": "^5.4.5"
},
"devDependencies": {
"cypress": "^13.11.0",
"prettier": "3.2.5"
}
}