by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:41
    bahmutov commented #8632
  • 15:01
    SurmaAa commented #4464
  • 14:54
    skflowne commented #7158
  • 14:38
    bahmutov commented #8596
  • 14:34
    cypress-bot[bot] commented #5913
  • 14:34

    bahmutov on develop

    fix: cy.task() can pass undefin… (compare)

  • 14:34
    cypress-bot[bot] unlabeled #5913
  • 14:34
    cypress-bot[bot] labeled #5913
  • 14:34
    bahmutov closed #5913
  • 14:34
    bahmutov closed #8600
  • 14:33
    bahmutov edited #8600
  • 14:30
    LisaManresa commented #8267
  • 14:21
    LisaManresa commented #8267
  • 14:21
    renovate[bot] edited #3777
  • 14:20
    bahmutov commented #8631
  • 14:07
    sync-by-unito[bot] edited #8634
  • 14:07
    bahmutov labeled #8634
  • 14:07
    bahmutov labeled #8634
  • 14:06
    bahmutov labeled #8634
  • 14:06
    bahmutov labeled #8634
graydwarf
@graydwarf
Is there any documentation on how to use 'cli-plugin-e2e-cypress' with the cloud recording options (... --record --key)? Currently, we call 'yarn test' to run our cypress tests locally and I'm trying to figure out how to configure or optionally pass in --record and --key when needed. Thoughts?
CANNIBAL
@LORD_CANNIBAL_twitter
Is it possible to do API calls before and after my tests? Let's say create something via API call, do UI tests on it, then remove it via API call?
Elizaveta1105
@Elizaveta1105
Hello everyone! What behavior is supposed betweet two it? After the first "it", I have an unexpected logout after one step was made.
Elif5757
@Elif5757
How can i combine my angular unit tests coverage with e2e test coverage???????
i use istanbul
Jorrit
@jorrit-wehelp
Saranya Seetharaman
@saranyas72
How can I pass wild card character for blackout something like cy.matchImageSnapshot({ blackout: '[data-test-id="block-*"]'}); or cy.matchImageSnapshot({ blackout: 'p[contains (Location)]'}); ?
Jorrit
@jorrit-wehelp
@saranyas72 jqueyr selectors? so [data-test-id^="block-"]
cy.screenshot takes jquery selectors, but don't think i'ver ever tried it with selecters that return multiple results :)
Saranya Seetharaman
@saranyas72
nice, it works Thank you very much @jorrit-wehelp
Marius Borza
@atemor
Hello
Any cypress intern over here ?
I have trouble attaching my organisation for recording
Marius Borza
@atemor
I can set up project for an organisation.
It's alawys go to my personnal organisation
Gleb Bahmutov
@bahmutov
@9odzilla what about 5?
9odzilla
@9odzilla
@bahmutov So far I have tested 4.5 (Works), 4.11 (Works), 4.12 (Issue), 4.12.1 (Issue), 5.2 (Issue). When I get a chance I can get the versions in between 4.12.1 and 5.2 and see if I see the same issue.
Elizaveta1105
@Elizaveta1105
Hello everyone! Does anybody has an idea why beforeEach and afterEach don't work? Cypress just ignore them. beforeEach(() => {
cy.visit('https://')
cy.login()
})
afterEach(() => {
  cy.logout()
  })    
kennyg1989
@kennyg1989
image.png
can anyone explain why the view port does this? The previous command was a Cy.get('a').contains('X').click and a scroll bar is involved on that page
Gleb Bahmutov
@bahmutov
@Elizaveta1105 do you have it(... test there?
BananaboxNL
@BananaboxNL
We just updated from 5.0.0 tot 5.2.0 but ran into a problem, the NO_PROXY isn't working anymore, we can't run any tests now. Did this change after 5.0.0?
Dan Reale
@danreale

I am trying to set up a task in my plugins file that deletes a user from the database.
I am importing the asynchronous db function like so

const dbDeleteUser = require('../../dist/deleteUser');

My task looks like this where I am passing in the user that I want to delete:

    deleteUserFromDB({ user }) {
      return dbDeleteUser.run(user);
    },

The test that I have, "works" in terms of the task executing, but does not actually delete the user as expected. I believe this might be because the delete user function is async.
In my test:

cy.task('deleteUserFromDB', { username }).then((val: any) => {
      cy.log(val);
      expect(val.deletedCount).to.eql(1);
    });

I am getting 0 back and the test is failing. Anyone know how to handle async code within a task?

fyi: The function in the /dist/deleteUser file is async and returns the delete query response in full that is executed

Will Chantry
@goofiw
Has anyone been having cacheing issues with the Cypress binary on github actions over the past week or so? it sometimes restores the cache fine, but other times it fails
which causes us having to re-run the entire suite, burning tests runs and time
9odzilla
@9odzilla
@bahmutov I just got 5.0.0, 5.1.0 and both exhibit the same problem as 4.12.1
Ruheena Ansari
@ruheenaansari34

Hi all, I am trying to implement Cypress in our CI pipeline. I looked at various exit codes that Cypress returns. Looks like exit code is 1 if Cypress cannot run for some reason (setup/infrastructure failures) and if there are any test failures, then the exit code will match the number of tests that failed.

Now, the issue is Cypress returns exit code 1 if there is one test failure as well as if Cypress couldn't run. Has anyone faced this issue and how do I differentiate if exit code 1 means a test failure or setup failure?

Andreas Galster
@AndreasGalster

Anyone here hiring interns for QA/automation? Or alternatively a junior entry role :P?

I'm doing a coding bootcamp right now, I'm not yet sure if I'll go into frontend design or QA direction. I wanna explore Cypress / QA role a bit, since I have a product background which is closely related to QA IMO.

I would have pretty low weekly availability (on average ~max 2 hours a day I think, some days more than usual). I'm basically looking for opportunities to make a break into an engineering job, as a switch from my design/product roles. FYI I already have extensive self-taught coding experience of 5 years, so I'm not starting from 0 with my programming knowledge. I've already worked with cypress a little bit, I'm pretty fast at learning it.

isokissa
@isokissa
Hi I am testing gatsby-react-redux applicaion with cypress and I am experiencing problems, it seems that cypress is somehow affecting rendering of the react components in my applicaiton. When I dispatch the action to redux, the component which has property mapped to the redux state does not get rendered. The same component correctly renders when I run my application independently (out of cypress)
1 reply
Elizaveta1105
@Elizaveta1105
@bahmutov sure, 2 its. it ("first", function() {}) it ("second", function() {})
Martin H. Bramwell
@martinhbramwell
Hi everyone. I'm wondering if Cypress permits a usage scenario I'm looking for. I understand all the best-practices are aimed at CI usage, but what I want is a kind of REPL usage. Can I have Cypress logged in, open at a specific page and ready to test a few short steps the instant I save any changes to the underlying code? I'm not asking for complete instructions here, just a simple, "Nah, forget it." OR "Yeah, it does. Read this...." will do.
Elizaveta1105
@Elizaveta1105
@bahmutov I don't know how, but now it works) maybe some typo) thanks you for reply
Gleb Bahmutov
@bahmutov
@ruheenaansari34 then you better use cypress NPM module API
fctorial
@fctorial
How do I compare the values of two chai $Chainers. Specifically, I'm trying to check if two dom element have the same width. (extracted via .invoke('css', 'width'))
Devd@tt N@dre
@DevdattNadre
There is one scenario to stuck on a particular line of the script. I have used to get "abc.com " Url and perform some login operation. Once its done login part, it will be opened another url "xyz.com" And will perform some octa operation on that, after that operation. I will be switch on same as first url as "abc.com".could you please help me, how to handle such type of scenario in cypress..... Let me know, if you want some more explanation from my end.....
airandopal
@airandopal

Hi there all, just joined, hopefully i am following the xy problem layout correctly, appreciate any guidance available!! This is the gist that goes along with my question - https://gist.github.com/airandopal/b6c92033536143a73db1415528cb24d8

I'm using Next.js and getting serverside data using getServerSideProps, and it depends on stripe. The data stripe returns dictates the props passed to the page or will result in a redirect.
When I make a fake function to replace stripe, I can stub that as a dependency just fine. But I cannot seem to stub the stripe call. The imported getServerSideProps function will run and just hang when it's supposed to call the stripe stub. I think it has something to do with the fact that stripe is a constructor? The stripe node library has a note about exporting the Stripe constructor to be used with sinon, but I don't seem to be using it correctly. Also, I've seen the example with window / new Notification in the Cypress github, and tried to recreate it, but that didn't work.

So, my questions are

  • is there a better way to be going about testing this?
  • if not, how do I properly stub a dependency that is a constructor?
Sean Nowotny
@seannowotny_gitlab
Hello everyone, how do I assert, that an action fails? This is what I wrote: it(`doesn't let you select a consultant until training was specified`, () => { cy.get('select[name="instructor"]') .select(Training.Grundausbildung) .should('not.be.possible'); });
vvsvalasala
@vvsvalasala
Hello everyone, I need help on the topic: how to automate Gmail using Cypress.io, like reading Gmail body and adding assertions to the mail content, please help me with this. Thanks..
2 replies
Karl Gunnar Jonsson
@keygjones
Im looking for a way to get a number of elements from a cy.get selector ... tried cy.log('Length ' + cy.get('.hb-tabell-rad--utvidbar').its('length')) , but it returns an object ... ?
Jorrit
@jorrit-wehelp
@keygjones yeah, returns cypress chainers. It is an async-like syntax, so cy.get('.hb-tabell-rad--utvidbar').its('length').then(len => cy.log(len)); would work
Thamu Gurung
@thamu_gurung_twitter
Hi @bahmutov Would be able to please provide some information on Running Cypress Test Runner just like cypress open does in Amazon Linux ? Thanks
Elizaveta1105
@Elizaveta1105
Hi everybody! Does anybody knows, why clear() or .type('{selectall}{backspace}') work not every time. One time it clears, another time - not...(
Marius Borza
@atemor

Bonjour,
Je m'adresse aux Français du channel et plus particulierement aux Parisiens :

Je recherche un QA qui connais bien cypress ou débute avec l'outil mais qui a une solide experience en QA et appliWeb.
La perle rare est-il présent sur le channel :) ?

Je précise c'est pour une embauche en interne Asap (pas de SS2I)
Jeff Tully
@jefftully_gitlab
Hi Hi, Is it a thing that environment variables are read-only at the start of the test runner? I was fighting with CYPRESS.env all day till I restarted the test runner and BAM everything worked.
Raif Harik
@reharik
Hi is there a way to increase the number of times that cypress tries to contact the base url when starting up? we have a rails app that is kind of slow to start up and cypress keeps saying "Cypress could not verify that this server is running:"
MUHMMAD ZESHAN
@shani77_twitter
hi
I need little help regarding path and aliases
Here is my webpack.config.js file

// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');

module.exports = {
resolve: {
extensions: ['.ts', '.js', '.json'],
alias: {
Pages: path.resolve(dirname, 'cypress/integration/pages'),
Helpers: path.resolve(
dirname, 'cypress/integration/helpers'),
Utilities: path.resolve(dirname, 'src/utils'),
Constants: path.resolve(
dirname, 'src/constants'),
Interfaces: path.resolve(__dirname, 'src/interfaces'),
},
},
module: {
rules: [
{
test: /.ts$/,
exclude: [/node_modules/],
use: [
{
loader: 'ts-loader',
},
],
},
],
},
};

`// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');

module.exports = {
resolve: {
extensions: ['.ts', '.js', '.json'],
alias: {
Pages: path.resolve(dirname, 'cypress/integration/pages'),
Helpers: path.resolve(
dirname, 'cypress/integration/helpers'),
Utilities: path.resolve(dirname, 'src/utils'),
Constants: path.resolve(
dirname, 'src/constants'),
Interfaces: path.resolve(__dirname, 'src/interfaces'),
},
},
module: {
rules: [
{
test: /.ts$/,
exclude: [/node_modules/],
use: [
{
loader: 'ts-loader',
},
],
},
],
},
};
`