stale-optician-85950
10/28/2022, 8:59 AMhttps://
is always removed, then simple JS split string will do url.split('https:/')[1];
etc
Or use JS new URL() like: `const url = new URL(${originalUrl}
).host;` might be safer.
https://developer.mozilla.org/en-US/docs/Web/API/URL
https://docs.cypress.io/api/commands/location#No-Args
You'd need to set a parameter in your CI workflow and code to specify when to use the CI URL vs the local URL i.e. CYPRESS_RUN_ENV=ci, then use `const url = new URL(${originalUrl}
).host;`limited-soccer-30880
10/28/2022, 10:14 AMagreeable-doctor-59104
10/28/2022, 10:35 AMwonderful-gold-43470
10/28/2022, 11:15 AMValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration has an unknown property '20'. These properties are valid:
object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry?, experiments?, externals?, externalsPresets?, externalsType?, ignoreWarnings?, infrastructureLogging?, loader?, mode?, module?, name?, node?, optimization?, output?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, snapshot?, stats?, target?, watch?, watchOptions? }
-> Options object as provided by the user.
For typos: please correct them.
For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.
Loaders should be updated to allow passing options via loader options in module.rules.
Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
plugins: [
new webpack.LoaderOptionsPlugin({
// test: /\.xxx$/, // may apply this only for some modules
options: {
20: …
}
})
]
This is my cypress.config.ts file
import { defineConfig } from 'cypress';
import * as dan from './cypress/plugins';
export default defineConfig({
retries: 3,
chromeWebSecurity: false,
viewportWidth: 1920,
viewportHeight: 1080,
video: false,
projectId: 'xxxxx',
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return dan(on, config);
},
baseUrl: 'http://localhost:3003',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
component: {
devServer: {
framework: 'react',
bundler: 'webpack',
webpackConfig: 'webpack-dev.config.js',
},
},
});
webpack version is 5.74
cypress version is 10.10.0
I have tried the solution presented in the error message, as well as the top couple of stackoverflow threads, without any luck.
Thanks in advance for the help!abundant-dentist-45237
10/28/2022, 1:14 PMmysterious-belgium-25713
10/28/2022, 1:37 PMrefined-raincoat-56329
10/28/2022, 1:52 PMflaky-horse-36126
10/28/2022, 2:19 PMincalculable-nightfall-21641
10/28/2022, 2:29 PMjs
const webpackPreprocessor = require('@cypress/webpack-preprocessor')
module.exports = (on) => {
const options = {
// send in the options from your webpack.config.js, so it works the same
// as your app's code
webpackOptions: require('../../webpack.config'),
watchOptions: {},
}
on('file:preprocessor', webpackPreprocessor(options))
}
so i want to use above code on latest version of cypress which has cypress.config.js file like this
js
const { defineConfig } = require("cypress");
const webpack = require('@cypress/webpack-preprocessor')
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
`
how do i update above code to use webpack as i used in first older version of cypressrefined-raincoat-56329
10/28/2022, 2:43 PMbright-twilight-69276
10/28/2022, 2:58 PMgifted-coat-49959
10/28/2022, 4:29 PMgifted-coat-49959
10/28/2022, 6:02 PMhappy-megabyte-98400
10/28/2022, 6:42 PMgifted-coat-49959
10/28/2022, 6:50 PMstale-optician-85950
10/28/2022, 8:09 PMgray-kilobyte-89541
10/28/2022, 8:21 PMcalm-cat-93166
10/30/2022, 5:39 PMgray-kilobyte-89541
10/30/2022, 8:03 PMcalm-cat-93166
10/30/2022, 8:20 PMhundreds-spoon-43121
10/30/2022, 10:22 PMhundreds-spoon-43121
10/30/2022, 11:22 PMhundreds-spoon-43121
10/31/2022, 3:27 AMpolite-dinner-16339
10/31/2022, 8:36 AMvictorious-father-41976
10/31/2022, 9:08 AMminiature-architect-15391
10/31/2022, 12:05 PMfew-hamburger-16304
10/31/2022, 1:34 PMmysterious-kitchen-59722
10/31/2022, 1:46 PMbig-monitor-24414
10/31/2022, 2:00 PM// Simplified example
cy.contains('label', 'Label Name')
.invoke('attr', 'for')
.then((name) => {
cy.get(`input[name="${name}"]`)
.click({ force: true})
// .trigger('click') does not work any better
})
.wait(2000) // wait for the dropdown to open
Does anyone else have problems with failing click event? How do I fix this? I'm trying to find dropdown element by it's label. The dropdown element has input element that opens a list of elements on click: https://jquense.github.io/react-widgets/docs/DropdownListdry-portugal-25841
10/31/2022, 2:34 PM.should('be.visible')
before click