https://cypress.io logo
Join Discord
Powered by
# e2e-testing
  • r

    rough-monitor-85122

    05/12/2022, 4:28 PM
    That is probably not the real issue - it pops up 100% of the time whether tests pass or fail.
  • r

    rough-monitor-85122

    05/12/2022, 4:29 PM
    We have an issue to silence it, since it's unrelated and confuses people.
  • r

    rough-monitor-85122

    05/12/2022, 4:29 PM
    Just noise from Electron when run in a docker container.
  • b

    bitter-apple-86316

    05/13/2022, 2:28 PM
    Hi
  • b

    bitter-apple-86316

    05/13/2022, 2:28 PM
    Anyone having idea to mock websocket response in angular app
  • p

    polite-lunch-8069

    05/17/2022, 1:37 PM
    Hi, I have some troubles with button status so I want to ask: How to distinguish enabled and toggled button?
  • p

    polite-lunch-8069

    05/17/2022, 1:38 PM
    while for me 1 is "enabled" and 2 is "disabled", Cypress sees them all as disabled or enabled in terms of being clickable
  • p

    polite-lunch-8069

    05/17/2022, 1:39 PM
    with "should(be.disabled)" Cypress checks if button is clickable, if it isn't outgreyed, in this case both 3 and 4 are disabled
  • p

    polite-lunch-8069

    05/17/2022, 1:39 PM
    is there any command like should(be.toggled)?
  • w

    wonderful-match-15836

    05/17/2022, 2:18 PM
    It depends what the implementation of these buttons is. Can you share the code? Sometime under the hood these rely on checkboxes, sometimes it’s a button with role “switch”. Depending on the implementation, you can use attributes like “checked”, “aria-checked” etc to know if the switch is “on” or “off”.
  • p

    polite-lunch-8069

    05/17/2022, 7:44 PM
    Thanks for your help!
  • p

    polite-lunch-8069

    05/17/2022, 7:44 PM
    based on what you said, I can use this button's role and "aria-checked" attribute
  • p

    polite-lunch-8069

    05/17/2022, 7:45 PM
    how exactly can I do that?
  • p

    polite-lunch-8069

    05/17/2022, 7:45 PM
    cy.get(x).should('have.attr', 'aria-checked="false"') will be ok?
  • g

    gray-kilobyte-89541

    05/17/2022, 7:52 PM
    See attribute assertions https://glebbahmutov.com/cypress-examples/commands/assertions.html
  • p

    polite-lunch-8069

    05/17/2022, 10:13 PM
    Thank you very much! :)
  • e

    early-ocean-91379

    05/17/2022, 11:33 PM
    Hello I am trying to disable command log in headless mode (Windows) using CYPRESS_NO_COMMAND_LOG=1 npx cypress run and I get this error CYPRESS_NO_COMMAND_LOG=1 : The term 'CYPRESS_NO_COMMAND_LOG=1' is not recognized as the name of a cmdlet, function, script file, or operable program I also tried passing this parameter as env variable using --env and updating cypress.json, but doesn't seem to work in either case Any pointers on correct usage of this flag to suppress logs would be very helpful. @gray-kilobyte-89541 @nutritious-restaurant-91514
  • p

    polite-lunch-8069

    05/18/2022, 12:22 PM
    Your link helped me a lot, but now I have problem with using this assertion
  • p

    polite-lunch-8069

    05/18/2022, 12:22 PM
    I want to click this button only when aria-check=false, but Cypress fails every time aria-checked is true instead of just skipping this step
  • p

    polite-lunch-8069

    05/18/2022, 12:23 PM
    any ideas?
  • g

    gray-kilobyte-89541

    05/18/2022, 1:02 PM
    are you on Windows? Then you have to set that process environment variable how Windows expects it, you are setting it Linux-style
  • g

    gray-kilobyte-89541

    05/18/2022, 1:03 PM
    you are doing conditional testing (incorrectly), see https://glebbahmutov.com/cypress-examples/recipes/conditional-testing.html
  • p

    polite-lunch-8069

    05/18/2022, 2:41 PM
    Wow, thanks @gray-kilobyte-89541, your knowledge is crazy!!!
  • p

    polite-lunch-8069

    05/18/2022, 2:41 PM
    works like a charm
  • e

    early-ocean-91379

    05/18/2022, 3:40 PM
    Thanks a lot for getting back to me @gray-kilobyte-89541 Yes I'm on Windows, i tried setting it up in process.env (node), but doesn't seem to work ☹️ I also tried setting it up in Windows env variables, no luck either
  • n

    nice-policeman-60909

    05/18/2022, 4:55 PM
    Hey there
  • g

    gray-kilobyte-89541

    05/18/2022, 4:58 PM
    https://geekflare.com/system-environment-variables-in-windows/
  • n

    nice-policeman-60909

    05/18/2022, 4:59 PM
    I am trying to run a spec file with 15 tests in it form Test runner, And always around 7 mins 15 secs the test runner goes to a white blank screen, will all tests gone!!!!
  • n

    nice-policeman-60909

    05/18/2022, 4:59 PM
    Is it a system limitation ?/ like by design it doesn't support test execution more than x minis ?
  • g

    gray-kilobyte-89541

    05/18/2022, 5:00 PM
    probably runs out of memory and crashes. Split the spec into shorter specs
1...424344...192Latest