Skip to content

Commit

Permalink
Fix e2e test plugin scope to better support monorepos (#932)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer authored Jan 26, 2024
1 parent 09a7d13 commit 85b5fbe
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 34 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-wasps-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sumup/foundry": minor
---

Expanded the scope of the Cypress and Playwright plugins to account for end-to-end test in subdirectories.
64 changes: 32 additions & 32 deletions src/configs/eslint/__snapshots__/config.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
"plugins": [
"cypress",
Expand Down Expand Up @@ -1151,8 +1151,8 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
},
],
Expand Down Expand Up @@ -1968,8 +1968,8 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
"plugins": [
"cypress",
Expand Down Expand Up @@ -2688,8 +2688,8 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
},
],
Expand Down Expand Up @@ -3427,8 +3427,8 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
"plugins": [
"cypress",
Expand Down Expand Up @@ -4287,8 +4287,8 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
},
],
Expand Down Expand Up @@ -5102,8 +5102,8 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
"plugins": [
"cypress",
Expand Down Expand Up @@ -5814,8 +5814,8 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
},
],
Expand Down Expand Up @@ -6813,8 +6813,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
"plugins": [
"cypress",
Expand Down Expand Up @@ -8197,8 +8197,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
},
],
Expand Down Expand Up @@ -9538,8 +9538,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
"plugins": [
"cypress",
Expand Down Expand Up @@ -10782,8 +10782,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
},
],
Expand Down Expand Up @@ -12045,8 +12045,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
"plugins": [
"cypress",
Expand Down Expand Up @@ -13429,8 +13429,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
},
],
Expand Down Expand Up @@ -14768,8 +14768,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
"plugins": [
"cypress",
Expand Down Expand Up @@ -16004,8 +16004,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
],
"files": [
"**/*spec.*",
"e2e/**/*",
"tests/**/*",
"**/e2e/**/*",
"**/tests/**/*",
],
},
],
Expand Down
4 changes: 2 additions & 2 deletions src/configs/eslint/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ function customizePlugin(plugins?: Plugin[]) {
[Plugin.CYPRESS]: {
overrides: [
{
files: ['**/*spec.*', 'e2e/**/*', 'tests/**/*'],
files: ['**/*spec.*', '**/e2e/**/*', '**/tests/**/*'],
extends: ['plugin:cypress/recommended'],
plugins: ['cypress'],
env: { 'cypress/globals': true },
Expand All @@ -453,7 +453,7 @@ function customizePlugin(plugins?: Plugin[]) {
[Plugin.PLAYWRIGHT]: {
overrides: [
{
files: ['**/*spec.*', 'e2e/**/*', 'tests/**/*'],
files: ['**/*spec.*', '**/e2e/**/*', '**/tests/**/*'],
extends: ['plugin:playwright/playwright-test'],
},
],
Expand Down

0 comments on commit 85b5fbe

Please sign in to comment.