cypress-skip-and-only-ui icon indicating copy to clipboard operation
cypress-skip-and-only-ui copied to clipboard

Buttons are there but they trigger no action

Open borecz opened this issue 2 years ago • 4 comments

Hi @bahmutov,

I've tried to install your plugin but I can't make it working for some reasons.

Any clue?

Project is in TS

cypress/plugins/index.ts `const { lighthouse, prepareAudit } = require('cypress-audit'); import task from 'cypress-skip-and-only-ui/task';

/**

  • @type {Cypress.PluginConfig} */ module.exports = (on, config) => { on('before:browser:launch', (browser = {}, launchOptions) => { prepareAudit(launchOptions); });

on('task', { lighthouse: lighthouse(), task });

// eslint-disable-next-line @typescript-eslint/no-var-requires require('@cypress/code-coverage/task')(on, config);

config.env.local = config.baseUrl.match('localhost') ? true : false;

return config; };`

package.json "devDependencies": { "@types/faker": "^5.5.9", "@types/node": "^16.11.10", "@typescript-eslint/eslint-plugin": "^5.18.0", "@typescript-eslint/parser": "^5.18.0", "cypress": "^9.5.3", "cypress-audit": "^1.1.0", "cypress-file-upload": "^5.0.8", "cypress-real-events": "^1.6.0", "cypress-recurse": "^1.13.1", "cypress-skip-and-only-ui": "^1.2.15", "eslint": "^8.9.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-chai-friendly": "^0.7.2", "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-prettier": "^4.0.0", "faker": "^5.5.3", "find-cypress-specs": "^1.7.0", "lint-staged": "^12.3.4", "prettier": "^2.5.1", "typescript": "^4.5.2" },

cypress/support/index.ts import 'cypress-real-events/support'; import '@cypress/code-coverage/support'; import 'cypress-audit/commands'; import './commands'; import 'cypress-skip-and-only-ui/support';

cypress/plugins/index.ts `const { lighthouse, prepareAudit } = require('cypress-audit'); import task from 'cypress-skip-and-only-ui/task';

/**

  • @type {Cypress.PluginConfig} */ module.exports = (on, config) => { on('before:browser:launch', (browser = {}, launchOptions) => { prepareAudit(launchOptions); });

on('task', { lighthouse: lighthouse(), task });

// eslint-disable-next-line @typescript-eslint/no-var-requires require('@cypress/code-coverage/task')(on, config);

config.env.local = config.baseUrl.match('localhost') ? true : false;

return config; };`

borecz avatar Apr 11 '22 19:04 borecz

What’s the error ?

Sent from my iPhone

On Apr 11, 2022, at 15:09, SimoneB @.***> wrote:

 Hi @bahmutov,

I've tried to install your plugin but I can't make it working for some reasons.

Any clue?

Project is in TS

cypress/plugins/index.ts `const { lighthouse, prepareAudit } = require('cypress-audit'); import task from 'cypress-skip-and-only-ui/task';

/**

@type {Cypress.PluginConfig} */ module.exports = (on, config) => { on('before:browser:launch', (browser = {}, launchOptions) => { prepareAudit(launchOptions); }); on('task', { lighthouse: lighthouse(), task });

// eslint-disable-next-line @typescript-eslint/no-var-requires @.***/code-coverage/task')(on, config);

config.env.local = config.baseUrl.match('localhost') ? true : false;

return config; };`

package.json "devDependencies": { @./faker": "^5.5.9", @./node": "^16.11.10", @./eslint-plugin": "^5.18.0", @./parser": "^5.18.0", "cypress": "^9.5.3", "cypress-audit": "^1.1.0", "cypress-file-upload": "^5.0.8", "cypress-real-events": "^1.6.0", "cypress-recurse": "^1.13.1", "cypress-skip-and-only-ui": "^1.2.15", "eslint": "^8.9.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-chai-friendly": "^0.7.2", "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-prettier": "^4.0.0", "faker": "^5.5.3", "find-cypress-specs": "^1.7.0", "lint-staged": "^12.3.4", "prettier": "^2.5.1", "typescript": "^4.5.2" },

cypress/support/index.ts import 'cypress-real-events/support'; import @.***/code-coverage/support'; import 'cypress-audit/commands'; import './commands'; import 'cypress-skip-and-only-ui/support';

cypress/plugins/index.ts `const { lighthouse, prepareAudit } = require('cypress-audit'); import task from 'cypress-skip-and-only-ui/task';

/**

@type {Cypress.PluginConfig} */ module.exports = (on, config) => { on('before:browser:launch', (browser = {}, launchOptions) => { prepareAudit(launchOptions); }); on('task', { lighthouse: lighthouse(), task });

// eslint-disable-next-line @typescript-eslint/no-var-requires @.***/code-coverage/task')(on, config);

config.env.local = config.baseUrl.match('localhost') ? true : false;

return config; };`

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

bahmutov avatar Apr 11 '22 19:04 bahmutov

@bahmutov

Basically the buttons are there but clicking on them has no effect

https://user-images.githubusercontent.com/57007154/162814354-a18a456d-b5cf-4275-b437-777a3e03bfeb.mp4

borecz avatar Apr 11 '22 19:04 borecz

i have the same problem

stokrattt avatar Apr 13 '22 11:04 stokrattt

I have the same issue after trying this package today. Maybe related to React version? Basing that off from a ReactDOM.render error I can see on the browser console. When I click the buttons, it triggers off an error in the format:

The task 'skipTests' was not handled in the setupNodeEvents method. The task 'onlyTests' was not handled in the setupNodeEvents method.

Not sure if that helps, but here's a screenshot of what I can see:

SCR-20231202-o26

Note: I'm using Cypress v13.6.0.

jasonogayon avatar Dec 02 '23 09:12 jasonogayon

:tada: This issue has been resolved in version 1.2.19 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar May 09 '24 00:05 github-actions[bot]