https://cypress.io logo
Join DiscordCommunities
Powered by
# e2e-testing
  • w

    wide-waiter-58637

    08/31/2022, 2:57 PM
    I placed a wait but still throws that error
  • c

    chilly-quill-34099

    08/31/2022, 3:07 PM
    The striked out origins are the same?
  • w

    wide-waiter-58637

    08/31/2022, 3:09 PM
    no they are not
  • w

    wide-waiter-58637

    08/31/2022, 3:11 PM
    I get redirected to that.
  • c

    chilly-quill-34099

    08/31/2022, 3:14 PM
    There lies the problem, I guess. Are you using the
    experimentalSessionAndOrigin: true
    flag in your
    cypress.config.*
    ?
  • c

    chilly-quill-34099

    08/31/2022, 3:16 PM
    Originally Cypress was not meant to test other than one origin, as far as I know. They are starting to make it possible, currently by adding the flag.
  • w

    wide-waiter-58637

    08/31/2022, 3:20 PM
    I am not sure of that.
  • w

    wide-waiter-58637

    08/31/2022, 3:21 PM
    Please excuse my ignorance. I am new to Cypress and I have been using it for only 2 months now.
  • w

    wide-waiter-58637

    08/31/2022, 3:23 PM
    i currently do have it.
  • w

    wide-waiter-58637

    08/31/2022, 3:23 PM
    how can i get around this?
  • w

    wide-waiter-58637

    08/31/2022, 3:30 PM
    @chilly-quill-34099
  • c

    chilly-quill-34099

    08/31/2022, 3:35 PM
    I think you have to add
    experimentalSessionAndOrigin: true
    in the same level of
    setupNodeEvents
    .
  • c

    chilly-quill-34099

    08/31/2022, 3:36 PM
    Same here 😅
  • w

    wide-waiter-58637

    08/31/2022, 3:37 PM
    let me try that.
  • c

    chilly-quill-34099

    08/31/2022, 3:42 PM
    I think you might have to make yourself also familiar with
    cy.origin
    and
    cy.session
    . I have looked into that topic only briefly, so I might not be able to help you out furthermore.
  • w

    wide-waiter-58637

    08/31/2022, 3:42 PM
    ok will do.
  • w

    wide-waiter-58637

    08/31/2022, 3:42 PM
    thanks for your help
  • w

    wide-waiter-58637

    08/31/2022, 5:12 PM
    @chilly-quill-34099
  • w

    wide-waiter-58637

    08/31/2022, 5:12 PM
    I added that but it didn't work.
  • w

    wide-waiter-58637

    08/31/2022, 5:13 PM
    In my case, I am trying to run just one script not multiple scripts.
  • s

    stale-optician-85950

    08/31/2022, 6:26 PM
    That
    experimentalSessionAndOrigin
    flag is incorrectly placed in your image. Move outside of
    setupNodeEvents
    Copy code
    e2e: {
        baseUrl: 'http://localhost:3000',
        experimentalSessionAndOrigin: true,
    
        setupNodeEvents: async (on, config) => {
  • w

    wide-waiter-58637

    08/31/2022, 6:36 PM
    ok thank you.
  • w

    wide-waiter-58637

    08/31/2022, 6:43 PM
    works like a charm. Thank you so very much.
  • s

    stale-optician-85950

    08/31/2022, 7:19 PM
    @wide-waiter-58637 for the record, all Cypress code runs within the browser. If you want to run Node specific code, it is placed inside:
    Copy code
    setupNodeEvents: async (on, config) => {
    ... this tells Cypress this is code that does Not run on the browser i.e. query DB Cypress configuration options are different in that they represent your unique settings for running Cypress. These are key-value pairs i.e
    experimentalSessionAndOrigin: true,
    and are documented here https://docs.cypress.io/guides/references/configuration You can view all your unique settings when running
    cypress open
    UI > Settings > Project Settings That is why moving that configuration flag solved your problem.
  • w

    wide-waiter-58637

    08/31/2022, 7:20 PM
    Thank you once again.
  • w

    wide-waiter-58637

    08/31/2022, 7:46 PM
    @stale-optician-85950 Since I set my config file to experimentalSessionAndOrigin:true, one of my test is failing. By fail I mean, when the click event occurs nothing happens.
  • m

    mysterious-motherboard-13344

    09/01/2022, 5:23 AM
    was that test passing before you implemented experimentalSessionAndOrigin:true?
  • h

    happy-dinner-13480

    09/01/2022, 7:42 AM
    didn't get any replies yesterday so i'll try again. Our CI can sometimes be quite slow causing tests to fail on the CI and not on our dev env. I've been thinking on increasing the default timeout values, would anyone advice against that?
  • h

    helpful-queen-71488

    09/01/2022, 9:34 AM
    Hi everyone, I have a problem with changing url in the same process (without changing tab) so a dynamic url. except I get this error when I get to this step. If someone has the solution 😉
  • s

    stale-optician-85950

    09/01/2022, 9:38 AM
    To turn off all uncaught exception handling https://docs.cypress.io/api/events/catalog-of-events#Uncaught-Exceptions
1...939495...192Latest