From 68993711e381380e5e7d29bfff0a12a787f6fe37 Mon Sep 17 00:00:00 2001 From: Dan Hedgecock Date: Sun, 13 Sep 2020 16:19:59 -0700 Subject: [PATCH] =?UTF-8?q?Fix:=20Cypress=20fixes=20=F0=9F=8C=B2=20(#245)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/__snapshots__/index.spec.js.snap | 4 ++-- src/index.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/__snapshots__/index.spec.js.snap b/src/__snapshots__/index.spec.js.snap index 0931d78..12013fe 100644 --- a/src/__snapshots__/index.spec.js.snap +++ b/src/__snapshots__/index.spec.js.snap @@ -144,6 +144,7 @@ Object { "cypress/require-data-selectors": "error", "func-names": "off", "spaced-comment": "off", + "testing-library/prefer-screen-queries": "off", }, }, Object { @@ -153,7 +154,6 @@ Object { "files": Array [ ".eslintrc.js", ".storybook/main.js", - "cypress/plugins/index.js", "babel.config.js", "jest.config.js", "webpack.config.js", @@ -1171,6 +1171,7 @@ Object { "cypress/require-data-selectors": "error", "func-names": "off", "spaced-comment": "off", + "testing-library/prefer-screen-queries": "off", }, }, Object { @@ -1180,7 +1181,6 @@ Object { "files": Array [ ".eslintrc.js", ".storybook/main.js", - "cypress/plugins/index.js", "babel.config.js", "jest.config.js", "webpack.config.js", diff --git a/src/index.js b/src/index.js index 105d7d9..cf2f517 100644 --- a/src/index.js +++ b/src/index.js @@ -252,7 +252,11 @@ module.exports = function eloquence({ env: { 'cypress/globals': true, }, - rules: pluginCypress, + rules: { + ...pluginCypress, + // Screen utility isn't available in Cypress tests + 'testing-library/prefer-screen-queries': 'off', + }, }, // --- ⚙️ Configuration files -------------------------- @@ -260,7 +264,6 @@ module.exports = function eloquence({ files: [ '.eslintrc.js', '.storybook/main.js', - 'cypress/plugins/index.js', 'babel.config.js', 'jest.config.js', 'webpack.config.js',