Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 01:12
    cypress-bot[bot] locked #8975
  • 01:12
    cypress-bot[bot] commented #8975
  • 01:12
    cypress-bot[bot] locked #8967
  • 01:12
    cypress-bot[bot] commented #8967
  • 01:12
    cypress-bot[bot] locked #8964
  • 01:12
    cypress-bot[bot] commented #8964
  • 01:12
    cypress-bot[bot] locked #8945
  • 01:12
    cypress-bot[bot] commented #8945
  • 01:12
    cypress-bot[bot] locked #8930
  • 01:12
    cypress-bot[bot] unlabeled #8930
  • 01:12
    cypress-bot[bot] commented #8930
  • 01:12
    cypress-bot[bot] locked #8927
  • 01:12
    cypress-bot[bot] commented #8927
  • 01:12
    cypress-bot[bot] locked #8922
  • 01:12
    cypress-bot[bot] unlabeled #8922
  • 01:12
    cypress-bot[bot] commented #8922
  • 01:12
    cypress-bot[bot] locked #8921
  • 01:12
    cypress-bot[bot] unlabeled #8921
  • 01:12
    cypress-bot[bot] commented #8921
  • 01:12
    cypress-bot[bot] locked #8891
Hemant Choudhari
@hemantc09
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?
Victor Aprea
@vicatcu
I have elaborated and posted my comments above in a Stack Overflow post here: https://stackoverflow.com/questions/63384937/how-to-avoid-cypress-flakiness-using-ng-select-elements
any help or suggestions from the Cypress team and community would be greatly appreciated
:pray:
Nagimagi
@Nagimagi
hello, it works with postman, but threw 500 server error on cypress test. How come?
and why can't I sent a picture...
Nagimagi
@Nagimagi
cy.request() failed on:
url
The response we recieved from your web server was:
500 : Server Error
Mikail Kilic
@Mikail184_gitlab
Does anyone else have the issue since upgrading to 4.12.1 that submitting a form doesn't work? Its working fine with 4.11
Max Savchuk
@max.savchuk_gitlab
Hi, could anyone please explain why 'You cannot assign or work with the return values of any Cypress command. Commands are enqueued and run asynchronously.' (from Doc)
and why the below code doesn't work as expected.
const inputField = cy.get('[data-cy=inputField]')
inputField.type('text')
Sam Grönblom
@sgronblo
Has anyone seen the problem of Cypress reporting an error for an "after each" hook, even if you are not using any "after" hooks at all?
Mikail Kilic
@Mikail184_gitlab
cy.get('[data-cy=inputField]').then(input => {
    // Use cy.wrap to use Cypress comands again otherwise use jQuery
    cy.wrap(input).type('text')
})
that should do your job @max.savchuk_gitlab
Max Savchuk
@max.savchuk_gitlab
@Mikail184_gitlab thanks for the answer, i will try to use this
4 replies
sudheer-cypress
@sudheer-cypress
i am supposed to generate a report from UI. But i am not sure how much time it takes to download.So in this situation i just cant set wait time .Can any one suggest the ideal way to achieve this?
Mikail Kilic
@Mikail184_gitlab
go to your console and in network, and clear the history and generate the report to see where it comes from, after that use cy.request()
         cy.request({
            method: 'GET',
            url: ''
        })
vadymstroiu
@vadymstroiu

Hi. Is it possible to make a list of opened tabs?
The case is:

  1. I click on a button
  2. It generates the link and opens it in a new tab
  3. I have to navigate to this page and do some verifications

In case that Cypress does not support multi-tabs. It would be good to have a list of the opened tabs. So I can navigate to them.

Peter Scott
@peterscottsa
Does anyone know how to use EventSource? I can see support was added for it but there is no documentation to speak of.
I am trying to follow the example here cypress-io/cypress#2747 but no luck unfortunately
Ondskan56
@Ondskan56
Hey all, the issue with '.get' that scrolls the screen is really annoying and it seems that it hasn't been fixed since 2017.
Is this on the roadmap? Are you aware of this issue and you think on a solution? any feedback is appreciated
cypress-io/cypress#871
I tried some of the workaround and they work on some of my tests but they don't work on all of them.
I find it really difficult using Cypress with this issue.
AJRobson1
@AJRobson1
Can someone help me debug an issue? The last couple of days my tests have been failing because when I click a button to submit a login form the page just reloads with an empty form. I can't reproduce this manually and nothing in the tests or application code as changed since the issue started
6 replies
Anas Fitiani
@anas-qa
Did anyone notice that execution speed decreased after upgrading to 4.12?! weird one right?
sudheer-cypress
@sudheer-cypress
Need help badly,a file downloads to my local after clicking on it from UI using cypress.I want my test to end there itself.But cypress keeps on waiting to load a new page .Pls help
Patrick Schaub
@pschaub
@sergom13_twitter we also have heavy problems here with the scroll behaviour stuff in cypress. would really like to disable it. somehow the workarounds are not working for us. Anybody can help here?
raddy83
@raddy83
Hi, I'm working with Windows 10( Cypress: 4.11.0 and Browser: Chrome 84). When I'm trying to run test on Electron then everything is ok, but when I try to run tests with Chrome then Cypress is opening window with my application url ( url from baseURL - > e.g https://application-directory.com)), but other parameters from cy.visit('?/client_no=1003') gone.
jameseg
@jameseg
anyone have a way to deal with code coverage for parallel runs? I.E., in pipelines, it tries to write the same file from the config for each machine...
virtualcorsair
@virtualcorsair

Hello - I would like to understand how I can assert data in a pdf file? Basically, the file is already downloaded.
I have tried assertions in the callback loop, but cypress seems to skip it.

Here is my setup:

\plugins\index.js

const parsePdf = async (pdfName) => {
const pdfPathname = path.join(repoRoot, pdfName)
let dataBuffer = fs.readFileSync(pdfPathname)
return pdf(dataBuffer);
}

module.exports = (on, config) => {
on('task', {
getPdfContent (pdfName) {
return String(parsePdf(pdfName))
}
})
Test File "admin.reports.spec.js"

import LoginPageObjects from "../../support/pageObjects/common.pageObjects/login.pageObjects";
import ReportsDelegateReportPageObjects
from "../../support/pageObjects/common.pageObjects/reports.delegateReport.pageObjects";

import(LoginPageObjects);
import(ReportsDelegateReportPageObjects);

const loginPage = new LoginPageObjects();
const reportsPage = new ReportsDelegateReportPageObjects();

describe('Delegate Report Functionality', function (){

beforeEach(() => {
    // Provides admin credentials
    loginPage.getAdminLogin();
    // Navigates to Report Menu, Selects Report, Downloads PDF report.
    reportsPage.getMenuReport();
});

it('should return the report and verify the data in it', function () {
    cy.readFile('C:/Users/$user/Downloads/delegate_report.pdf', 'base64').should('contain.value', "Report")
});

});

1 reply
Max Savchuk
@max.savchuk_gitlab
@vadymstroiu maybe this will be useful for you: from cypress recipes
6 replies
abelmilash
@abelmilash
Hi. In my integration tests, I am visiting a page and making assertions about the contents (texts and table) displayed. After cy.visit('the url to visit'), Cypress loads all the contents in the page except for the table. If I do something like: cy.visit("the url to visit").wait("1000"), I see the contents of the table displayed, but I want to find other ways of doing this since wait("time") is described as anti-pattern. Any ideas on this?
Hemant Choudhari
@hemantc09
Hi All,
does anyone successfully completed OKTA login to react app using cypress? I found few solution but Im still getting OKTA screen .Even though I received the 200OK and 302 response. I really appreciate your help.
arawnsantos10
@arawnsantos10
Hello,
I am trying to exit the loop when my conditions are met but the each loop doesn't stop even if the condition are met
var loop = false; scorecardreview.employeeListItem().each(($e1, index, $list)=> { cy.wrap($e1).find('[datacy=statusStat]').invoke('text').then(text=>{ if(index >= 0 && text.trim() === 'No Scorecard' { cy.wrap($e1).find('.fa-ellipsis-h').click(); scorecardreview.assignScorecard().click() ; return false ; } }) })
Gleb Bahmutov
@bahmutov
@jameseg you would need to combine them yourself, which is not ideal
2 replies