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

    cuddly-gold-42086

    01/04/2023, 11:52 AM
    Hello I have Cypress version 9.6.0 how can i use "cy.session()"? When i try i get this
    Copy code
    cy.session() requires enabling the experimentalSessionAndOrigin flag. The experimentalSessionSupport flag was enabled but was removed in Cypress version 9.6.0.
  • f

    freezing-nest-81773

    01/04/2023, 12:01 PM
    It seems like this would have the exact same result as in the solution I currently have no? I mean if I would just use
    this.skip()
    inside one test. It would work for all the tests itself but not for the whole test suite right? Plus I would have to use an additional plugin so that I could use these
    tags
    or did I understand you wrong?
  • t

    thousands-house-85089

    01/04/2023, 12:04 PM
    https://docs.cypress.io/guides/references/experiments You need to add experimentalSessionAndOrigin flag to true for v9.6.0
  • t

    thousands-house-85089

    01/04/2023, 12:05 PM
    also see this https://docs.cypress.io/guides/references/legacy-configuration
  • t

    thousands-house-85089

    01/04/2023, 12:06 PM
    It would also be good if you can upgrade your project to a newer version of Cypress, there are a lot of changes happening regarding experimental features, as well as numerous bugfixes all the time.
  • c

    cuddly-gold-42086

    01/04/2023, 12:20 PM
    Hi first of all thanks! I add the experimentalSessionAndOrigin flag to true for v9.6.0 for this reason the message says: "The experimentalSessionSupport flag was enabled but was removed in Cypress version 9.6.0" My company doesn't want to upgrade the project to a newer version of Cypress, at this moment
  • c

    chilly-magician-65885

    01/04/2023, 12:24 PM
    Urgent: npx cypress open throws "couldn't find tsconfig.json. tsconfig-paths will be skipped" But i am not using typescript, only working on javascript. Node version: v17.9.1 Cypress version: ^12.3.0
  • c

    cuddly-gold-42086

    01/04/2023, 12:27 PM
    Indeed there is no option for experimentalSessionAndOrigin in this document: https://docs.cypress.io/guides/references/experiments#Configuration there was this option, but i think they removed it
  • g

    gray-kilobyte-89541

    01/04/2023, 12:39 PM
    I would look at the plugin's documentation
  • f

    freezing-nest-81773

    01/04/2023, 12:51 PM
    I did and I think you are talking about this part right here am I right? If yes. I think this solution is much more complex than just specifying the spec's I want to skip inside the
    excludeSpecPattern
    the problem with that is that the specs dont show up in the reporter as skipped like that... Plus if I used the plugin I would need to add a tag to every test in every suite that I want to run that would also take much more time than just excluding the specs.
  • g

    gray-kilobyte-89541

    01/04/2023, 12:59 PM
    You could tag the top-level suite of tests and then skip / run only those tests and even pre-filter the specs. The plugin is pretty flexible.
  • h

    helpful-quill-61406

    01/04/2023, 1:17 PM
    Urgent: Hello Everyone, i'm using cypress with cucumber and using "multiple-cucumber-html-reporter " dependency to generate the reports....i have a step in background and few scenarios in one feature file, if my background is failing i want to show other test steps as failed ..please let mw know how to achieve this
  • f

    freezing-nest-81773

    01/04/2023, 1:25 PM
    Ok thank this seems like a better option that I will try. But anyways I still think there should be base functionality for skipping a whole test suite based on the environment 😉
  • t

    thousands-house-85089

    01/04/2023, 3:00 PM
    I don't know what to say then 🙂 If it was removed in your version of Cypress, and there are now 3 major versions higher where those features came out of experimental, it would be good to make your company aware that this is going to be a limitation on the current version you are using.
  • t

    thousands-house-85089

    01/04/2023, 3:01 PM
    I'm also on 12.3.0, do not use tsconfig.json, and
    npm cypress open
    works fine for me. Can you provide any more info?
  • c

    cuddly-gold-42086

    01/04/2023, 3:02 PM
    Thanks @thousands-house-85089 , Which version of Cypress would you say its more stable?
  • t

    thousands-house-85089

    01/04/2023, 3:06 PM
    Personally I've not had any stability issues using any version. If you (hopefully) use version control, you could create a branch and attempt upgrading to the latest 12.3.0 and see if it works. If not, then you could revert and incrementally upgrade v10 > v11 > v12 to work through any issues. Just bear in mind that v9 > v10 makes some fundamental changes to project structure and file types, so read the v10 upgrade notes very carefully. 10 > 11 > 12 was no issue at all for me.
  • c

    chilly-magician-65885

    01/04/2023, 3:08 PM
    I am installing it on CentOS and installed required dependencies for linux. Also, working through SSH. Does node version 17 cause the issue, because it is at the end of life?
  • t

    thousands-house-85089

    01/04/2023, 3:13 PM
    I'm using node v16.14.2, it's still under LTS afaik
  • t

    thousands-house-85089

    01/04/2023, 3:18 PM
    @cuddly-gold-42086 https://docs.cypress.io/guides/references/migration-guide (and on right-hand side for different versions)
  • c

    chilly-magician-65885

    01/04/2023, 3:33 PM
    Okay, thank you. What are the possible reasons for tsconfig not found error
  • t

    thousands-house-85089

    01/04/2023, 3:37 PM
    Honestly no idea, sorry. If it were me I would perhaps try downgrading to Cypress v11 and see if it still causes it, to at least rule out being the version causing it.
  • n

    narrow-artist-87113

    01/04/2023, 4:07 PM
    I wrote a test: cy.get('[data-testid="deploy-details-heading-text"]') .should("have.text", "SMART CONTRACT") .or("have.text", "STATIC SITE"); it is to test, we assert correct, condition, that the text should be "SMART CONTRACT" or "STATIC SITE". But i am receiving error:
  • g

    gray-helmet-2693

    01/04/2023, 4:09 PM
    hello everyone im trying to test api's using cypress im using
    cy.exec('request')
    is there a way for me to test the response, i want to make sure the code is 200 and the response body is not empty
  • g

    gray-kilobyte-89541

    01/04/2023, 4:10 PM
    there is no
    or
    command, see https://on.cypress.io/api for what you are trying to do, you might like https://glebbahmutov.com/cypress-examples/9.7.0/commands/assertions.html#or-match-using-regular-expression
  • g

    gray-kilobyte-89541

    01/04/2023, 4:10 PM
    I would suggest using
    cy.request
    https://on.cypress.io/request
  • g

    gray-helmet-2693

    01/04/2023, 4:11 PM
    im using cy.exec because im simply copying the request as cURL, that way is much easier
  • r

    ripe-traffic-15039

    01/04/2023, 4:20 PM
    Hello, please, I need help. I've been having this error for 2 days and I can't solve it.
    • 1
    • 6
  • c

    cuddly-gold-42086

    01/04/2023, 4:38 PM
    Thanks!!
  • a

    abundant-tailor-4878

    01/04/2023, 5:09 PM
    Hi team how do you run Tags in @badeball/cypress-cucumber-preprocessor with cypress 12?
1...179180181...192Latest