https://cypress.io logo
Join Discord
Powered by
# general-chat
  • q

    quick-wolf-87390

    05/13/2022, 9:42 AM
    Hey all! How can I continue test case after one assertion fails? The test case is stopping after first assertion fails
  • g

    gray-kilobyte-89541

    05/13/2022, 11:12 AM
    https://docs.cypress.io/api/commands/intercept#Command-Log
  • h

    hallowed-barista-46832

    05/13/2022, 12:00 PM
    Hi, How can I test auth for fullstack nextjs/prisma app with cypress? I use http-only cookies for auth.
  • m

    mammoth-fall-22117

    05/13/2022, 2:11 PM
    Hello @hallowed-barista-46832 Altough I am not cypress guru but I believe your questions is too broad.
  • b

    bitter-apple-86316

    05/13/2022, 2:29 PM
    Websocket cypress automation code please
  • b

    bitter-apple-86316

    05/13/2022, 2:29 PM
    In angular app
  • g

    gray-kilobyte-89541

    05/13/2022, 2:33 PM
    Search https://cypress.tips/search for "mock socket"
  • h

    hallowed-barista-46832

    05/13/2022, 3:34 PM
    I wrote a task for seeding database but cypres gives this error. Im using bcrypt library for creating passwords.
  • c

    careful-solstice-12804

    05/13/2022, 7:34 PM
    Have a similar situation where we're running vue frontend with rails backend. Did you ever find any resolution to this?
  • b

    broad-potato-69393

    05/13/2022, 7:38 PM
    Hey hansk - we came up with our own solution. Kinda custom to our specific use-case. Happy to discuss more in private
  • f

    fast-forest-85580

    05/14/2022, 8:40 PM
    Hey... locating an element and asserting its text content is fairly easy:
    cy.get('#user-name-label').should('have.text', 'Your username')
    Now let's say I'm using a translation library like Vue I18n and I don't want to assert the hard-coded text
    Your username
    but the translated content which is contained, for example, in a
    messages.json
    translation file:
    Copy code
    json
    {
      "usernameLabel": "This is your username"
    }
    Does Cypress provide some feature which allows to read the value of the
    usernameLabel
    key for an assertion?
  • a

    adorable-smartphone-87280

    05/14/2022, 9:28 PM
    You might get some benefit from reading this blog post where a random user is picked from a fixture file. https://glebbahmutov.com/blog/fixtures-in-custom-commands/#picking-a-random-user
  • p

    powerful-orange-86819

    05/15/2022, 2:24 PM
    lemme tell you about test ids 😏 https://docs.cypress.io/guides/references/best-practices
  • w

    wonderful-match-15836

    05/15/2022, 10:31 PM
    Nothing builtin, but something like this is my preference in your situation:
    Copy code
    import { defaultMessages } from `someplace/that/exports/the/messages`
    
    cy.contains('label', defaultMessages.usernameLabel) 
    // ^ this replaces the .get() + the .should() in your example
    // just because I like how short contains() is for selector + text assertions
    That
    defaultMessages
    is basically just the parsed JSON that you've already created. Here's an example of how we do that export in Cypress but really whatever way you want to import and set this up for your tests should be fine: https://github.com/cypress-io/cypress/blob/10.0-release/packages/frontend-shared/src/locales/i18n.ts#L15
  • f

    fast-forest-85580

    05/16/2022, 8:14 AM
    Thank you, Mark. That's what I was looking for...
  • e

    elegant-author-50450

    05/16/2022, 11:54 AM
    Hi, i am new here. Where is the right place to ask about a maybe bug in Cypress Dashboard?
  • u

    user

    05/16/2022, 11:58 AM
    I'm also wondering that.
  • a

    adventurous-dream-20049

    05/17/2022, 8:27 PM
    @elegant-author-50450 @User Great question! If it's for the Cypress Cloud, formerly known as the Dashboard, please feel free to to send me a personal message. If it is for the App, formerly know as the Test Runner please refer to #755913900024791046 or #755921564108587038
  • a

    adventurous-rose-66394

    05/17/2022, 11:43 PM
    Hello everyone :D
  • p

    powerful-orange-86819

    05/18/2022, 8:11 AM
    Hey, after run results show a property totalDuration, what is this exactly? seconds? ms? I can't properly calculate them be the same time as the time between start and end from the properties above
  • c

    creamy-minister-50636

    05/18/2022, 12:55 PM
    I have a situation and I'm not sure what is going on. There is a text input field, that accepts numbers. On a button click it sends a GraphQL request, with that number (In string format) as a filter. So, if I do cy.get('input').type("333434322") - everything works. However, if I populate a personalNumber variable with a response from another request and us it to populate the input field - the graphQl will return nothing. In short: cy.get('input').type("234243") - works myNumberasString = response.data.persNo cy.get('input').type(myNumberasString) - no result myNumberasString is not empty, cy.log(typeof myNumberasString) stats it is a string, I tried JSON.stringify(), but that types the number with quotation marks...I tried .replaceAll() to remove the quotations marks...same result The only difference from dev tools is that when I use .type("32434) the filter portion of the request looks like this personalNumber: {equals: "42122197"}, and when i use .type(myNumberasString) it looks like personalNumber: {equals: '42122197'} I have a feeling these quotation marks are giving me trouble, but I can't get around it....
  • c

    colossal-car-90252

    05/18/2022, 2:57 PM
    I made a command to run a saga from cypress with redux-saga. It is not guaranteed that those sagas finish when the test finishes. Is there a way for my command to automatically add the task to a list of tasks so I can then cancel the tasks when the test finishes/fails?
  • a

    ambitious-australia-34009

    05/18/2022, 3:04 PM
    Hi! Glad to see Cypress has a Discord server. By the way, the invite in your Twitter bio doesn't work, but the one in your pinned tweet does.
  • c

    calm-hydrogen-37718

    05/18/2022, 3:41 PM
    @here Please help me out from this situation. I was using Version 9.2.0 then I saw there is an update and I should install the latest version but as I installed the new version 9.6.1 then I faced this Issue.....After clicking on test file....the tests are not executing and I am getting this issue.
  • a

    adventurous-dream-20049

    05/18/2022, 4:47 PM
    Hey @calm-hydrogen-37718, thanks for you question. Kindly re-ask your question in #755921564108587038. Also, please refrain from using @ here. It can get a little loud and I assure you someone will help as soon as they can! 😄 Thanks so much!
  • a

    adventurous-dream-20049

    05/18/2022, 4:48 PM
    Thanks so much for bringing this to our attention! Looping in the right person for vis @silly-dentist-68907
  • s

    silly-dentist-68907

    05/18/2022, 4:49 PM
    Thank you @adventurous-dream-20049 and @ambitious-australia-34009 , I'll make sure to change that now!
  • a

    ambitious-australia-34009

    05/18/2022, 4:51 PM
  • c

    calm-hydrogen-37718

    05/18/2022, 5:03 PM
    Thanks for letting me know I will take care next time.
  • i

    important-bird-21355

    05/18/2022, 7:25 PM
    Peeps, I'm banging my head against the wall for hours trying to get to Cypress on the Github Actions. The thing is that it's in a separate project, and we want to clone it into our main project (which is not a JS codebase). I thought I could use the
    project
    option to get around the fact that it's cloned inside the subfolder, but it didn't seem to work.
    Copy code
    - uses: actions/checkout@v3
            with:
              repository: 'libra/gjallarhorn'
              token: '${{ secrets.CI_PAT }}'
              path: 'gjallarhorn'
    
          - name: Cypress install
            uses: cypress-io/github-action@v2
            with:
              project: gjallarhorn
              browser: chrome
              record: true
              parallel: true
              config: pageLoadTimeout=100000,baseUrl=http://localhost:1080
              wait-on: 'http://localhost:1080'
1...414243...127Latest