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

    brash-mechanic-5372

    08/22/2022, 10:00 PM
    > { > "projectId": > }
  • b

    brash-mechanic-5372

    08/22/2022, 10:00 PM
    I created the file and added like this
  • a

    abundant-hydrogen-26466

    08/22/2022, 10:01 PM
    Needs
    "
    around the id as well
  • b

    brash-mechanic-5372

    08/22/2022, 10:02 PM
    Thanks, I added it
  • a

    abundant-hydrogen-26466

    08/22/2022, 10:02 PM
    Let me know if it works for you
  • b

    brash-mechanic-5372

    08/22/2022, 10:05 PM
    Sure, I will continue with the process, thank you @abundant-hydrogen-26466
  • a

    abundant-hydrogen-26466

    08/22/2022, 10:05 PM
    Happy to help
  • b

    brash-mechanic-5372

    08/22/2022, 10:47 PM
    It worked! @abundant-hydrogen-26466 but now I´m having this issue that I want to log in but the Cypress app is not detecting that I am making the log in process
  • a

    abundant-hydrogen-26466

    08/22/2022, 10:48 PM
    code example?
  • b

    brash-mechanic-5372

    08/22/2022, 10:49 PM
    I opened Cypress by using this command
    ./node_modules/.bin/cypress open
  • b

    brash-mechanic-5372

    08/22/2022, 10:50 PM
    @abundant-hydrogen-26466
  • a

    abundant-hydrogen-26466

    08/22/2022, 10:53 PM
    Did you try logging in here?
  • s

    shy-scientist-68278

    08/22/2022, 10:59 PM
    Is there any way with cypress window to run all tests? I seem to only be able to select one test.
  • b

    brash-mechanic-5372

    08/22/2022, 11:00 PM
    Yes and it leads me to this page, I continue with the user I have but the app is not detecting it
  • b

    brash-mechanic-5372

    08/22/2022, 11:04 PM
    Maybe it has something to do with the cache so I'm gonna try that way or using another browser
  • b

    brash-mechanic-5372

    08/22/2022, 11:10 PM
    It worked, I guess that Brave browser was causing the issue
  • a

    abundant-hydrogen-26466

    08/22/2022, 11:17 PM
    Ah Brave! I love Brave. Glad it is working for you, best of luck with Cypress
  • g

    gentle-dress-1046

    08/23/2022, 8:13 AM
    Hello, Im trying to set the baseUrl based on an environment variable before the run, currently Im doing it like this(support/index.ts):
    Copy code
    const setBaseUrl = () => {
       const appEnv = Cypress.env('app_env');
    
      if (!appEnv) {
        throw new Error("must set environment variable 'app_env' to one of the followings: local, preview, london, paris ");
      }
    
      if (appEnv === 'preview') {
        const previewBaseUrl = Cypress.config().baseUrl;
        if (!previewBaseUrl) throw new Error('you must set a baseURL when running tests on preview mode!');
      } else if (appEnv === 'local' || appEnv === 'london' || appEnv === 'paris') {
        const baseUrl = getBaseUrlObject(appEnv).appUrl;
        Cypress.config('baseUrl', baseUrl);
      } else {
        throw new Error(`unknown testing environment: ${appEnv}`);
      }
    };
    
    before(() => {
      setBaseUrl();
      cy.reload();
    });
    I want to config this before the tests, because this way is acting weird, is there a way to configure it before everything?
  • g

    great-furniture-24480

    08/23/2022, 8:33 AM
    Hi Amit, the best way is to use the Environment variable in your pipeline for each environment, do you have any pipeline? To use that, add your baseUrl in cypress.json, if you are using the latest version then it is under cypress.config.js, and add
    baseUrl
    there. Now in your pipeline, add
    env
    in following script
    Copy code
    env:
              CYPRESS_baseUrl: http://localhost
              CYPRESS_RECORD_KEY:
    and add your environment there. you will have a different workflow for each environment so you can here for testing, staging and live.
  • a

    adventurous-afternoon-89751

    08/23/2022, 10:33 AM
    i am unable to install cypress. it's defined in a yarn-based package.json of a package i want to use. the error i get is
    Copy code
    URL: https://download.cypress.io/desktop/9.2.1?platform=linux&arch=x64
    Error: Failed downloading the Cypress binary.
    Response code: 403
    Response message: Forbidden
    i am behind tor i think this means your CDN is just unilaterally blocking tor users from installing cypress in the documented way, which, if true, seems pretty malicious and i would appreciate it if you could reconfigure.
  • f

    fresh-winter-92619

    08/23/2022, 12:11 PM
    Hi Team, I am trying to automate our application in Cypress. Whenever I submit a form that sends a POST request in the background. That POST request is moving to Aborted status instantly. This Issue occurs in Chrome and Edge but works fine in Electron. Any help to resolve this issue is much appreciated. Thanks.
  • f

    fancy-airplane-60156

    08/23/2022, 12:30 PM
    I upgraded from Version 7 to 10.0 and migrated the tests. I'm trying to run my tests . I get this error for every test. Any pointers are appreciated.
  • f

    fancy-airplane-60156

    08/23/2022, 12:30 PM
    rror: We've tried to resolve your step definitions at cypress/integration, but that doesn't seem to exist. As of version 2.0.0 it's required to set step_definitions in your cypress-cucumber-preprocessor configuration. Look for nonGlobalStepDefinitions and add stepDefinitions right next to it. It should match your cypress configuration has set for integrationFolder. We no longer rely on getting information from that file as it was unreliable and problematic across Linux/MacOS/Windows especially since the config file could have been passed as an argument to cypress
  • f

    freezing-wall-5568

    08/23/2022, 1:13 PM
    Hi, how can I solve the integration of clickhouse into the project? Like I need to make queries from test to clickhouse base and get a response by these queries and work with this response. Because cypress runner don't handles this yet, I all-time get error like > URL is not a constructor ?
  • g

    gentle-dress-1046

    08/23/2022, 2:40 PM
    thank you very much 🙂
  • g

    gentle-dress-1046

    08/23/2022, 3:53 PM
    Does anyone know if there is a way to clear indexDb\localstorage\cache etc.. before you visit the page, for example, Im trying to do like this :
    Copy code
    cy.visit('/', {
          onBeforeLoad: () => {
            clearCache();
          },
        });
    but it seems like it delete the indexDb
  • g

    gentle-dress-1046

    08/23/2022, 3:55 PM
    I want to reach the sign in page, for that I need a clear indexDb before I reach the site
  • f

    fresh-winter-92619

    08/23/2022, 4:02 PM
    Hi Team, I am trying to automate our application in Cypress. Whenever I submit a form that sends a POST request in the background. That POST request is moving to Aborted status instantly. This Issue occurs in Chrome and Edge but works fine in Electron. Any help to resolve this issue is much appreciated. Thanks.
  • a

    abundant-hydrogen-26466

    08/23/2022, 4:39 PM
    Yea, I think the issue you are running in to is that Cypress has it's own
    window
    object that is actually different than the object referenced when a static
    window
    call is made. I would try...
    Copy code
    export const clearIndexDb = () => {
      cy.window().then((window) => {
        window.indexedDB.deleteDatabase('session');
      })
    };
    and see if that resolves the issue for you. Further reading here --> https://docs.cypress.io/api/commands/window
  • c

    chilly-telephone-39196

    08/23/2022, 4:41 PM
    I have an issue in cypress where we run npx cypress open from VS code and the command line, select the spec to run and it hanging on "Your tests are loading..." some times it takes a minuet other times it hangs indefinatly - we are seeing this on two machines Any ideas?
1...133134135...252Latest