cold-doctor-52849
04/05/2022, 8:51 AMCypress.Commands.overwrite('visit', (originalFn, url, options) => {
options.headers = {'CYPRESS_TOKEN': token}
return originalFn(url, options)
})
Cannot set properties of undefined (setting 'headers')
when I add the header option to the plain cy.visit without overwriting anything, I get this:
The following error originated from your application code, not from Cypress.
> $ is not defined
cold-doctor-52849
04/05/2022, 9:52 AMcy.intercept("/**", (req) => {
req.headers["CYPRESS_TOKEN"] = token
})
better-engineer-26463
04/05/2022, 11:35 AMthankful-mechanic-47958
04/05/2022, 10:02 PMSend All
(Attempt 1 of 3) should show a dialog on selected
(Attempt 1 of 3) should show a dialog on selected
future-eye-56254
04/06/2022, 9:11 AMtall-animal-48628
04/06/2022, 1:19 PMred-smartphone-4834
04/07/2022, 7:44 AMpowerful-orange-86819
04/07/2022, 8:31 AMpowerful-orange-86819
04/07/2022, 8:34 AMjs
Cypress.Commands.add("userLogin", (username, password) => {
const env = Cypress.env();
const options = {
method: "POST",
url: env.apiUrl,
body: {
username: username,
password: password,
},
};
cy.request(options).then((response) => {
env.tokens[`${username}`] = response.body.access_token;
Cypress.env(env);
});
});
green-ram-60124
04/07/2022, 8:39 AM/
and find the content of an h1
tag.
The page opens a few gRPC streams and in Cypress I can see the data being fetched, but the stream POST requests appear loading, never marking resulting in a timeout as the page fails to load completely (which is actually not the case).
Does anybody know how to avoid or skip this loading states for the gRPC streams?~~sticky-exabyte-72626
04/07/2022, 1:40 PMgreen-ram-60124
04/07/2022, 2:39 PMgreen-ram-60124
04/07/2022, 2:41 PM.then(options, callbackFn)
where you can pass an object to options with the timeout
value.sticky-exabyte-72626
04/07/2022, 2:45 PMdone().then({ timeout: 2000 })
?sticky-exabyte-72626
04/07/2022, 2:45 PMgreen-boots-72737
04/08/2022, 2:28 PMYour system is missing the dependency: Xvfb
Install Xvfb and run Cypress again.
But I am running Cypress from the offical Cypress container cypress/base:12
. (https://hub.docker.com/r/cypress/base)
The docs for this say "*Docker images that include all operating system dependencies necessary to run Cypress, but NOT Cypress itself and no pre-installed browsers.*" so how can Xvfb not be installed?stale-orange-69593
04/08/2022, 10:07 PMfuture-eye-56254
04/09/2022, 10:28 AMfuture-eye-56254
04/09/2022, 10:35 AMproud-room-838
04/10/2022, 9:17 AMdeclare namespace Cypress {
interface Chainable {
in index.d.ts (see here for reference what I mean https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/fundamentals__add-custom-command-ts/cypress/support/index.d.ts)where I actually want to jump to where the method really is declared in index.d.ts. Any idea how to solve this?powerful-orange-86819
04/11/2022, 6:43 AMfuture-eye-56254
04/11/2022, 7:14 AMpurple-action-61464
04/11/2022, 7:43 AMpurple-action-61464
04/11/2022, 8:01 AMfancy-laptop-20632
04/11/2022, 8:09 AMgray-kilobyte-89541
04/11/2022, 10:38 AMnumerous-kangaroo-93739
04/11/2022, 2:17 PMstale-orange-69593
04/11/2022, 2:23 PMmagnificent-finland-58048
04/11/2022, 3:13 PM