cuddly-kitchen-97815
10/26/2022, 6:07 PMmillions-raincoat-21090
10/26/2022, 6:45 PMfresh-doctor-14925
10/26/2022, 6:52 PMexperimentalSessionAndOrigin
flag, it will.
Some reading material: https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Test-Isolationmillions-raincoat-21090
10/26/2022, 6:52 PMmillions-raincoat-21090
10/26/2022, 7:34 PMfuture-gold-77198
10/26/2022, 8:11 PMcuddly-kitchen-97815
10/26/2022, 8:29 PMfuture-gold-77198
10/26/2022, 8:33 PMcuddly-kitchen-97815
10/26/2022, 8:33 PMfuture-gold-77198
10/26/2022, 8:34 PMcuddly-kitchen-97815
10/26/2022, 8:34 PMfuture-gold-77198
10/26/2022, 8:35 PMhundreds-spoon-43121
10/26/2022, 9:24 PMhundreds-spoon-43121
10/26/2022, 9:28 PMlittle-quill-7630
10/27/2022, 2:33 AMts
it('should correctly parse sort order when loading existing aqs', () => {
cy.intercept('api/aqs/join*', (req) => {
cy.wrap(req).its('body.aqs.properties.sortInfo.sortOrder').should('equal', 'Descending');
cy.log('tested');
}).as('aqsJoinIntercept');
openDataExplorer(); // Gets to correct place in UI
loadSavedQuery(); // Searches for existing aqs and initalises the aqs join ajax request to the api and then ensures the search dialog has been removed.
// cy.wait('@aqsJoinIntercept');
});
But, you will see I have commented out cy.wait('@aqsJoinIntercept')
..
When I have this in my code, the test fails with the error (attached image).
And I have no idea what it means or what I am supposed to do about it.
The reason I have added this cy.wait
is because originally I messed up the intercept and only checked for api/aqs/join
and not considered the query strings. But the test 'passed' because it NEVER intercepted the request. Which was BAD...
After reading, I believed
the solution was to cy.wait()
the request had been intercepted..
Any advice would be welcome.echoing-painting-40909
10/27/2022, 5:26 AMbillowy-smartphone-68952
10/27/2022, 5:43 AMcy.on('window:confirm', (str) => {
expect(str).to.equal('Hello , Are you sure you want to confirm?')
})
But I get an error if I use should instead of expect, like this:
cy.on('window:confirm', (str) => {
expect(str).to.equal('Hello , Are you sure you want to confirm?')
})
Why is the 2nd one throwing an error?billowy-smartphone-68952
10/27/2022, 5:43 AMgray-father-52711
10/27/2022, 5:47 AMbillowy-smartphone-68952
10/27/2022, 5:55 AMminiature-architect-15391
10/27/2022, 6:47 AMlittle-quill-7630
10/27/2022, 7:43 AMcy.wrap(str).should('equal', 'Blarblar');
echoing-painting-40909
10/27/2022, 8:35 AMstale-optician-85950
10/27/2022, 9:00 AMit.only('Highcharts full screen', () => {
cy.setCookie(
'CookieConsent',
'{stamp:%274iW40LjHSz/vj5fF4Rso58eW1qHOn0GOA3PGSfLSi1hIkls0jI1BdA==%27%2Cnecessary:true%2Cpreferences:true%2Cstatistics:true%2Cmarketing:true%2Cver:3%2Cutc:1666859233865%2Cregion:%27hu%27}'
);
cy.visit('/');
cy.get('[title="Chart context menu"]').click();
cy.get('[class="highcharts-menu-item"]').contains('View in full screen').realClick();
cy.screenshot();
});
Run npx cypress run --browser electron --config baseUrl=https://www.highcharts.com/demo/line-basic
and the screenshot chart will show as Full Screen.
But run npx cypress run --browser chrome --config baseUrl=https://www.highcharts.com/demo/line-basic
and the screenshot shows that Full Screen was ignored.
I'm wondering if there is a browser argument that disabling this! š¤wooden-megabyte-23794
10/27/2022, 9:02 AMstale-optician-85950
10/27/2022, 9:07 AMcy.log('Browser info', Cypress.browser);
for the browser object.
Then you can use:
cy.log('Browser name', Cypress.browser.name);
cy.log('Browser version', Cypress.browser.majorVersion);
incalculable-nightfall-21641
10/27/2022, 9:35 AMincalculable-nightfall-21641
10/27/2022, 9:35 AMjs
Error: Webpack Compilation Error
./views/Pages/Login.js
Module not found: Error: Can't resolve 'NewContext.js.js' in 'C:\Arun\Main\current_apps\src\views\Pages'
resolve 'NewContext.js.js' in 'C:\Arun\Main\current_apps\src\views\Pages'
Parsed request is a module
using description file: C:\Dori\Main\current_apps\package.json (relative path: ./src/views/Pages)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
C:\Arun\Main\current_apps\src\views\Pages\node_modules doesn't exist or is not a directory
C:\Arun\Main\current_apps\src\views\node_modules doesn't exist or is not a directory
C:\Arun\Main\current_apps\src\node_modules doesn't exist or is not a directory
C:\Arun\Main\node_modules doesn't exist or is not a directory
C:\Arun\node_modules doesn't exist or is not a directory
C:\node_modules doesn't exist or is not a directory
looking for modules in C:\Dori\Main\current_apps\node_modules
using description file: C:\Dori\Main\current_apps\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Dori\Main\current_apps\package.json (relative path: ./node_modules/NewContext.js.js)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Dori\Main\current_apps\node_modules\NewContext.js.js doesn't exist
.js
how to change path configuration , so cypress can point to src directoryprehistoric-plastic-4224
10/27/2022, 9:57 AMincalculable-rainbow-43330
10/27/2022, 10:29 AM