<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Milan Nicic</title>
    <description>The latest articles on DEV Community by Milan Nicic (@milan_nicic).</description>
    <link>https://dev.to/milan_nicic</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1046710%2F3a25fe04-e30e-4d88-b246-89972da73a10.png</url>
      <title>DEV Community: Milan Nicic</title>
      <link>https://dev.to/milan_nicic</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/milan_nicic"/>
    <language>en</language>
    <item>
      <title>Cypress-Qase integration</title>
      <dc:creator>Milan Nicic</dc:creator>
      <pubDate>Fri, 28 Apr 2023 08:50:06 +0000</pubDate>
      <link>https://dev.to/milan_nicic/cypress-qase-integration-1n2a</link>
      <guid>https://dev.to/milan_nicic/cypress-qase-integration-1n2a</guid>
      <description>&lt;p&gt;As I introduced myself in previous blogs, I will skip that part in this one. As you already saw in the title, theme for this blog will be connecting Cypress to test management tool called &lt;a href="https://qase.io/" rel="noopener noreferrer"&gt;Qase&lt;/a&gt;. So that on run in Cypress, we create a test run in Qase too!&lt;/p&gt;

&lt;p&gt;I will do it from freshly installed cypress project. After installing Cypress, we need to install dependencies &lt;a href="https://www.npmjs.com/package/cypress-multi-reporters" rel="noopener noreferrer"&gt;&lt;strong&gt;cypress-multi-reporters&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.npmjs.com/package/cypress-qase-reporter" rel="noopener noreferrer"&gt;&lt;strong&gt;cypress-qase-reporter&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now we are ready to add the configuration in order to be able to create test runs in Qase too! In &lt;strong&gt;cypress.config.js&lt;/strong&gt; we need to configuration for &lt;strong&gt;cypress-multi-reporters&lt;/strong&gt; that we installed and for &lt;strong&gt;cypress-qase-reporter&lt;/strong&gt;. Really important part here on the photo below is &lt;strong&gt;cypressQaseReporterReporterOptions&lt;/strong&gt; because  you need to setup your API token which you generate in your QASE account, you need to put your &lt;strong&gt;projectCode&lt;/strong&gt; which you can see in the QASE too, &lt;strong&gt;basePath&lt;/strong&gt; is always the same and &lt;strong&gt;rootSuiteTitle&lt;/strong&gt; is in which suite your test cases are located.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8r4pzs9bghk32uigea1e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8r4pzs9bghk32uigea1e.png" alt="Configuration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So when we setup all this, we are ready to assign values to variables &lt;strong&gt;QASE_REPORT&lt;/strong&gt; to equal &lt;strong&gt;1&lt;/strong&gt; and &lt;strong&gt;QASE_RUN_NAME&lt;/strong&gt; to equal whatever we want. In this case I am using &lt;strong&gt;Windows&lt;/strong&gt; and I will do it in &lt;strong&gt;Cypress CLI&lt;/strong&gt; as on photo below&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91vg28co7whdebm7bs02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91vg28co7whdebm7bs02.png" alt="Setting variables"&gt;&lt;/a&gt;&lt;br&gt;
In this example test run will be created in Qase app with the name &lt;strong&gt;Cypress-automation-run&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So the configuration is done, now we need to go to spec file in Cypress and import qase function as on photo below&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxvs0dphgw42746d15tdh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxvs0dphgw42746d15tdh.png" alt="import qase into specs"&gt;&lt;/a&gt;&lt;br&gt;
Then in our test we call it like this&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ljbhnj528yu8f0dsl51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ljbhnj528yu8f0dsl51.png" alt="calling qase in test"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;So the test case with the ID-1 in QASE will be displayed in the Test run when cypress finishes the run, cases that don't have ID in Qase will be created under root rootSuiteTitle &amp;gt; describe section in test &amp;gt; test cases created here&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftlr0ienceqo10fkmqvjv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftlr0ienceqo10fkmqvjv.png" alt="Created run"&gt;&lt;/a&gt;&lt;br&gt;
Useful links:&lt;br&gt;
&lt;a href="https://app.qase.io/user/api/token" rel="noopener noreferrer"&gt;https://app.qase.io/user/api/token&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/qase-tms/qase-javascript/tree/master/qase-cypress" rel="noopener noreferrer"&gt;https://github.com/qase-tms/qase-javascript/tree/master/qase-cypress&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Optimizing Your Cypress Tests: Tips for Efficient Waiting and Assertion Handling</title>
      <dc:creator>Milan Nicic</dc:creator>
      <pubDate>Tue, 21 Mar 2023 12:23:05 +0000</pubDate>
      <link>https://dev.to/milan_nicic/optimizing-your-cypress-tests-tips-for-efficient-waiting-and-assertion-handling-11da</link>
      <guid>https://dev.to/milan_nicic/optimizing-your-cypress-tests-tips-for-efficient-waiting-and-assertion-handling-11da</guid>
      <description>&lt;p&gt;Since I started writing automated tests I always looked for a best practices in terms of waiting. So lets start with basics, we all know there are &lt;strong&gt;implicit&lt;/strong&gt; and &lt;strong&gt;explicit&lt;/strong&gt; waits.&lt;/p&gt;

&lt;p&gt;Lets start with &lt;strong&gt;implicit wait&lt;/strong&gt;, for implicit wait in &lt;strong&gt;Cypress&lt;/strong&gt; we have &lt;strong&gt;cy.wait()&lt;/strong&gt; command in which we pass how much &lt;strong&gt;miliseconds&lt;/strong&gt; we want to wait. &lt;strong&gt;This is bad approach&lt;/strong&gt; and if you ask why? Here is the answer, for example if you want some element to appear and sometimes it appears in 2 seconds, sometimes in 3 seconds, sometimes in 5 seconds, you would need to put &lt;strong&gt;cy.wait(5000)&lt;/strong&gt; in order to cover the latest time in which element can appear, but if element appears in 2 seconds, you will still wait 5 seconds no matter what happens. This is why this is a &lt;strong&gt;bad approach&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead we need to use &lt;strong&gt;explicit waits&lt;/strong&gt;, in &lt;strong&gt;Cypress&lt;/strong&gt; we have multiple options on how to use &lt;strong&gt;explicit waits&lt;/strong&gt; I will count every wait that I use regularly in my tests!&lt;/p&gt;

&lt;p&gt;First of all, the one that you will use the most is &lt;strong&gt;.should()&lt;/strong&gt; command that waits for specific state for example this command in photo below will wait for element to be visible and then it will continue the test. Should command &lt;strong&gt;will constantly retry&lt;/strong&gt; to see if element is visible &lt;strong&gt;by default 4 seconds&lt;/strong&gt;, but we can change that in &lt;strong&gt;defaultCommandTimeout&lt;/strong&gt;. &lt;strong&gt;This is a good practice!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QuyGuH1h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/064oy60oyiitmdpsq5at.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QuyGuH1h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/064oy60oyiitmdpsq5at.png" alt="ShouldBeVisible" width="358" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is another way to check is element &lt;strong&gt;is visible&lt;/strong&gt;. I am using &lt;a href="https://docs.cypress.io/api/cypress-api/dom"&gt;&lt;strong&gt;Cypress helper methods&lt;/strong&gt;&lt;/a&gt; in this link there are all helper methods you can use! Particularly for this scenario I use Cypress.Dom.IsVisible as on photo below. &lt;strong&gt;Keep in mind this does exactly the same like in previous image, just another way&lt;/strong&gt;. I added this just to let you know of &lt;strong&gt;different helper methods!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RZU8FyMJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wflo6k09c5pbxs8jt8gu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RZU8FyMJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wflo6k09c5pbxs8jt8gu.png" alt="Cypress.dom.IsVisible" width="502" height="98"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Keep in mind that .click() command in &lt;strong&gt;Cypress&lt;/strong&gt; has built-in retry-ability to find and click on element, so if you have element that appears after few seconds, you don't need to use &lt;strong&gt;.should()&lt;/strong&gt; assertion before actually clicking on element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VT7wdONB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h95psyctllbv3dkoqra0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VT7wdONB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h95psyctllbv3dkoqra0.png" alt="Click retry" width="796" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tejxwL1I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ybd96f73fjobyj3ha1z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tejxwL1I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ybd96f73fjobyj3ha1z.png" alt="Click finished" width="720" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another type of &lt;strong&gt;wait&lt;/strong&gt; that we can use in &lt;strong&gt;Cypress&lt;/strong&gt; is to wait some &lt;strong&gt;API request to finish&lt;/strong&gt; before proceeding with the test. We can do this by using &lt;strong&gt;cy.intercept()&lt;/strong&gt; command as on photo below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZrkWGr4---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8foja4hrbrtsdlrzdu8u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZrkWGr4---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8foja4hrbrtsdlrzdu8u.png" alt="Intercept" width="427" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QEobN_Ar--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6unvlno49h1zfv9dbu5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QEobN_Ar--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6unvlno49h1zfv9dbu5g.png" alt="Inside Cypress Runner" width="482" height="66"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cy.wait() will resolve as soon as request is finished.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the end of this post I want to go back to &lt;strong&gt;.should()&lt;/strong&gt; command, what I want to mention is that with this command you can &lt;strong&gt;wait for almost anything&lt;/strong&gt;, e.g. if list is loading slowly and you want to wait till list has length of &lt;strong&gt;5&lt;/strong&gt; you can do that as on photo below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BiQ9jxtf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2srszuym4408w7nuif0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BiQ9jxtf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2srszuym4408w7nuif0.png" alt="Should waiting for almost anything" width="278" height="60"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are explicit waits that I constantly use in my tests, I hope you found this blog useful for your daily work! If you did, please leave a follow on &lt;a href="https://www.linkedin.com/in/milan-nicic-a58217222/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See you in next blog!&lt;br&gt;
Cheers!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to handle new window and tab in Cypress and use of cypress-map plugin</title>
      <dc:creator>Milan Nicic</dc:creator>
      <pubDate>Fri, 17 Mar 2023 11:48:25 +0000</pubDate>
      <link>https://dev.to/milan_nicic/how-to-test-new-window-and-tab-in-cypress-and-use-of-cypress-map-plugin-5del</link>
      <guid>https://dev.to/milan_nicic/how-to-test-new-window-and-tab-in-cypress-and-use-of-cypress-map-plugin-5del</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hello there! My name is Milan, and I'm a test automation engineer. As someone who's passionate about all things automation, I'm thrilled to share some of my insights and experiences with you today, particularly when it comes to using &lt;strong&gt;Cypress&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you're not already familiar with it, &lt;strong&gt;Cypress&lt;/strong&gt; is a powerful test automation tool that's quickly gaining popularity in the industry. As a long-time user of &lt;strong&gt;Cypress&lt;/strong&gt; myself, I've seen firsthand how it can help teams to streamline their testing process, improve their test coverage, and catch bugs earlier in the development cycle.&lt;/p&gt;

&lt;p&gt;In this post, I'll be diving into some of the key trends and best practices that are shaping the industry right now, with a focus on how &lt;strong&gt;Cypress&lt;/strong&gt; can help you take your automation game to the next level. Whether you're looking to optimize your test suite, troubleshoot common issues, or simply stay up-to-date with the latest automation tools and technologies, I've got you covered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to handle new tabs and browser windows in Cypress&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One common challenge in test automation is dealing with new &lt;strong&gt;browser tabs&lt;/strong&gt; or &lt;strong&gt;windows&lt;/strong&gt; that open during a test. For example, if you click on a button that opens a new tab or window, you'll need to be able to switch to that tab or window in order to interact with it. But what we should keep on our mind is that we don't want to automate browser behaviour, we want to automate the actual app.&lt;/p&gt;

&lt;p&gt;In the past, I used to search through the web for the best solution in order to be able to automate new tab and window and I will present you what approaches I am currently using when I need to handle one of those.&lt;/p&gt;

&lt;p&gt;Lets start with new tab, first of all it depends how the web application has been developed. By that I mean if the button for example has attribute &lt;strong&gt;target=_blank&lt;/strong&gt; or it opens new tab with the &lt;strong&gt;window.open&lt;/strong&gt; method. Based on this we can have 2 approaches, first one is to change the value of target attribute to _self e.g.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SFUBSXBg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/14rd8y8pze36ebe3ldye.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SFUBSXBg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/14rd8y8pze36ebe3ldye.png" alt="Update target attribute value" width="371" height="149"&gt;&lt;/a&gt;&lt;br&gt;
Or we can remove the target attribute e.g.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YFinX1ds--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zijbrdx8s5z7m4og1jzr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YFinX1ds--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zijbrdx8s5z7m4og1jzr.png" alt="Remove target attribute" width="368" height="156"&gt;&lt;/a&gt;&lt;br&gt;
What this does is that link that is inside &lt;strong&gt;href&lt;/strong&gt; attribute is being opened in the same tab instead of being open in a new tab. That way we are able to access elements on the new page.&lt;/p&gt;

&lt;p&gt;Now question that probably comes to your mind is, what if the element doesn't have target attribute, how would you automate this scenario?&lt;/p&gt;

&lt;p&gt;As I mentioned above, new tab could be triggered by window.open method so the approach in Cypress would be to stub the window.open method and assert that it is being called with proper link e.g.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZsq11xU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbpth5u859eos7swqhd0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZsq11xU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbpth5u859eos7swqhd0.png" alt="Stub window.open() method" width="594" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What this does is it creates a &lt;strong&gt;stub function&lt;/strong&gt; that replaces &lt;strong&gt;window.open()&lt;/strong&gt; method that can be controlled later on during testing. &lt;strong&gt;Alias&lt;/strong&gt; is added too so we can &lt;strong&gt;assert the behaviour&lt;/strong&gt; of stub function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cypress-map plugin&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First of all, let me take this opportunity to thank &lt;strong&gt;Gleb Bahmutov&lt;/strong&gt; for creating this great plugin!&lt;/p&gt;

&lt;p&gt;Cypress-map is really complex plugin and I won't cover all the posibilites it has, but one of them that I often use and that makes me faster doing my daily work I will!&lt;/p&gt;

&lt;p&gt;For example, you want to assert some text of list of elements in Cypress so one of the quicker ways that I was using in Cypress was Cypress._.map lodash method e.g.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DvLeSOht--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h488gaziuqpk4zeyvvb9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DvLeSOht--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h488gaziuqpk4zeyvvb9.png" alt="Lodash method" width="682" height="194"&gt;&lt;/a&gt;&lt;br&gt;
This is one way of creating a new array of values by mapping each value in the input array through a mapping function.&lt;/p&gt;

&lt;p&gt;Though now we can use &lt;strong&gt;cypress-map plugin&lt;/strong&gt; and do the same thing with just one line of code e.g.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--miAqEdxB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ounxl1fp2w2dpwhfha09.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--miAqEdxB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ounxl1fp2w2dpwhfha09.png" alt="cypress-map" width="665" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more posibilites of this plugin you can visit &lt;a href="https://github.com/bahmutov/cypress-map"&gt;https://github.com/bahmutov/cypress-map&lt;/a&gt;&lt;br&gt;
I will cover more in the future indeed!&lt;/p&gt;

&lt;p&gt;Thank you for reading this post!&lt;br&gt;
Cheers!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
