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

    swift-controller-90067

    06/30/2022, 10:25 AM
    running the container with my project's contents as the working directory seems to just start cypress automatically inside the container
  • m

    magnificent-finland-58048

    06/30/2022, 10:45 AM
    just import the css in the beginning of the cy.js file
  • m

    magnificent-finland-58048

    06/30/2022, 10:45 AM
    imports './styles.css'
  • p

    polite-breakfast-98741

    06/30/2022, 10:49 AM
    I don't have any css file. I'm using component library chakra ui in react. How i can pass theme provider to all components ?
  • m

    magnificent-finland-58048

    06/30/2022, 10:51 AM
    same with any theme provider, mount a wrapped component https://github.com/muratkeremozcan/cypress-react-component-test-examples/blob/master/cypress/component/styled-components%26-theme-provider/mount-with-themeProvider-wrap.comp-spec.jsx
  • p

    polite-breakfast-98741

    06/30/2022, 10:53 AM
    I want to set it globally in /support/component.ts file intstead of each component which is not a good practice
  • m

    magnificent-finland-58048

    06/30/2022, 10:55 AM
    if it's anywhere, has to be in
    component-index.html
    inside body, outside div
  • p

    polite-breakfast-98741

    06/30/2022, 10:57 AM
    I think didn't understand. I want ThemeProvider automacally added in component mount instead of adding manually
  • m

    magnificent-finland-58048

    06/30/2022, 10:58 AM
    Copy code
    <body>
     <MyThemeProvider>
       <div data-cy-root></div>
     </MyThemeProvider>
    </body>
    I haven't tried this , but it's worth trying it
  • m

    magnificent-finland-58048

    06/30/2022, 10:59 AM
    it's a good question, ask it in the react component test channel
  • p

    polite-breakfast-98741

    06/30/2022, 10:59 AM
    This is not possible in react.
  • m

    magnificent-finland-58048

    06/30/2022, 10:59 AM
    I know πŸ™‚
  • m

    magnificent-finland-58048

    06/30/2022, 11:03 AM
    you might have to add a script tag under the body and use the low level React api to do it React.createElement(MyThemeProvider, ...) ask the team, I haven't had to wrestle this
  • a

    agreeable-painting-90494

    06/30/2022, 12:46 PM
    Hi Folks, is there a way to diagnose if the browser has run out of memory on a
    cypress run
    on CI? I'm getting lots of hangs since upgrading to Cy10
  • a

    agreeable-painting-90494

    06/30/2022, 12:47 PM
    I've tried
    DEBUG=cypress:server:util:process_profiler
  • a

    agreeable-painting-90494

    06/30/2022, 12:48 PM
    The profiler messages still appear, but no more tests run
  • a

    agreeable-painting-90494

    06/30/2022, 12:48 PM
    The tests run fine locally in the UI
  • f

    fresh-doctor-14925

    06/30/2022, 1:05 PM
    @adventurous-dream-20049 Is very interested in hearing about performance-related issues, so maybe she'll be able to give you some pointers
  • a

    agreeable-painting-90494

    06/30/2022, 1:11 PM
    I seem to have enough Memory available on the box (6 runner instances on a box with 16 cores and 64 gig ram) - it hits about 10gig memory. I'm just wondering if I'm running out of memory on the Chrome instance (cc @adventurous-dream-20049 )
  • s

    swift-controller-90067

    06/30/2022, 1:16 PM
    I've just about got it working. cypress runs and can see the baseUrl I tell it to go to, but it can't access the actual localhost:3000 server, says it isn't running. I tried npm start on both windows and wsl2 ubuntu to no avail, now what I'm doing is setting the
    --entrypoint=""
    running
    /bin/bash
    , running
    npm start
    , then opening another terminal and running
    docker exec -it container_id cypress run
    at the same time. that seems to work, but ONLY if i copy the spec files from cypress/e2e to cypress/integration, which is odd, as the latter is a legacy folder, I believe. if I don't do the last step, cypress complains that
    cypress/integration
    is empty!
  • f

    fresh-doctor-14925

    06/30/2022, 1:25 PM
    Do you have something lingering in your
    cypress.config.js
    , or are you perhaps passing
    --spec
    in your run command? (Maybe in
    package.json
    ?)
  • s

    swift-controller-90067

    06/30/2022, 1:26 PM
    no & no. my cypress config is
    Copy code
    js
    const { defineConfig } = require('cypress')
    
    module.exports = defineConfig({
        e2e: {
            baseUrl: 'http://localhost:3000/',
            setupNodeEvents(on, config) {
                // implement node event listeners here
            },
        },
    })
  • r

    rhythmic-lamp-20079

    06/30/2022, 1:56 PM
    Hello. I am a beginner with cypress and I have a problem with my code. I create a small test that login into the printer's web page. (full address: http://ricoh.milestone/web/guest/en/websys/webArch/mainFrame.cgi)
    Copy code
    import 'cypress-iframe';
    
    describe('Install', () => {
    it('should install Ricoch agent ',  function () {
            cy.visit("10.2.4.56").then(() => {
              cy.get('frameset')
              cy.frameLoaded('frame[title="Header Area"]').then(() => {
                cy.iframe('frame[title="Header Area"]')
                    .find('span')
                    .contains('Login')
                    .wait(10000)
                    .click({force: true})
                    .wait(10000);
              })
            })
          })
    })
    Test correctly visit web app, get frameset, load frame, and find span, but when I want to click "Login" button the test shuts down, and it says that there is no test. Web code: https://ibb.co/3BfLBc4 Test timeline: https://ibb.co/Ypp363K After second wait(1000) https://ibb.co/bs66fCj
    Copy code
    "dependencies": {
        "cypress": "9.6.1",
        "cypress-iframe": "^1.0.1"
      },
  • a

    adventurous-dream-20049

    06/30/2022, 2:16 PM
    Thanks for connecting us @fresh-doctor-14925! @agreeable-painting-90494 Can you confirm if you are using the latest Cypress version (10.3) which which includes a bug-fix for memory leaks in Chromium-based browsers? https://docs.cypress.io/guides/references/changelog#10-3-0
    a
    • 2
    • 7
  • l

    late-planet-4481

    06/30/2022, 3:05 PM
    I don't have an answer for your very strange issue, but I do have some pointers for your syntax.
    cy.
    commands are enqueued and run in sequence, so you don't need to use
    .then()
    unless you want to incorporate the previous command's yield with standard JavaScript. So your test could be re-written as follows:
    Copy code
    js
    import 'cypress-iframe';
    
    describe('Install', () => {
    it('should install Ricoch agent ',  function () {
      cy.visit("10.2.4.56")
      cy.get('frameset')
      cy.frameLoaded('frame[title="Header Area"]')
      cy.iframe('frame[title="Header Area"]')
        .find('span')
        .contains('Login')
        .wait(10000)
        .click({force: true})
        .wait(10000);
      })
    })
  • r

    rhythmic-lamp-20079

    06/30/2022, 3:10 PM
    Thank you for the advice πŸ˜€
  • f

    full-gold-69746

    06/30/2022, 3:23 PM
    Has anyone used
    cy.origin
    with GitHub authentication. I am getting blocked with GitHub firing off a 2FA even though it is disabled for the user I am testing with
  • a

    agreeable-painting-90494

    06/30/2022, 4:21 PM
    I seem to be getting: -
    "after each" hook in "{root}"
    error quite regularly, what does it actually mean? Is that an aftereach in one of the plugin / support files is failing?
  • s

    swift-angle-95455

    06/30/2022, 5:41 PM
    Thank you for your help. But I checked my chrome dev tools and it is not a problem with local storage, the flow and results are showed in these screnshots.
    q
    • 2
    • 3
  • s

    stale-wire-41120

    06/30/2022, 7:55 PM
    Photo from S@u
1...100101102...252Latest