Refactor Cypress API Tests Part 1: Use cy-spok Plugin @gleb
Refactor Cypress API Tests Part 1: Use cy-spok Plugin  @gleb
Uploaded June 2024 | Updated November 2026, 2 days ago
In this video, I refactor API tests found in the repo github.com/EvgeniiDolzhenko/cypress-conduit-api You can find my refactoring in the branch "refactor1" of the repo github.com/bahmutov/cypress-conduit-api
- I will use cy-spok plugin github.com/bahmutov/cy-spok to write more powerful and shorter assertions for the response objects
- I will remove "cy.then" callbacks that simply check a property in the current subject
- I will validate the env settings value before using it
For more lessons showing cy-spok and cypress-plugin-api, see my "Cypress Plugins" course https://cypress.tips/courses/cypress-plugins
VSCode color theme: "Dark Theme by Marcelo"
Refactor Cypress API Tests Part 1: Use cy-spok PluginCheck If Cypress Has An Alias Before Getting ItVerify Cypress Component Prop Calls Using Stubs, cypress-map, and cy-spok
gleb bahmutov |

Refactor Cypress API Tests Part 1: Use cy-spok Plugin

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER