cold-island-71759
05/24/2023, 3:14 PMfreezing-activity-66869
05/24/2023, 4:41 PMswift-tiger-94189
05/24/2023, 7:50 PMRecorded Run: https://cloud.cypress.io/projects/{projectId}/runs/{runNumber}
. I would like to put that url in my report.
E.G.:
class MyCustomReporter {
constructor(runner, options) {
runner.once(EVENT_RUN_BEGIN, () => {
console.log('start');
// I'd like to log it here. If I know how to log it here, I can put it where i need it to go.
console.log(`RunUrl:${SomeRunUrl}`);
})
}
}
powerful-camera-26936
05/25/2023, 2:35 AMhttps://cdn.discordapp.com/attachments/1111120414022832158/1111122195641553016/image.png▾
https://cdn.discordapp.com/attachments/1111120414022832158/1111122195951923261/image.png▾
cuddly-room-47340
05/25/2023, 3:55 AMcareful-terabyte-63440
05/25/2023, 8:07 AMcy.intercept
to intercept a route that contains some query
parameters, but it is not behaving as I am expected. It is intercepting all the routes defined by pathname
, but not query
.
I experience the issue with the following scenario:
I have the following url which I am intercepting
- /json-api/demo/tasks
This url can have 2 different query parameters:
- filter[status]: open
- filter[completed]: true
I want to intercept all the route for /json-api/demo/tasks?filter[status]=open
(/json-api/demo/tasks?filter%5Bstatus%5D=open
)
I intercept
the route using the following options 👇
cy.intercept({
pathname: '/json-api/demo/tasks',
query: { 'filter[status]': 'open' },
}).as('openTasks');
Looking at the E2E test and the Cypress console, the alias @openTasks
gets attached to the following URLs
- /json-api/demo/tasks?filter%5Bstatus%5D=open
- /json-api/demo/tasks?filter%5Bcompleted%5D=true
The problem with this behavior is that when I invoke cy.wait(@openTasks)
, it waits for the wrong request to complete before continuing
Replacing the pathname
and query
with path
seems to work, the following options aliases routes properly
cy.intercept({
path: /\/json-api\/demo\/tasks\?.*filter%5Bstatus%5D=open/,
}).as('openTasks');
I did find a Github issue that resembles the problem I run into (https://github.com/cypress-io/cypress/issues/16686), but it is a ~so-so quality ticket.
I would like to be able to intercept the route using pathname
and query
, where am I messing up? 😅
Thank you 🙏cold-bird-96191
05/25/2023, 9:47 AMhttps://cdn.discordapp.com/attachments/1111229023180312596/1111229023406796841/Screenshot_60.png▾
polite-glass-8571
05/25/2023, 10:31 AMwww.mysite.com
I have a ssl certificate for this website that I have installed on my mac
I have a local reverse proxy that uses a trusted certificate, I can visit www.mysite.com
on a regular browser and it will show that the connection is trusted and secure ( green lock)
Due to cypress using its own proxy, it provides its own certificate when connecting to www.mysite.com
which is not installed on my mac, therefore the connection is marked as non-secure (red lock).
I have a script that runs on the app that I cannot modify and relies on being on that particular domain (www.mysite.com
) and having a secure connection ( green lock ).
Now, I am trying to separate requests that need to be proxied by cypress and the ones that don't through a PAC file, supplied as an option on before:browser:launch
but I only managed to have Cypress show a message "This browser was not launched through Cypress. Tests cannot run.".
Do you have any suggestions on how to solve this? I'm banging my head trying to make it workechoing-forest-11433
05/25/2023, 12:46 PMdescribe('<CategorySelector />', () => {
it('renders', () => {
cy.mount(<CategorySelector />)
// Wait for Font Awesome icons to load
cy.get('.fa-users', { timeout: 10000 }).should('have.length.gt', 0)
})
})
I appreciate any and all help with this!!victorious-television-13561
05/25/2023, 1:18 PMhttps://cdn.discordapp.com/attachments/1111282230610899054/1111282230912884746/Screenshot_2023-05-25_101454.png▾
https://cdn.discordapp.com/attachments/1111282230610899054/1111282231219077120/Screenshot_2023-05-25_101430.png▾
great-furniture-24480
05/25/2023, 2:09 PMbrave-doctor-62978
05/25/2023, 2:13 PMwide-quill-11523
05/25/2023, 4:48 PMdescribe(
"description",
() => {
it("Login", () => {
cy.visit('https://url.company.com/sites/test_regression/members/Preferences/ContactInformationStep')
cy.get('#Username').type('someUser')
cy.get('#Password').type('somepassword')
cy.get('button.button-submit').click()
});
}
);
Have the following test case. Navigation to the visit site redirects to a login site on the same domain, which then redirects back to the original page.
After doing so I get about 2 seconds of the ContactInformationSetup page before cypress crashes. It gives a stack trace where the first lines are
Parser can work only with string streams.
TypeError: Parser can work only with string streams.
at a._transform (:4614:132981)
None of this stack references anything in my code, and the test case is as trimmed down as I can get it. Let me know if the full stack would help further?freezing-activity-66869
05/25/2023, 6:47 PMwooden-kitchen-45804
05/25/2023, 7:23 PMambitious-monkey-72386
05/26/2023, 3:27 AMambitious-monkey-72386
05/26/2023, 3:30 AMproud-engine-17504
05/26/2023, 7:46 AMhttps://cdn.discordapp.com/attachments/1111560914810970122/1111560915045842945/Screenshot_2023-05-26_at_3.45.39_PM.png▾
calm-translator-52
05/26/2023, 10:31 AMhttps://cdn.discordapp.com/attachments/1111602492149596160/1111602492170571816/Screenshot_2023-05-26_135811.png▾
https://cdn.discordapp.com/attachments/1111602492149596160/1111602493449846834/Screenshot_2023-05-26_135715.png▾
brash-appointment-91676
05/26/2023, 12:31 PMcypress open
.
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.2.15-300.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-9300H CPU @ 2.40GHz
Memory: 15.4 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1650/PCIe/SSE2alert-translator-5029
05/26/2023, 12:39 PMthousands-refrigerator-44194
05/26/2023, 1:03 PMhttps://cdn.discordapp.com/attachments/1111640807955513484/1111640808416878673/image.png▾
https://cdn.discordapp.com/attachments/1111640807955513484/1111640808765014107/image.png▾
bumpy-insurance-8581
05/26/2023, 1:52 PMcypress open
commands, ads are loading on the page. But when I use cypress run
ads are not loading (so my test to check if ads appear or not fail)brash-appointment-91676
05/26/2023, 3:25 PMts
export const testConstant = "initial"
test file:
ts
import * as testExports from "./index.ts";
it("changes the module", () => {
cy.stub(testExports, "testConstant")
.value("VALUE")
expect(testExports.testConstant).to.eq("VALUE")
})
Result:
js
TypeError: Cannot redefine property: testConstant
at Function.defineProperty (<anonymous>)
at Object.value (/__cypress/runner/cy…runner.js:129024:16)
at proto.<computed> [as value] (/__cypress/runner/cy…runner.js:128601:12)
at Function.<anonymous> (/__cypress/runner/cy…runner.js:128594:46)
at runnable.fn (/__cypress/runner/cy…runner.js:160854:19)
at callFn (/__cypress/runner/cy…runner.js:114387:21)
at ../driver/node_modules/mocha/lib/runnable.js.Runnable.run (/__cypress/runner/cy…_runner.js:114374:7)
at <unknown> (/__cypress/runner/cy…runner.js:167842:30)
at PassThroughHandlerContext.finallyHandler (/__cypress/runner/cy…_runner.js:15298:23)
at PassThroughHandlerContext.tryCatcher (/__cypress/runner/cy…_runner.js:18744:23)
at Promise._settlePromiseFromHandler (/__cypress/runner/cy…_runner.js:16679:31)
at Promise._settlePromise (/__cypress/runner/cy…_runner.js:16736:18)
at Promise._settlePromise0 (/__cypress/runner/cy…_runner.js:16781:10)
at Promise._settlePromises (/__cypress/runner/cy…_runner.js:16861:18)
at Promise._fulfill (/__cypress/runner/cy…_runner.js:16805:18)
at Promise._settlePromise (/__cypress/runner/cy…_runner.js:16749:21)
at Promise._settlePromise0 (/__cypress/runner/cy…_runner.js:16781:10)
at Promise._settlePromises (/__cypress/runner/cy…_runner.js:16861:18)
at Promise._fulfill (/__cypress/runner/cy…_runner.js:16805:18)
at Promise._resolveCallback (/__cypress/runner/cy…_runner.js:16599:57)
at Promise._settlePromiseFromHandler (/__cypress/runner/cy…_runner.js:16691:17)
powerful-byte-16452
05/26/2023, 7:40 PMdamp-farmer-22658
05/26/2023, 8:17 PMfull-helmet-93291
05/27/2023, 3:47 PMcuddly-room-47340
05/27/2023, 4:08 PMjs
const { defineConfig } = require("cypress")
const nodemailer = require("nodemailer")
const mg = require("nodemailer-mailgun-transport")
require('dotenv').config()
const mailgunAuth = {
auth: {
api_key: process.env.MAILGUN_API_KEY,
domain: "mydomain.com"
}
}
const transport = nodemailer.createTransport(mg(mailgunAuth))
module.exports = defineConfig({
projectId: 'XXX',
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
require('cypress-email-results')(on, config, {
email: [
'test@example.com',
],
emailOnSuccess: false,
dry: true,
transport,
})
},
video: false,
viewportWidth: 1280,
viewportHeight: 720,
});
Any idea how to fix it?cuddly-room-47340
05/28/2023, 7:09 AMcolossal-table-38461
05/28/2023, 2:29 PMhttps://cdn.discordapp.com/attachments/1112387124696715395/1112387124969349180/IMG_20230528_194928.jpg▾
https://cdn.discordapp.com/attachments/1112387124696715395/1112387125497823232/IMG_20230528_195151.jpg▾