Illust
MarketplaceGlobal Art MapBlogTwitter
  • Illust.space
  • .github
    • pull_request_template
  • docs
    • Illust Dev Docs
    • Packages
    • process
    • dev-workflow
      • Deployment
      • Development process
      • Visual Studio Code
    • libraries
      • Storybook
      • Act
      • Aframe
      • Chakra UI
      • Cypress
      • Hosting
      • React Three Fiber
        • Shadows
      • Firebase
        • Firestore
      • zustand
      • Firebase Url Shotener
    • Flows
      • User Sign In
      • Aframe AR Map
  • packages
    • Illust API
    • Illust Marketplace
    • Migrate DB
    • scraper
    • Illust Shared
    • Illust WebAR Discovery App
  • Illust Code Style Guide
    • JavaScript/TypeScript
    • Code Orgainzation
    • React
    • Testing
  • Knowledge Base
    • React
      • Hooks
Powered by GitBook
On this page
  • Setup steps
  • Notes

Was this helpful?

  1. docs
  2. libraries

Cypress

https://www.cypress.io/

Setup steps

  • Download and set up firebase emulators if you have not already: firebase init emulators

    • You may be prompted to install the JDK. Find the latest JDK here: https://www.oracle.com/java/technologies/downloads/

  • Import the staging version of the database (ask Will for this)

  • Stop and restart your local api server to make sure all emulators are running

  • To start the Cypress UI run yarn test:integration from the scraper folder

Notes

  • The visit() Cypress command has been overwritten to use some default options we use most often for testing. window.eth is mocked by default. For tests where you do not want window.eth mocked, pass "mockEthProvider": false in the options object as the second argument of the command.

  • When you write tests that create new records, please be sure to remove them. I tried to set this up to delete firebase auth user records after each test, as well.

  • I have seen some flakiness in tests but so far that's usually related to XHR requests taking longer than usual on some test runs. You can ask Cypress to wait for those requests to finish before continuing with your assertions using cy.wait(). Take a look at home_page_spec.ts to see how this is done.

PreviousChakra UINextHosting

Last updated 3 years ago

Was this helpful?