prehistoric-restaurant-72560
08/24/2022, 3:37 PMgray-kilobyte-89541
08/24/2022, 3:55 PMfancy-match-96032
08/24/2022, 5:11 PMsetupNodeEvents
in your config filefancy-match-96032
08/24/2022, 5:21 PMCYPRESS_VERIFY_TIMEOUT
on process.env
(if specified)some-family-74013
08/24/2022, 7:04 PMlemon-elephant-47278
08/25/2022, 5:40 AMgreat-furniture-24480
08/25/2022, 5:58 AMdefaultCommandTimeout: your custom timeout,
pageLoadTimeout: your custom timeout,
numTestsKeptInMemory: 0,
then try opening the tests. If the tests are still getting failed, you can run tests using cli and all your test cases will get executed no matter how long it'll take.few-telephone-44543
08/25/2022, 7:37 AMbreezy-fall-63628
08/25/2022, 9:39 AMjs
cypress_runner.js:175201 Uncaught AssertionError: The following error originated from your test code, not from Cypress.
> The following error originated from your test code, not from Cypress. It was caused by an unhandled promise rejection.
> expected 0 to be above 2
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
but my test isn't actually failing. The relevant test code looks like this
js
cy.intercept(`${transactionsUrl}*`, req => {
expect(differenceInDays(new Date(req.query.from), new Date())).to.be.greaterThan(2);
});
I'm basically trying to make my test fail but I can't... even though the assertion fails.polite-alarm-78904
08/25/2022, 10:02 AM`
cy.getBySel("editProfile").click()
cy.get(".v-dialog--active").should("exist")
cy.get('input[type=file]').selectFile('cypress/fixtures/dog.jpeg', { force: true })
cy.get(".v-progress-circular").should("not.exist")
// Submit
cy.getBySel("submitBtn")
.first()
.click({ force: true})
great-furniture-24480
08/25/2022, 10:07 AMCypress.on("uncaught:exception", (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false;
});
breezy-fall-63628
08/25/2022, 10:13 AMbreezy-fall-63628
08/25/2022, 10:13 AMbreezy-fall-63628
08/25/2022, 10:43 AMjs
cy.intercept(`${transactionsUrl}*`).as("transactions");
cy.wait("@transactions").should(({ request }) => {
console.log(request);
const from = new URL(request.url).searchParams.get("from");
expect(differenceInDays(new Date(from), new Date())).to.be.greaterThan(2);
});
seems to work and the tests fails when the assertion is false, perhaps because I'm using cy.wait? Not sureacceptable-hamburger-48790
08/25/2022, 10:47 AMbreezy-fall-63628
08/25/2022, 10:51 AMswift-kitchen-62493
08/25/2022, 11:14 AMswift-kitchen-62493
08/25/2022, 11:15 AMstale-optician-85950
08/25/2022, 12:48 PMcy.get('img').click('right')
glamorous-country-57678
08/25/2022, 2:40 PMicy-airplane-54497
08/25/2022, 2:43 PMlimited-agency-13286
08/25/2022, 5:07 PMmagnificent-author-81922
08/25/2022, 6:49 PMts
import * as fs from 'fs'
import { defineConfig } from "cypress";
export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
on('file:preprocessor', (file) => {
const { filePath, outputPath, shouldWatch } = file
console.log({ filePath, outputPath, shouldWatch })
// we need to output something
const raw = fs.readFileSync(filePath)
console.log(raw)
fs.writeFileSync(outputPath, raw, 'utf8')
return outputPath
})
},
baseUrl: "http://localhost:4201/",
specPattern: "cypress/e2e/**/*.spec.{js,jsx,ts,tsx}",
},
});
fancy-mechanic-10638
08/26/2022, 12:01 AMng add @cypress/schematic
. When I do a yarn run cypress:run
it sees the one default test that tries to open the initial project page. That fails saying it timed out. I'm able to run the app without issue via ng
. I have the app configured for jest, not karma, if that makes any difference.high-nest-12136
08/26/2022, 5:13 AMhigh-nest-12136
08/26/2022, 5:14 AMhelpful-truck-53930
08/26/2022, 6:54 AMstale-optician-85950
08/26/2022, 6:58 AMcypress-recurse
package in that scenario: https://glebbahmutov.com/blog/cypress-recurse/helpful-truck-53930
08/26/2022, 7:49 AMstale-optician-85950
08/26/2022, 8:05 AM