user
10/22/2021, 10:48 AMfancy-airplane-60156
10/23/2021, 3:20 AMfancy-airplane-60156
10/23/2021, 3:20 AMgray-kilobyte-89541
10/25/2021, 11:53 AMgray-kilobyte-89541
10/25/2021, 2:51 PMfancy-airplane-60156
10/26/2021, 10:01 AMmagnificent-rose-67179
10/27/2021, 11:22 AMmagnificent-rose-67179
10/27/2021, 11:22 AMmagnificent-rose-67179
10/27/2021, 11:22 AMmagnificent-rose-67179
10/27/2021, 12:08 PMcy.findByText("Your project has been created").should("exist");
or
cy.findByLabelText("Project Name").should("not.exist");
which are targeting drawers/snackbars that should show/hidemagnificent-rose-67179
10/27/2021, 12:08 PMmagnificent-rose-67179
10/27/2021, 12:08 PMcy.findByText("Your project has been created").should("exist");
is supposed to be a snackbar that shows after a form submitmagnificent-rose-67179
10/27/2021, 12:09 PMmagnificent-rose-67179
10/27/2021, 12:14 PMmagnificent-rose-67179
10/27/2021, 12:14 PMfuture-journalist-95278
10/29/2021, 12:20 AMError [ERR_REQUIRE_ESM]: Must use import to load ES Module: .../index.js require() of ES modules is not supported.
require() of .../index.js from .../index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename .../index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from .../package.json.
This error comes from this code:
js
const clipboardy = require('clipboardy')
module.exports = (on) => {
on('task', {
getClipboard() {
return clipboard.readSync()
},
})
}
future-journalist-95278
10/29/2021, 12:21 AMimport clipboard from 'clipboardy'
^^^^^^
SyntaxError: Cannot use import statement outside a module
glamorous-monkey-67605
11/02/2021, 7:19 PMglamorous-monkey-67605
11/02/2021, 7:20 PMglamorous-monkey-67605
11/02/2021, 7:20 PMglamorous-monkey-67605
11/02/2021, 7:21 PMglamorous-monkey-67605
11/02/2021, 7:21 PMglamorous-monkey-67605
11/02/2021, 7:21 PMglamorous-monkey-67605
11/02/2021, 7:26 PMgray-kilobyte-89541
11/02/2021, 7:53 PMimportant-river-75795
11/03/2021, 7:51 AMfuture-eye-56254
11/03/2021, 7:52 AMgray-kilobyte-89541
11/04/2021, 11:24 AMwonderful-match-15836
11/05/2021, 1:16 PMfor
attribute of useSetupTask_x
so that it is associated with the radio button. Then selecting and clicking on the label should activate the radio button, and you would not need to select the input itself via the label.
There is also a cy.findByLabelText
command as part of cypress-testing-library (https://testing-library.com/docs/cypress-testing-library/intro/) which is what I typically use for this. It's a handy package to install for some of these common tasks, and does what you are looking for here, so you could either install it or check out the implementation for that kind of selector.