helpful-tent-74010
09/01/2022, 5:06 AM<ParentComponent><Child-1 /><Child-2 /></ParentComponent>
If I want to mock Child-2 while running component test, whats the best way to do it.most-jackal-31319
09/01/2022, 6:10 AMthankful-vegetable-38026
09/01/2022, 6:51 AMdelightful-microphone-80931
09/01/2022, 10:03 AMdelightful-microphone-80931
09/01/2022, 10:16 AMastonishing-postman-6253
09/01/2022, 11:03 AMgentle-dress-1046
09/01/2022, 12:49 PM- test (cypress)
- web
- client(angular project)
When I try to run cypress component tests it cant find the project root directory because it searches for in only from the Test
folder, so I tried to configure it through the config like this:
options: {
projectConfig: {
root: '../web',
sourceRoot: 'client/src'
}
that fixes the couldn't find the angular project, but gives me other errors related to buildOptions
parameter, so basically if I want to override the sourceRoot and root I also need to provide buildOptions which is a huge object that I'm not sure how to handle, does anyone had something similar and can help?aloof-caravan-18471
09/01/2022, 1:25 PMcypress run --browser chrome
and I want the browser to use French.
I tried many after googled it but I can't make it works.
Here's my current setup :
js
cy.visit('/', {
onBeforeLoad(win) {
Object.defineProperty(win.navigator, 'language', { value: 'fr-FR' });
Object.defineProperty(win.navigator, 'languages', { value: ['fr'] });
Object.defineProperty(win.navigator, 'accept_languages', {
value: ['fr'],
});
},
headers: {
'Accept-Language': 'fr',
},
});
But still got this error :stale-optician-85950
09/01/2022, 2:07 PMaloof-caravan-18471
09/01/2022, 2:34 PMaverage-train-81585
09/01/2022, 5:15 PMmost-jackal-31319
09/02/2022, 3:57 AMmost-jackal-31319
09/02/2022, 4:07 AMstale-optician-85950
09/02/2022, 6:09 AMfierce-beach-68131
09/02/2022, 8:44 AMadorable-nest-81107
09/02/2022, 9:22 AMcy.<something>()
we should NOT use async/await (as Cypress' internal work queue handles it)
When creating our own commands, we SHOULD use async/await
Thanks!stale-optician-85950
09/02/2022, 10:41 AMthankful-vegetable-38026
09/02/2022, 12:46 PMacceptable-hamburger-48790
09/02/2022, 12:48 PMthankful-vegetable-38026
09/02/2022, 12:50 PMthankful-vegetable-38026
09/02/2022, 12:51 PMgray-kilobyte-89541
09/02/2022, 2:07 PMadorable-nest-81107
09/02/2022, 2:08 PMproud-hydrogen-75341
09/02/2022, 2:32 PMcomponent-index.html
file is located for component testing or does it have to be in the cypress/support folder?proud-hydrogen-75341
09/02/2022, 7:59 PMpolite-room-86985
09/02/2022, 9:32 PMpolite-room-86985
09/02/2022, 9:33 PMpolite-room-86985
09/02/2022, 9:34 PMpolite-room-86985
09/02/2022, 9:37 PMuser
09/03/2022, 12:16 PM