Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 08:05
    jennifer-shehane edited #14783
  • 08:01
    jennifer-shehane edited #14782
  • 08:01
    jennifer-shehane labeled #14782
  • 07:34
    panzarino synchronize #14788
  • 07:34

    panzarino on issue-14658

    I didn't like that spacing (compare)

  • 07:33
    panzarino review_requested #14788
  • 07:32
    panzarino review_request_removed #14788
  • 07:32
    panzarino review_requested #14788
  • 07:32
    cypress-bot[bot] unlabeled #14658
  • 07:32
    cypress-bot[bot] labeled #14658
  • 07:32
    panzarino ready_for_review #14788
  • 07:32
    panzarino review_requested #14788
  • 07:31
    panzarino edited #14788
  • 07:30
    jennifer-shehane closed #14772
  • 07:30
    jennifer-shehane commented #14772
  • 07:30
    panzarino edited #14788
  • 07:28
    panzarino synchronize #14788
  • 07:28

    panzarino on issue-14658

    Set up basics for isolated runn… Update a ton of studio tests (compare)

  • 07:25
    adesko commented #14783
  • 07:15
    asc-it-minds commented #14447
shaymaasab
@shaymaasab
hey i made a test and i ran it many times but now iam facing this problem
its emergency :( maximum call stack size exceeded
Ming Han Chung
@mystoryphoto_twitter
So horribly newb question. If I make a task 'db:reset': (user, table) => {} is that the correct way to declare two args?
Say i'm calling cy.task('db:reset'. {user: 'Jim', table: 'Users'})
7 replies
or is it like 'db:reset': (user) => {} and then u call user.user user.table
Santiago Agüero
@saaguero
Hi guys, how are you? In Gitlab I'm running into the problem I cannot adjust/change the setting shm_size, which causes Cypress tests against Chrome hang forever... I think this is a recurring problem. What are you using to overcome this scenario in Gitlab?
Dana Woodman
@danawoodman
Does anyone know how to support import aliases in plugin files? We have WebPack aliases in our Next.js project (eg ~/server) and I'd like to import this code into a plugin file. I know I can use WebPack preprocessor for test files, but how do I tell Cypress to respect my aliases in plugin files themselves? Don't see anything on docs or Google about this. Use case is to have a "reset db" plugin that calls our server code to seed the DB using our models directly. Is this possible or should I try something else?
Dana Woodman
@danawoodman
For now I'll use exec but it seems like a plugin is the "correct" way to do this?
QA1980
@QA1980
image.png
Has anyone encountered this error when you run test to the dashboard ? thanks
Sapan Shah
@sapandegreed
Hi, Does anyone know how to deal with infinite scrolling in cypress? I want to keep scrolling the page until the desired data is found. Thanks!
symphony
@symphony2014
Hi guys, when I run cypress , there was so many pages depend on top object, but in the container of cypress, top target to "http://localhost:8080/__/#/tests/__all"? anyway or workaround that I can redirect the top keyword to my website?
image.png
Tri Nguyen
@mankinchi
would you recommend using Cypress to test API?
symphony
@symphony2014
Why not use unit test or postman ? @mankinchi I guess Cypress more suitable for E2E test.
3 replies
Wim Vandenhaute
@wvdhaute
Hello, out of curiosity, what is the reason for https://docs.cypress.io/api/commands/fixture.html#this-context ? The requirement to use function callbacks here?
2 replies
Patrick Schaub
@pschaub
hello there :)
in our company i have weird issues with cypress. sometimes it flaky and i get "DOM detached" on our vue application.
is there any way to slowdown the requests on a cypress test to better see what happens? or any idea how to detect what exactly is triggering this?
and does anybody have a good idea how to wait for hydration of a vue app?
5 replies
Kirill Popolov
@ezhikov

Hello. I'm using WSL and want to test project inside WSL, but I don't want to setup X server, since result is ugly and buggy. So, I'm using pnpx cypress open to run Cypress, pointing it to WSL directory and getting EISDIR when file watcher is trying to watch /:

Error: EISDIR: illegal operation on a directory, watch '/'
    at FSWatcher.start (internal/fs/watchers.js:165:26)
    at Object.watch (fs.js:1329:11)
    at createFsWatchInstance (C:\Users\kpopo\AppData\Local\Cypress\Cache\4.12.1\Cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:116:15)
    at setFsWatchListener (C:\Users\kpopo\AppData\Local\Cypress\Cache\4.12.1\Cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:163:15)
    at NodeFsHandler._watchWithNodeFs (C:\Users\kpopo\AppData\Local\Cypress\Cache\4.12.1\Cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:325:14)
    at NodeFsHandler._handleDir (C:\Users\kpopo\AppData\Local\Cypress\Cache\4.12.1\Cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:548:19)
    at NodeFsHandler._addToNodeFs (C:\Users\kpopo\AppData\Local\Cypress\Cache\4.12.1\Cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:597:27)
    at C:\Users\kpopo\AppData\Local\Cypress\Cache\4.12.1\Cypress\resources\app\packages\server\node_modules\chokidar\index.js:435:21
    at async Promise.all (index 0) {
  errno: -4068,
  syscall: 'watch',
  code: 'EISDIR',
  path: '/',
  filename: '/'
}

Any ideas how to proceed from here or debug this?

agrmayank03
@agrmayank03
Unable to close PopUp Alert or unable to click ok button in any alert popup in cypress

iframepage.switch('#_bmain').xpath("user name").type('')
iframepage.switch('#_bmain').xpath("password").type('')
iframepage.switch('#_bmain').xpath("login button").click()
after login this, a popup alert message with OK button is coming which is not closing automatically and i am unable to close it with any manual code.. (we can't inspect the coming popup)

Example , i used below codes:

cy.on('window:alert', msg => alerted = msg);
cy.get('button').contains('OK').click()
Cypress.on('window:load', function(window) {
const original = window.addEventListener;
window.addEventListener = function() {
if (arguments && arguments[0] === 'onbeforeunload') {
return;
}
return original.apply(this, arguments);
};
})

iframepage.switch('#_bmain').xpath("user name").type('')
iframepage.switch('#_bmain').xpath("password").type('')
iframepage.switch('#_bmain').xpath("login button").click()
after login this, a popup alert message with OK button is coming which is not closing automatically and i am unable to close it with any manual code.. (we can't inspect the coming popup)

Example , i used below codes:

  1. cy.on('window:alert', msg => alerted = msg);
    cy.get('button').contains('OK').click()
  2. Cypress.on('window:load', function(window) {
    const original = window.addEventListener;
    window.addEventListener = function() {
       if (arguments && arguments[0] === 'onbeforeunload') {
           return;
       }
       return original.apply(this, arguments);
    };
    })
Gerard de Brieder
@smeevil
Hi, is anyone here using cypress-autorecord? I can record requests fine, but when replaying them i run in all kinds of async issues. Did anyone else notice this ?
Victor Aprea
@vicatcu
can someone explain to me this source of flake: "is not visible because its ancestor has position: fixed CSS property and it is overflowed by other elements."
Nikita Voloboev
@nikitavoloboev
Cypress.Commands.add('hasValidationError', { prevSubject: 'element' }, (subject, msg) => {
cy.wrap(subject).closest('.field').find('.label.red').should('have.text', msg);
});
if I have smth like this
cy.get('[data-test-process-popover]').wrap()
will the above be similar
im not sure how the .wrap gets used
Sergey Khristenko
@sergeyKhristenko
Hi! Is there any spec-level timeout in cypress? Something like if test is running longer than 'n' mins then stop it and fail?
Nick // Shadow8P
@NickEwer_twitter
Hey there, I'm probably just dum but I've been trying to out how to do something for a little while with no luck. Basically I have a platform I'm working in where we have 3 apps that share a "reset password" page. I'm trying to write tests for that reset password page using cypress, and one of the things I'm trying to test is that when the reset is complete, the user is automatically navigated back to the correct app. I'm getting some errors when I try to do that regarding "Blocked a frame with origin "http://localhost:8081" from accessing a cross-origin frame." Is there somewhere I need to add some config in cypress to allow my other pages to load? Thanks.
Abhinaba Ghosh
@abhinaba-ghosh
Is there any option to log error messages nicely? I was using throw new Error, but it is not the case anymore. Is there any command available like: cy.error() or cy.log('', {error:true})?
rhshah007
@rhshah007
Hi amazing people here! Does anyone know how to integrate cypress with bamboo or harness? Thanks!
Hemant Choudhari
@hemantc09

Hi there,
I have impltemented the OKTA but somehow its keep giving me OKTA login screen even though I see it working 200 response.

  1. Same OKTA login code works in electron
  2. Same code doesnt work in chrome.

I did some research and figured the "samesite " cookie related issue. I added a code
cy.set('sameSite', value). //i tried all values.
But still getting the error.

Does any one face this issue?

Screen Shot 2020-08-12 at 10.53.13 AM.png
it('test Login to atmos via OKTA', () => {

    console.log('inside the before', " user name -");


   //first cy.request you need to get a OKTA session token
    cy.request(optionsSessionToken)
      .then(resp => {
    const sessionToken = resp.body.sessionToken;

    cy.request({
    method: 'GET',
    url: 'atmosURL&sessionToken=' + sessionToken,
    form: true,
    followRedirect: false
    }).then(respWithToken => {
    cy.setCookie('sameSite','undefined')
    const url = respWithToken.redirectedToUrl;

    const token = url
        .substring(url.indexOf('access_token'))
        .split('=')[1]
        .split('&')[0];
    cy.wrap(token).as('token')

    cy.visit(url).then(() => {
        cy.visit('/')

    });
    });
});
})
Ming Han Chung
@mystoryphoto_twitter
When creating a node function using task in Cypress. Does it not run if I run chrome headless?
Kniaziev Oleksandr
@Kniaziev
hi all. is there any workaround how to test playback e.g. user click on play button and playback of song started. On my side I have problem only with logged in user, since anonymous can start playback and it really plays, but only samples. For logged in user I get errors and it is only when I use cypress, no issue with webdriver based frameworks.
error is blob:https://some-domain/d66d05e1-17d1-4c6c-9435-4cd8f2efbbd0 net::ERR_FILE_NOT_FOUND
also xhr eror: GET (aborted) /hlsaes/assets/mp4-320kbps/01/30/02/456A0F707C122835E050040A601051E1.mp4/seg-1-a1.ts?blah-blah-blah
All I need is just click play button and verify that playback time changed in player. Song itself is playable and can be played with same user logged in manually.
Kniaziev Oleksandr
@Kniaziev
Then('The user is able to start playback from search results',()=>{
    cy.get('.search-results__bestresult').within(($topresult) => {
        cy.get('[data-qa="image"]').trigger('mouseover').then((loc) => {
             cy.get('.play-button').click()
    })})})
Victor Aprea
@vicatcu
anyone have any experience with interacting with ng-select dropdowns in cypress?
my dev team is telling me that in CLI mode, a lot of errors are stemming from ng-select components and visibility / actionability that manifests in CLI mode but not GUI mode
obviously that's very adversely affecting our CI efforts
Victor Aprea
@vicatcu
We get this sort of thing a lot in the CLI
Timed out retrying: expected '<span.ng-value-label>' to be 'visible' This element `<span.ng-value-label>` is not visible because it has CSS property: `position: fixed` and it's being covered by another element: `<div class="ng-input">...</div>`
Kalaivanee Ramsekar
@kalaivanee.r88_gitlab
can someone help me how to get the value of the property from the response in cypress?