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

    silly-journalist-41771

    06/27/2022, 7:34 PM
    need to start adding some
  • s

    silly-journalist-41771

    06/27/2022, 7:34 PM
    not really sure how to best use to class
  • s

    silly-journalist-41771

    06/27/2022, 7:34 PM
    though
  • s

    silly-journalist-41771

    06/27/2022, 7:34 PM
    at the moment
  • l

    late-planet-4481

    06/27/2022, 7:35 PM
    This structure is certainly viable, but not really necessary:
  • l

    late-planet-4481

    06/27/2022, 7:36 PM
    Why bury the command when you could just put it on
    cy
    ? 🙂
  • b

    bitter-fountain-36713

    06/27/2022, 7:36 PM
    @silly-journalist-41771 the docs have good explanation and examples of custom commands. The cypress docs are a good starting point. https://docs.cypress.io/api/cypress-api/custom-commands
  • r

    rough-carpenter-2704

    06/27/2022, 8:12 PM
    Any hint on this error after trying to install cypress-oracle-db? npm ERR! oracledb ERR! NJS-067: a pre-built node-oracledb binary was not found for Node.js v16.15.1 (NODE_MODULE_VERSION=93) on win32 x64 npm ERR! oracledb ERR! Try compiling node-oracledb source code using https://oracle.github.io/node-oracledb/INSTALL.html#github
  • l

    lemon-oyster-64925

    06/27/2022, 9:01 PM
    Hey all! Emily from Cypress here. 👋 On Wednesday, June 29 at 1 p.m. ET - Cypress will host office hours on Cypress 10 Component Testing Beta here on Discord. ❇️ Ask your questions about Cypress Component Testing now! https://app.sli.do/event/c1NZge389EUW59Ka8dRxVo Join the stage channel #office-hours this Wednesday to hear your Component Testing questions get answered live by our amazing DX team. Get your reminder here and invite your Cypress-loving friends: https://discord.gg/N79VqE2K?event=991083612478783488 See you then! 😎
  • s

    silly-journalist-41771

    06/28/2022, 12:04 AM
    is there a way to store the innerHTML of a product for an ecommerce website before adding it into the basket and then storing it as a variable and asserting that it is present in the basket?
  • b

    bitter-fountain-36713

    06/28/2022, 2:54 AM
    You can use access the innerHTML property and save it as an alias.
    Copy code
    cy.get('.element')
      .its('innerHTML')
      .as('productInnerHTML')
    // some other actions
    cy.get('@productInnerHTML')
  • s

    silly-journalist-41771

    06/28/2022, 2:54 AM
    wooow
  • s

    silly-journalist-41771

    06/28/2022, 2:54 AM
    is that a jQuery method
  • s

    silly-journalist-41771

    06/28/2022, 2:54 AM
    innerHTML
  • m

    modern-addition-58981

    06/28/2022, 3:32 AM
    Guys please help me on this
  • w

    wooden-scientist-32551

    06/28/2022, 6:01 AM
    logging not stable. its automatically logout when running second it block. why?
  • a

    abundant-musician-88272

    06/28/2022, 6:02 AM
    does anyone have a solution??
  • a

    abundant-musician-88272

    06/28/2022, 6:03 AM
    please help me
  • a

    agreeable-painting-90494

    06/28/2022, 11:41 AM
    @abundant-musician-88272 it's very hard to see your video and your photo. It would be better if you took a screenshot + recorded your desktop. It looks like you are on a mac so use CMD+SHIFT+5 to create a video and CMD+SHIFT+4 to create a screenshot.
  • a

    agreeable-painting-90494

    06/28/2022, 11:42 AM
    Also some context would be helpful
  • r

    rough-carpenter-2704

    06/28/2022, 4:44 PM
    Can someone help me to connect my project to an Oracle database?
  • l

    late-planet-4481

    06/28/2022, 4:46 PM
    State is intentionally cleared between
    it()
    blocks. If you want to be logged in every time, put your login steps inside the
    beforeEach()
    hook. If you want that process to happen faster you can wrap the login in a
    cy.session()
    command.
  • i

    incalculable-sandwich-19548

    06/28/2022, 4:51 PM
    Having a lot of cypress tests fail intermittently on gitlab ci where they're not failing locally. The artifacts are helpful to confirm that it's not looking like the test itself is failing, but running the tests in the ci environment is. Any ideas on how to troubleshoot if we can't reproduce locally?
  • l

    late-planet-4481

    06/28/2022, 4:54 PM
    Try to get your hands on the specific error messages; those will guide you. Failing in CI while passing locally often is caused by connectivity issues (firewalls) but there are a zillion other possibilities. Error messages first, then start troubleshooting.
  • i

    incalculable-sandwich-19548

    06/28/2022, 4:57 PM
    Thanks for responding here. It's tough because I wish I could see the console / network logs via the artifacts. Is there some feature I'm missing here?
  • l

    late-planet-4481

    06/28/2022, 7:07 PM
    All CI systems will have some sort of log, and the failure messages will be present there. You'll also see the failure message in the Cypress Test Runner, which you'll see a screenshot of if you're using the Cypress Dashboard.
  • s

    silly-journalist-41771

    06/28/2022, 8:50 PM
    can I assert that i'm on the right URL
  • s

    silly-journalist-41771

    06/28/2022, 8:50 PM
    on cypress
  • s

    silly-journalist-41771

    06/28/2022, 8:50 PM
    can't seem to find it on docs
  • l

    late-planet-4481

    06/28/2022, 8:52 PM
    @silly-journalist-41771 , use
    cy.location()
    https://docs.cypress.io/api/commands/location
1...606162...127Latest