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

    bulky-sundown-74498

    06/08/2021, 5:07 PM
    then it calls this on the node server https://github.com/cypress-io/cypress/blob/unified-desktop-gui/packages/server/lib/exec.js#L28
  • b

    bulky-sundown-74498

    06/08/2021, 5:07 PM
    Why not have them all in cypress ?
  • b

    bulky-sundown-74498

    06/08/2021, 5:08 PM
    since cypress is a superset of mocha, you could have it running there
  • l

    limited-keyboard-75773

    06/08/2021, 5:09 PM
    Some architecture decisions that I was not part of. Probably makes sense for the architect's vision but I can't provide details on the specifics since I'm not aware 😫
  • l

    limited-keyboard-75773

    06/08/2021, 5:11 PM
    Ok, so now I have passing with
    exec
    using
    child_process
    but after passing the tests I get
    TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
    probably I will need to ask in a node.js community
  • b

    bulky-sundown-74498

    06/08/2021, 5:13 PM
    If you do not want to use execa, which I believe is a mistake, I guess you will have to create your own version of the same tool, maybe a lighter one, and maintain it... It can be fun.
  • b

    bulky-sundown-74498

    06/08/2021, 5:13 PM
    I think this is probably a question to bother your architect with
  • l

    limited-keyboard-75773

    06/08/2021, 5:14 PM
    Yeah, I'll use
    execa
    if I cannot make to work natively with Node.js. Then, I can discuss it in the code review. Thanks for the help Bart!
  • b

    bulky-sundown-74498

    06/08/2021, 5:15 PM
    no worries
  • a

    acoustic-postman-68669

    06/08/2021, 5:22 PM
    Hey, i very new to cypress and i wanted to test a BE Login of a CMS. But as soon as i open the page with cypress in chrome there are JS Errors and the Login will not work. Any Idea what i can do?
  • a

    acoustic-postman-68669

    06/08/2021, 5:24 PM
    My test is very simple and i get stuck at that point
    Copy code
    describe('Test TYPO3 Backend', () => {
      it('Should show login', () => {
        cy.wait(1000)
        cy.visit('https://tld.de/typo3/')
        cy.wait(1000)
        cy.get('#t3-username')
      })
    })
  • b

    bulky-sundown-74498

    06/08/2021, 5:26 PM
    @User hello glad you're testing it
  • b

    bulky-sundown-74498

    06/08/2021, 5:27 PM
    one thing that I found confusing at start is that cypress runs tests in an iframe. It makes test fast but it creates a parent to your current window
  • b

    bulky-sundown-74498

    06/08/2021, 5:28 PM
    So if in the tested apps JS code someone have a special code looking at
    parent.execCb.InfoWindow
    and only protects the existence of parent then you will have this kind of issues
  • b

    bulky-sundown-74498

    06/08/2021, 5:29 PM
    in your tests, though the cy.wait are unnecessary and you can remove them.
  • b

    bulky-sundown-74498

    06/08/2021, 5:29 PM
    cy.visit will do all the waiting for you 😉
  • b

    bulky-sundown-74498

    06/08/2021, 5:32 PM
    You should be able to click on the error in the console to show the line that errored. It should make debugging easier
  • a

    acoustic-postman-68669

    06/08/2021, 5:32 PM
    This seems to by my problem. Its expecting top.TYPO3 which is acually in the sub frame? @User
  • a

    acoustic-postman-68669

    06/08/2021, 5:33 PM
    Is there any chance to get that running?
  • w

    wooden-advantage-64510

    06/09/2021, 2:00 PM
    So I have an interesting issue, I use Cypress in combination with
    cypress-image-snapshot
    which works fine as screenshots are created and diff'd as intended. But I'm running into an issue where the screenshots dimensions are different per machine, specifically our CI. Certain screenshots match, but other times it's 1 - 20 pixels in width different. So does anyone know why bounding boxes be so drastically different on various machines? I've verified that all CSS styling is indeed loaded as intended so it cant cause any layout differences.
  • r

    red-easter-74903

    06/09/2021, 4:28 PM
    Hi All! got a question, have anyone got to work with cypress-slack-reporter?
  • q

    quick-gpu-68223

    06/11/2021, 3:06 AM
    how do you mock / stub the window location assign in cypress ?
    Copy code
    cy.window().then(win => {
      const url = cy.stub(win.location, 'assign')
      use url
    })
    it says assign can't be re assign
  • q

    quick-gpu-68223

    06/11/2021, 3:07 AM
    and we can't even doing like we were doing with jest by deleting window location. I can understand why but we don't have good alternative to it?
  • w

    wonderful-match-15836

    06/11/2021, 2:01 PM
    @User Gleb had a good video about this recently that I think might help

    https://www.youtube.com/watch?v=mML36U62-fQâ–¾

  • q

    quick-gpu-68223

    06/11/2021, 2:38 PM
    looking at it
  • q

    quick-gpu-68223

    06/11/2021, 3:05 PM
    its for e2e not for component testing here
  • q

    quick-gpu-68223

    06/11/2021, 3:05 PM
    it sounds a bit tricks we should have a proper way to have it
  • l

    limited-keyboard-75773

    06/11/2021, 7:50 PM
    Hi, I need some help with the following: Title: Is it possible to combine a custom command which gets trigger in both
    beforeEach
    &
    afterEach
    hooks? Description: I'm currently using the
    cypress-localstorage-commands
    plugin: https://www.npmjs.com/package/cypress-localstorage-commands like so:
    Copy code
    beforeEach(() => {
      cy.restoreLocalStorage();
    });
    
    afterEach(() => {
      cy.saveLocalStorage();
    });
    Is there a way to abstract this into a
    custom command
    so I don't need to add these
    hooks
    or reuse this code in each
    spec
    file?
  • b

    bulky-sundown-74498

    06/11/2021, 9:06 PM
    I would suggest you place those 2 lines in a file and import them in
    support/index.js
  • b

    bulky-sundown-74498

    06/11/2021, 9:07 PM
    Know that you can use before, beforeEach, after and afterEach outside of describe statements in cypress
1...232425...252Latest