https://cypress.io logo
Join Discord
Powered by
# help
  • b

    billowy-spoon-30011

    11/17/2021, 4:45 PM
    Hi everyone, I have an index.js file (plugin folder) issue. It says that the plugin are crashing when I try to run specs. Any ideas about what's wrong or missing ?
  • b

    billowy-spoon-30011

    11/17/2021, 4:47 PM
    "The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file" The issue I got in the Cypress window as I try to run tests
  • c

    cool-island-48022

    11/18/2021, 6:15 AM
    https://stackoverflow.com/questions/70015302/avoid-callback-with-await-cypress-doesnt-work how to avoid repeating cy.wait(apiCall) in the
    it
    block?
  • g

    great-london-82425

    11/18/2021, 6:01 PM
    Has anyone ever used the cypress-axe package? Even though I've defined my H1, I still get an accessibility violation related to that element. Looking at this issue, it looks like cypress-axe might also issue some false positives. Just curious if anyone's found a workaround.
  • c

    calm-doctor-58650

    11/19/2021, 4:35 PM
    Thanks for creating an issue! That was going to be my recommendation. 😅
  • c

    calm-doctor-58650

    11/19/2021, 4:36 PM
    Hey @User it's difficult to know without more info on the plugin and how it's integrated. Is this the first time you're using the plugin or did it stop working recently? Is it a Cypress plugin or a community plugin? Community plugins not developed by Cypress can be trickier to debug, and I'd recommend creating a GitHub issue on the plugin repository with your issue.
  • c

    calm-doctor-58650

    11/19/2021, 4:37 PM
    Hey @User! It may also help to create an issue on the cypress-axe repository if someone here isn't able to assist. I'm not sure I've seen that issue before.
  • b

    billowy-spoon-30011

    11/19/2021, 4:43 PM
    Hi ! Thanks for asking. The file was always untouched so far and it seemed to cause problems with the 9.0.0 update. So I figured that caused this and got back to 8.7.0 version. Do you know if there's any mean to update to 9.0.0 with an untouched index.js ?
  • c

    calm-doctor-58650

    11/19/2021, 4:45 PM
    Ah, there were some breaking changes with 9.0 related to Node version which could potentially cause issues with plugins. Check out our Changelog for more information, you may need to make some configuration updates. https://docs.cypress.io/guides/references/changelog
  • c

    calm-doctor-58650

    11/19/2021, 4:45 PM
    In general, whenever updating a major version (8.x > 9.0, for example) I'd check the Changelog for breaking changes.
  • b

    billowy-spoon-30011

    11/19/2021, 4:47 PM
    I did have a quick look but seems like I'll have to go through it throughrouly :) many thanks for the time and pointers
  • c

    calm-doctor-58650

    11/19/2021, 4:50 PM
    Happy to help! Good luck! 🤞
  • r

    rhythmic-army-81251

    11/19/2021, 10:36 PM
    hi all, it may be my lack of understanding how cypress runner works but we are getting an issue where the
    support/index.js
    file that executes before all other tests appears to have a different set of globals than each spec
  • r

    rhythmic-army-81251

    11/19/2021, 10:36 PM
    https://github.com/cypress-io/cypress/issues/19011
  • r

    rhythmic-army-81251

    11/19/2021, 10:36 PM
    is this expected behaviour?
  • f

    fancy-airplane-60156

    11/21/2021, 4:52 AM
    Hi @User @User I'm running two tests from a single feature file. Tests are in different feature file. I've noticed second test uses the logged in/authenticated state of the first test . I was wondering if I should log out and clear the cache before every test . I was under the impression that Cypress clears the state after every test run.
  • f

    fancy-airplane-60156

    11/21/2021, 4:56 AM
    This step fails here as application is using logged in state from previous test hence login button is not displayed
  • c

    calm-doctor-58650

    11/22/2021, 7:05 PM
    Hey Shrav, are you using the cypress-cucumber-preprocessor plugin? It could be related to how that plugin outputs the Cypress test code. I'd recommend creating an issue on the repository there, but I'm not sure how it's being maintained. It might be helpful to share the actual test code in a reproducible example here too, though, to see if there is anything causing the state to persist.
  • f

    fancy-airplane-60156

    11/23/2021, 10:12 AM
    hi @User Thanks for getting back to me. Yes I'm using cypress-cucumber-preprocessor plugin. Sure I'll do.
  • u

    user

    11/23/2021, 10:21 AM
    Hi everyone 👋 I'm trying to set up cypress with github-actions and I'm receiving the following error during the build:
    [FAILED] EACCES: permission denied, open '/github/home/.cache/Cypress/9.0.0/binary_state.json'
    Any idea what causes this? I followed the steps in https://docs.cypress.io/guides/continuous-integration/github-actions#Cypress-GitHub-Action. I'm including the full error log.
  • f

    fancy-airplane-60156

    11/23/2021, 10:53 AM
    After checking this further, I found out it is an open isssue
  • f

    fancy-airplane-60156

    11/23/2021, 10:53 AM
    https://github.com/cypress-io/cypress/issues/3323
  • c

    chilly-river-77247

    11/23/2021, 3:23 PM
    Hello there, I've been trying to setup some tests for my application. One is logged in based on bearer token or cookie, for some reason clearing the cookies before each test does not seem to work. Sometimes the cookie or token seems to survive. I have a login function that I run before every test to log my testuser into the application.
  • c

    chilly-river-77247

    11/23/2021, 3:24 PM
    Copy code
    js
    export const login = function () {
      cy.clearCookies();
      cy.clearLocalStorage();
      cy.log(
        `Opening test session URL: ${
          Cypress.env("TEST_TARGET_URL") ?? "http://localhost:3005"
        }`,
      );
      cy.visit(`${Cypress.env("TEST_TARGET_URL") ?? "http://localhost:3005"}`);
    
      cy.clearCookies();
      cy.reload();
      cy.wait(1000);
    
      cy.get("input[name='username']").type("testuser");
      cy.get("input[name='password']").type("testuserpassword");
    
      cy.get("button[name='login']").click();
      cy.wait(1000);
    
    };
  • c

    chilly-river-77247

    11/23/2021, 3:24 PM
    As you can see I even try reloading the browser before continuing after trying a clearCookies once landed on the page.
  • c

    chilly-river-77247

    11/23/2021, 3:26 PM
    Does anyone have any pointers for me? I've been browsing a bit on the internet, and have considered just checking if the username field exists, but that seems terribly dirty.
  • g

    great-london-82425

    11/23/2021, 9:58 PM
    Thank you, Cecelia. I see there's this thread (now closed) but some folks are still experiencing it. I'll try to bump that thread: https://github.com/component-driven/cypress-axe/issues/22
  • c

    calm-doctor-58650

    11/23/2021, 10:07 PM
    Cypress automatically clears all cookies and local storage before each test anyway, so it's unusual that it's persisting. https://docs.cypress.io/api/commands/clearcookies I'd recommend creating a GitHub issue with a reproducible example so the team can investigate. It would be helpful to know when this occurs -- is it only in CI? On certain browsers? Certain tests? Using any plugins? Or is it random? That can help pinpoint what may be causing this.
  • c

    chilly-river-77247

    11/24/2021, 9:55 AM
    It occurs both in CI and locally when testing on Windows. I've tested with Chrome and Firefox both giving the same results. I will try and create a reproduceable example but I'm not sure if I can manage that.
  • r

    rich-businessperson-57314

    11/24/2021, 2:36 PM
    can anyone help me with a code for okta integration? i tried many examples from internet but non of them is working for me 😦
1...373839...252Latest