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

chore: fix e2e #2961

Closed
wants to merge 8 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 9 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
"extends": ["eslint:recommended", "plugin:jsdoc/recommended", "plugin:markdown/recommended", "plugin:prettier/recommended"],
"plugins": ["html", "jest", "jsdoc", "prettier"],
"rules": {
"no-prototype-builtins": 0,
"no-unused-vars": 0,
"jsdoc/check-indentation": 0,
"jsdoc/check-alignment": 0,
"jsdoc/check-line-alignment": 0,
"jsdoc/multiline-blocks": 0,
"jsdoc/newline-after-description": 0,
"jsdoc/tag-lines": 0,
"no-prototype-builtins": "off",
"no-unused-vars": "off",
"jsdoc/check-indentation": "off",
"jsdoc/check-alignment": "off",
"jsdoc/check-line-alignment": "off",
"jsdoc/multiline-blocks": "off",
"jsdoc/newline-after-description": "off",
"jsdoc/tag-lines": "off",
"cypress/no-async-tests": "off",
"no-empty": ["error", { "allowEmptyCatch": true }]
},
"overrides": [
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Build

on: [push, pull_request]
on:
push: {}
pull_request:
types:
- opened
- synchronize
- ready_for_review

permissions:
contents: read
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
on: [push]
on:
push: {}
pull_request:
types:
- opened
- synchronize
- ready_for_review

name: Static analysis

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/e2e → .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: E2E

on: [push, pull_request]
on:
push: {}
pull_request:
types:
- opened
- synchronize
- ready_for_review

permissions:
contents: read
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/pr-labeler-config-validator.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Validate PR Labeler Configuration
on: [push, pull_request]
on:
push: {}
pull_request:
types:
- opened
- synchronize
- ready_for_review

jobs:
pr-labeler:
Expand Down
6 changes: 0 additions & 6 deletions .percy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ This is important so that, if someone else does a change to the grammar that doe

This tests the rendering and visual appearance of the diagram. This ensures that the rendering of that feature in the e2e will be reviewed in the release process going forward. Less chance that it breaks!

To start working with the e2e tests, run `yarn dev` to start the dev server, after that start cypress by running `cypress open` in the mermaid folder. (Make sure you have path to cypress in order, the binary is located in node_modules/.bin).
To start working with the e2e tests, run `yarn dev` to start the dev server, after that start cypress by running `cypress open` in the mermaid folder. (Make sure you have path to cypress in order, the binary is located in node_modules/.bin). Also, make sure to set `env.cypress-plugin-snapshots.updateSnapshots` to `true` temporarily if you are using snapshots.

The rendering tests are very straightforward to create. There is a function imgSnapshotTest. This function takes a diagram in text form, the mermaid options and renders that diagram in cypress.

Expand Down
13 changes: 11 additions & 2 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{
"video": false
}
"video": false,
"ignoreTestFiles": [
"**/__snapshots__/*",
"**/__image_snapshots__/*"
],
"env": {
"cypress-plugin-snapshots": {
"updateSnapshots": true
}
}
}
3 changes: 2 additions & 1 deletion cypress/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"extends": ["plugin:cypress/recommended"],
"plugins": ["cypress"],
"rules":{
"cypress/no-unnecessary-waiting": 0
"cypress/no-unnecessary-waiting": "off",
"cypress/no-async-tests": "off"
}
}
264 changes: 0 additions & 264 deletions cypress/examples/actions.spec.js

This file was deleted.

Loading