Giter VIP home page Giter VIP logo

stress-free-testing's Introduction

Stress-free Testing with Vue 3, Cypress, and Vite

A pre-conference workshop for Vue Toronto 2021

๐Ÿ”— Quick Links: Vue Test Utils API for Vue 3, Lachlan Miller's Vue Testing Handbook, Interacting with Elements using Cy Commands, Cypress API, Chai Matchers

Get Ready for the Day

Good morning! Either before or at the beginning of the workshop, make sure to set up your environment:

  1. If you don't already have it... install Node >= 14.17.0 with nvm and install yarn.

  2. Clone either the Stress Free Testing.

    gh repo clone JessicaSachs/stress-free-testing # Github CLI
  3. Run yarn install.

  4. Download the recommended Desktop Apps (Miro + Figma).

  5. Install the recommended VSCode Extensions. You should see a small prompt pop up in the bottom-right corner of VSCode once you open the repository.

  6. Sign up for Miro and open the board.

  7. Open the Figma File and look through the mocks.

Github Repositories

The accompanying repository for the "Stress-free Testing with Vue 3 and Vite" workshop is located at Stress Free Testing. All parts of this workshop will be completed in this repo. If you get lost or need to reset your workspace to a known good state, you may refer to the map of branches below.

Section Branch Description
๐Ÿ”ฐ The Beginning 1-the-beginning The "Hello World" Scaffold, great starting point for a template.
๐Ÿค Simple Mount 2-simple-mount Working with Vue Test Utils' Syntax and JSX Syntax.
๐Ÿ›  Setup Environment 3-setup-environment How to keep your tests production-like.
๐Ÿ’… The Product Card 4-the-product-card Testing your first presentational component.
๐Ÿ•ต Powerful Mock Data 5-powerful-mock-data Use faker to generate realistic data and stress-test your UI.
๐Ÿ”ˆ Emitted Events 6-emitted-events Assert custom and native events were invoked using cy.spy().
๐ŸŽฐ Slots 7-slots Testing slots easily with JSX.
๐ŸŽฐ ๐ŸŽฐ Scoped Slots 8-scoped-slots Testing scoped slots not-as-easily with JSX.
๐Ÿ”— Router 9-router Navigate throughout your application using Vue Router v4.
๐Ÿ“ฆ Stores and Plugins 10-stores-and-plugins Learn how to test a Pinia store.

App Downloads

Tooling

Ecosystem

  • Vue 3 with the new <script setup> syntax.
  • Vite for lightning-fast development.
  • Component Testing with Cypress Component Testing.
  • End-to-end Testing with Cypress E2E Testing.
  • Headless UI for quick and easy dropdowns, tabs, and more.

Styling

  • Windi CSS Logo WindiCSS, a Tailwind-compatible Utility CSS Framework for use within tests.
  • Iconify Icons to beautify the UI.

VSCode Extensions

Please use VSCode with Recommended Extensions for the best Developer Experience. Other editors should work fine, however support for all language features used in this workshop has not been tested.

  • Volar for Vue Syntax Highlighting.
  • Chris Breiding's Test Utils for toggling it.only and describe.only
  • Antfu's Iconify Visualizer to preview icons in your templates and script tags.
  • ESLint with Prettier for formatting.

stress-free-testing's People

Contributors

jessicasachs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.