Skip to content

Commit

Permalink
fix: korjaa cypress-testien ajaminen (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
haapamakim committed Oct 10, 2022
1 parent c5c8cdb commit 675eea3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/// <reference types="cypress" />

import { Status } from "../../../common/graphql/apiModel";

const projektiNimi = Cypress.env("projektiNimi");
const oid = Cypress.env("oid");

Expand Down
13 changes: 12 additions & 1 deletion cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@ module.exports = (on) => {
},
});

require('cypress-mochawesome-reporter/plugin')(on);
on("before:browser:launch", (browser = {}, config) => {
if (browser.name === "chrome") {
// Päivämäärän valinnasta katoaa CI/CD-ajossa kyky kirjoittaa päivämäärä tekstinä. Tällä asetuksella tekstin kirjoittaminen saadaan takaisin.
// Asetukset arvattu näiden perusteella:
// https://github.com/mui/mui-x/pull/5684/files#diff-8cbe9d03b9fa5e04ef3fa3f8be9763779e57a2b026d5c70cb2ed7afcef0d6df5R129
// https://github.com/grafana/xk6-browser/issues/147
config.args.push("--blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4");
}
return config;
});

require("cypress-mochawesome-reporter/plugin")(on);
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"postgenerate:velhoapi": "ts-node --project=tsconfig.cdk.json ./tools/velho/processMetaData.ts ./backend/src/velho/metadata.json",
"pregenerate:api": "graphql-schema-utilities -s \"{./graphql/types.graphql,./graphql/inputs.graphql,./graphql/operations.graphql}\" -o schema.graphql",
"generate:api": "cross-env docker run --rm -v $INIT_CWD:/work ${ACCOUNT_ID:=283563576583}.dkr.ecr.eu-west-1.amazonaws.com/hassu-buildimage:1.0.3 bash -c \"cd /work && amplify codegen\"",
"startBuildImage": "cross-env docker run --rm -it --add-host=hassu:host-gateway -v $INIT_CWD:/work --env=\"DISPLAY=host.docker.internal:0\" -v /tmp/.X11-unix:/tmp/.X11-unix:rw ${ACCOUNT_ID:=283563576583}.dkr.ecr.eu-west-1.amazonaws.com/hassu-buildimage:1.0.3 bash",
"generate": "npm-run-all --aggregate-output --parallel generate:*",
"lint:backend": "eslint --cache --ignore-path .gitignore --ext .ts backend",
"lint:app": "next lint",
Expand Down

0 comments on commit 675eea3

Please sign in to comment.