Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated Cypress test to run on dev, removed fixtures #296

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cypress/e2e/a11yValidate.spec.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { domElementIds, frontRoutes } from "../../shared";
import { disableNewUrlLog } from "../utils";
import { disableUrlLogging } from "../cypress/utils/log";
const selectedRoutes = [
"/",
frontRoutes.search,
Expand All @@ -23,7 +23,7 @@ describe("Validate a11y with axe on main pages", () => {
runCheckA11y();
});
it(`Axe should pass on convention form`, () => {
disableNewUrlLog();
disableUrlLogging();
cy.visit(frontRoutes.conventionImmersionRoute);
cy.get(`#${domElementIds.conventionImmersionRoute.showFormButton}`).click();
runCheckA11y();
Expand Down
7 changes: 3 additions & 4 deletions cypress/e2e/navigation.spec.cy.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { domElementIds, frontRoutes } from "shared";
import { disableNewUrlLog } from "../utils";
import { connectToAdmin } from "../utils/admin";
import { disableUrlLogging } from "../cypress/utils/log";

describe("Simple navigation", () => {
// TODO: do separate test for admin navigation
it("Go to admin and log in", () => {
connectToAdmin();
cy.connectToAdmin();
it("Go to home page", () => {
goToTab({
selector: `#${domElementIds.header.navLinks.home}`,
Expand Down Expand Up @@ -37,7 +36,7 @@ describe("Simple navigation", () => {
});

it("Goes to convention page", () => {
disableNewUrlLog();
disableUrlLogging();
cy.visit("/");
goToTab({
selector: `#${domElementIds.header.navLinks.candidate.formConvention}`,
Expand Down
5 changes: 0 additions & 5 deletions cypress/fixtures/example.json

This file was deleted.

3 changes: 2 additions & 1 deletion cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"scripts": {
"open": "CYPRESS_BASE_URL=http://localhost:3000/ CYPRESS_ADMIN_USER=admin CYPRESS_ADMIN_PASSWORD=password node_modules/.bin/cypress open",
"install": "CYPRESS_ADMIN_USER=admin CYPRESS_ADMIN_PASSWORD=password node_modules/.bin/cypress install",
"run-cloud": "CYPRESS_ADMIN_USER=admin CYPRESS_ADMIN_PASSWORD=password node_modules/.bin/cypress run --record"
"run-cloud": "CYPRESS_ADMIN_USER=admin CYPRESS_ADMIN_PASSWORD=password node_modules/.bin/cypress run --record",
"open-dev-scalingo": "CYPRESS_BASE_URL=https://dev.immersion-facile.beta.gouv.fr/ CYPRESS_ADMIN_USER=admin CYPRESS_ADMIN_PASSWORD=admin node_modules/.bin/cypress open"
},
"devDependencies": {
"@faker-js/faker": "^7.6.0",
Expand Down