CYPRESS FIXTURES EXPLAINED | Cypress Tutorial for BEGINNERS

Sdílet
Vložit
  • čas přidán 11. 09. 2024

Komentáře • 26

  • @joanmedia
    @joanmedia  Před 3 lety +1

    🤖DISCORD: discord.gg/2F9E2fRGaU
    ⭐PREMIUM Cypress + Typescript course: shorturl.at/dcnPn
    📣FREE Cypress videos: shorturl.at/h6iEX

  • @ninachav5262
    @ninachav5262 Před 3 lety +1

    Just WOW. Thank you so so much, everything is very clear. Please post more videos about Cypress, everything is very helpful. Absolutely subscribeded. Thank you again.

    • @joanmedia
      @joanmedia  Před 3 lety

      Hi Nina! Thank you for your lovely words. Here you have more than 20 videos and I upload 1 per week! czcams.com/play/PLYDwWPRvXB8-8LG2hZv25HO6C3w_vezZb.html

  • @leonardosetti
    @leonardosetti Před 2 lety +1

    Amazing! Just what I am searching for. Thanks, and keep going with your marvelous mood!

  • @staulik
    @staulik Před 2 lety +1

    The best of all..

  • @danr4826
    @danr4826 Před 2 lety +2

    Wouldn't we want to store credentials as environmental variables instead of passing them through fixure files? Either way I understood the concept it was well explained. Just stumbled upon your channel and subscribed already. Amazing that you do videos in Spanish and English makes it unique content.

    • @joanmedia
      @joanmedia  Před 2 lety +1

      It would be another good approach :) the idea was to explain the concept of fixtures as you said.
      Thanks for the comment Dan!

  • @enjelmarkaldave7343
    @enjelmarkaldave7343 Před 3 lety +2

    This is nice hope more tutorials coming. And also can you provide source code in every tutorial?

    • @joanmedia
      @joanmedia  Před 3 lety

      Hi Enjel, welcome to this channel.
      Hopefully a video per week you will find in this channel, so check it out.
      The repository right now is at: git clone bitbucket.org/joanesquivel/cypress_e2e_automation_framework.git
      In a near future will be moved to github.

  • @joaquinpareja113
    @joaquinpareja113 Před 2 lety +2

    Hey i ve actually tried to using a similar code but with xpath, but it is trowing me the error of cy.type() can only accept a string or number. You passed in: undefined any ideas?

  • @JoolieEm
    @JoolieEm Před rokem

    Hello, thank you for your great work :) Do you perhaps, have a repo for these projects maybe so that we could clone it?

  • @matejsopor5834
    @matejsopor5834 Před rokem

    Thanks for tge video. What would be the best option to use if I want to run the same collection of the tests against
    multiple environmets. Should I use the fixtures folder where I would create file for each environment and than just calling the right one in command line? or is there any other and better solution ?

  • @dpdeepakparmar
    @dpdeepakparmar Před 2 lety

    Hi, fixture files make sense. But the thing is we have credentials stored in file under fixtures folder. It is fine to run the tests locally but what if are running our tests from CI/CD pipeline and we don't want to keep our credentials file on git repo. In that scenario how and where can we store our cred file so that it can be used while running tests in pipeline.

  • @SachinKumar-et7oi
    @SachinKumar-et7oi Před 2 lety

    how to download file in fixtures/downloads folder. I'm using POM structure for end-end testing. I need to compare that file is found in that download location.

  • @manulourdes
    @manulourdes Před 2 lety +1

    Hey Joan! hay forma de iterar utilizando este formato de fixtures? tiene tu otro video de como iterar pero sin utilizar el cy.fixture

    • @joanmedia
      @joanmedia  Před 2 lety

      Hola Manu! Algún ejemplo para entender mejor?

    • @manulourdes
      @manulourdes Před 2 lety +1

      @@joanmedia czcams.com/video/rEJFrj2mZdc/video.html&ab_channel=JoanMedia como mencionas en este video no es la mejor practica pero es un buen work around, hay algun forma de mandar a llamar el JSON utilizando fixtures como en este video e iterar atraves de esos datos? ya que cuando lo hago en codigo me regresa un undefined

    • @joanmedia
      @joanmedia  Před 2 lety

      @@manulourdes Hola Manu, segun comprendo no es posible por la naturaleza del metodo... pero honestamente podria darle una ojeada apenas pueda, a ver si se podra :D

  • @hayathbasha4519
    @hayathbasha4519 Před 2 lety +1

    If I place the cypress fixture in beforeEach block it works fine.
    If I place in before block it throws error for some of the test cases
    Please advise

    • @joanmedia
      @joanmedia  Před 2 lety

      " In fact, Cypress does not clean up its own internal state when the test ends. We want you to have dangling state at the end of the test! Things like stubs, spies, even routes are not removed at the end of the test. This means your application will behave identically while it is running Cypress commands or when you manually work with it after a test ends.
      There's nothing explicit about fixtures in that page but, it looks like its happening and fixtures are cleaned too. Thats the beforeEach() works in the first test (Check the state of the button bar), because it runs exactly after the before(). For the second test all that has been setted in the before hook is gone and now the beforeEach() is trying to get fixtures that were never defined."
      That an kind of explanation of why it happens.

  • @anucoonjan3348
    @anucoonjan3348 Před 3 lety +1

    Hello, is there a way we can compare values from a dropdown to a json file..The values in the json file are not in the same order as in the dropdown.Thanks

    • @joanmedia
      @joanmedia  Před 3 lety

      Hi Anu, I think you can use "within", so you can find the elements inside of the dropdown, maybe? docs.cypress.io/api/commands/within#Yields