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

    crooked-article-24217

    09/21/2022, 9:34 AM
    Thank you I will read it and try - appreciate both you guys help
  • c

    cold-apartment-77594

    09/21/2022, 9:58 AM
    Is there any way to have different
    cypress.env.json
    files? For example,
    cypress.env.development.json
    and
    cypress.env.production.json
    ? I have four different environments and need to set
    baseUrl
    ,
    video
    and some custom variables differently, depending on the environment. I was expecting a CLI option but only found
    --env
    , which is not what I want.
  • s

    stale-optician-85950

    09/21/2022, 10:07 AM
    (Cypress v10) : You can have multiple config files. For example as well as
    cypress.config.ts
    I have
    /cypress/configs/cypress.mobile.config.ts
    and my mobile config uses
    defu
    node package to safely override specified values:
    Copy code
    import { defineConfig } from 'cypress';
    import defu from 'defu';
    
    import defaultConfig from '../../cypress.config';
    
    export default defineConfig(
      defu(
        {
          viewportWidth: 375,
          viewportHeight: 812,
          userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) Mobile/15E148',
          env: {
            device: 'mobile',
          },
          e2e: {
            excludeSpecPattern: ['**/e2e/site-monitoring/*', '**/e2e/keyboard-navigation/*'],
          },
        },
        defaultConfig
      )
    );
    You'd just need to readjust for test environment specific values. And run command is like:
    Copy code
    cypress run --browser chrome --config-file cypress/configs/cypress.mobile.config.ts
    https://docs.cypress.io/guides/guides/command-line#cypress-run-config-file-lt-configuration-file-gt
  • i

    icy-exabyte-68383

    09/21/2022, 11:36 AM
    thats it! Thanks a lot m8
  • q

    quiet-gold-71638

    09/21/2022, 11:36 AM
    I'm facing error while connecting DB with cypress . can someone help me with oracleDB package
  • m

    mysterious-belgium-25713

    09/21/2022, 11:51 AM
    @quiet-gold-71638, for oracle db please check the thread I created yesterday. https://discord.com/channels/755913899261296641/1021807068056920094 Oracle db is a bit harder then normal databases. If i have time this week I think I will create a blog with a step by step guide
  • m

    mysterious-belgium-25713

    09/21/2022, 12:01 PM
    And maybe you can also say what kind of error you are getting
  • c

    cold-apartment-77594

    09/21/2022, 1:13 PM
    Command Line | Cypress Documentation
  • r

    red-raincoat-97557

    09/21/2022, 1:32 PM
    Invoices and billing
    • 1
    • 1
  • c

    clever-park-72905

    09/21/2022, 2:09 PM
    Good afternoon. Sorry for disturbing you. Can you help me? I have a project where I previously had 2 json files for testing, production and cypress.json for staging as default. If I need to use the command for example npx cypress open --env configFile=test - where it was launched with parameters for the test environment. After the update on new version cypress - we have cypress.config.js.In docs I found command as cypress run --config-file tests/cypress.config.js In my project by path cypress/config i created folder test and put cypress.config.js for test environment. I've tried use command as npm run cypress open --config-file test/cypress.config.js, npm run cypress:open --config-file cypress/config/tests/cypress.config.js, npm run cypress:open --config-file D:\autotestUI\cypress\config\test\test.config.js - i renamed cypress.config.js on test.config.js npx cypress open --env configFile=D:\autotestUI\cypress\config\test\test.config.js After it was launched in runner i had parameters from default cypress.config.js - not what I needed Sorry, Can you help me with running for different config files? Thanks
  • c

    cool-toothbrush-53313

    09/21/2022, 3:32 PM
    Hi All, After migrating from Cypress version 7 to 10, I'm getting error while executing the test. "Error Step implementation missing for: User verifies final feedback available title and description. ". Looks like it is not able to find cucumber step definitions. Package.json configuration : "cypress-cucumber-preprocessor": { "nonGlobalStepDefinitions": false, "stepDefinitions": "./cypress/step_definitions/**/*.{js,ts}", "cucumberJson": { "generate": true, "outputFolder": "coverage/cypress/cucumber-json", "filePrefix": "", "fileSuffix": ".cucumber" } }
  • c

    cool-toothbrush-53313

    09/21/2022, 3:32 PM
    Any help would be appreciated
  • f

    freezing-piano-2792

    09/21/2022, 5:45 PM
    @cool-toothbrush-53313 https://github.com/badeball/cypress-cucumber-preprocessor/issues/689
  • l

    little-midnight-87756

    09/21/2022, 6:07 PM
    Hello! Quick question, I know that cypress released support for Apple Silicon in 10.2.0. I see that when running end to end tests the cypress application is running as an Apple Silicon Process, but the chrome instance it opens is still Intel. Is there any way to force cypress to open up an Apple Silicon instance of chrome?
  • m

    mysterious-belgium-25713

    09/21/2022, 6:10 PM
    I'm not on a m version of the mac. But cypress uses the browsers installed on your machine. So is your chrome that is installed on your machine not the Intel version of chrome?
  • l

    little-midnight-87756

    09/21/2022, 6:10 PM
    Nope, it's the silicon version of chrome
  • l

    little-midnight-87756

    09/21/2022, 6:11 PM
    but I also think that chrome ships a universal version which contains both
  • l

    little-midnight-87756

    09/21/2022, 6:11 PM
    All I know is that when I open up chrome through my dock, it opens as an apple process
  • m

    microscopic-fish-5767

    09/21/2022, 8:21 PM
    https://kushalbhalaik.xyz/blog/database-testing-with-cypress-part-8/ maybe this can help you
  • s

    steep-businessperson-83821

    09/21/2022, 9:02 PM
    Hi I am new in Cypress and I have a couple of questions before acquiring cypress team plan: first ¿it is possible to install cypress in a server and be used by many tester with the same installation? second:¿it is possible to set up and run automate scripts running?
  • b

    bored-school-78265

    09/21/2022, 9:13 PM
    Mine opens as Apple M1. Try with
    DEBUG=cypress:server:browsers*,cypress:launcher:browsers*
    and see if you can spot anything out of the ordinary.
  • m

    mysterious-belgium-25713

    09/21/2022, 9:28 PM
    Hi Carlos just to get some clarification in your questions. The Cypress team plan is related only to the Dashboarding features. This is not a team plan to use Cypress. And when you talk about installing Cypress on a server what do you mean with that. Normally Cypress is started from a coding project. Here Cypress will download binaries to your machine and will be used to execute your tests. So to answer it shortly yes you can install Cypress on a server/machine and yes you can direct it in the config to store the binaries on a generic place for all users, but i'm wondering why would you have multiple users on the same server? And to answer your last question Cypress is a tool to run automated testing. You will not be doing any manual testing with Cypress. If you are really new with Cypress I would suggest to read the Getting Started: https://docs.cypress.io/guides/getting-started/installing-cypress Or watch some tutorials on youtube:

    https://www.youtube.com/watch?v=uIX8nHBfo-o&list=PLYDwWPRvXB8-8LG2hZv25HO6C3w_vezZb▾

  • m

    microscopic-advantage-2187

    09/21/2022, 9:36 PM
    Hello folks Is there a way I can download bundle js file that can be included for all tests?
  • s

    stale-optician-85950

    09/21/2022, 10:24 PM
    Hi all, is it possible to
    alias
    a specific value returned from
    cy.session()
    ? Seen in my code as
    .as('jwtToken')
    , when I do this the whole response is aliased and not just the cookie I need for later usage.
    Copy code
    cy.session('session caching', () => {
          cy.request({
            method: 'POST',
            url: `${urlUnderTest.origin}/auth/`,
            failOnStatusCode: false,
            body: {
              password: Cypress.env('AUTH_PASSWORD'),
            },
            headers: {
              'Content-Type': 'application/x-www-form-urlencoded',
            },
          }).then(({ allRequestResponses }) => {
            cy.wrap(allRequestResponses[0]['Response Headers']['set-cookie'][0]).as('jwtToken');
          });
        });
    cy.visit(urlUnderTest.toString());
  • c

    cool-toothbrush-53313

    09/21/2022, 10:25 PM
    @freezing-piano-2792 Thanks for the reply. Do I need to use the new package @freezing-piano-2792/cypress-cucumber-preprocessor with same configuration?
  • b

    breezy-yak-81068

    09/21/2022, 10:30 PM
    There are some configurations you need to change, they are specified in the guideline.
  • s

    stale-optician-85950

    09/21/2022, 10:48 PM
    Hi all is it possible to
    alias
    a
  • c

    cool-toothbrush-53313

    09/21/2022, 10:50 PM
    @breezy-yak-81068 Sorry to bother you. Here is my configuration. Can you please point exactly what needs to be changed. Here is the current changed configuration in package.json "cypress-cucumber-preprocessor": { "nonGlobalStepDefinitions": false, "stepDefinitions": "./cypress/step_definitions/**/*.{js,ts}", "cucumberJson": { "generate": true, "outputFolder": "coverage/cypress/cucumber-json", "filePrefix": "", "fileSuffix": ".cucumber" } }
  • l

    little-midnight-87756

    09/21/2022, 11:06 PM
    nothing seems out of the ordinary. It points to the chrome in my applications folder. When I double click it it opens as an apple process, but then opening it in cypress starts it as an intel process. I'm gonna see if I can strip the intel binary from chrome
  • l

    little-midnight-87756

    09/21/2022, 11:23 PM
    My strategy did not work, it just caused a bunch of errors
1...150151152...252Latest