Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic E2E Cypress Tests #18

Merged
merged 21 commits into from
Jun 25, 2019
Merged

Add basic E2E Cypress Tests #18

merged 21 commits into from
Jun 25, 2019

Commits on Jun 25, 2019

  1. WIP

    - basic e2e tests for main home page
    - working on adding TS support and imports
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    92b84a6 View commit details
    Browse the repository at this point in the history
  2. Working

    - added basic e2e tests for the Books, Cart, and Checkout
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    241a5af View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2e68528 View commit details
    Browse the repository at this point in the history
  4. WIP

    - fixing online issues
    - replaced http-server with spa-http-server that has push-state for fallback 404 routing since routing is done in SPA not backend
    - added a response fixture to the limits users test in Cart because we need images for the elements to have dimension
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    313f325 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9ce2cc8 View commit details
    Browse the repository at this point in the history
  6. WIP

    - tweaking the spa-http-server setup for travis
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    648984d View commit details
    Browse the repository at this point in the history
  7. Fix

    - relative linking
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    d0392e7 View commit details
    Browse the repository at this point in the history
  8. Tweaks

    - getting close to merge
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    a040060 View commit details
    Browse the repository at this point in the history
  9. Tweak

    - min width & height on book to try to fix an issue of some images not loading in time for test
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    a54bf83 View commit details
    Browse the repository at this point in the history
  10. Working

    - stubbed the open library books response with less data & without cover images (I believe we hit a limit on requesting images through our test suites, which makes sense since it keeps requesting images over and over in E2E)
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    543e09c View commit details
    Browse the repository at this point in the history
  11. Reorganizing

    - use beforeEach() for clearing local storage between tests
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    8c6ae89 View commit details
    Browse the repository at this point in the history
  12. Fix

    - book is a smart component that isnt being rendered in the DOM as taking space, but a placeholder for children elements too. So let's find the `mat-card` and click that instead
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    de3ee1f View commit details
    Browse the repository at this point in the history
  13. WIP

    - basic integration test for OpenLibrary.org API but OpenLibrary.org is down right now! The demo site doesnt work unless you've already visited it recently (so it cached the response data in local storage)
    - more reason to add a backend to this project...
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    75f8295 View commit details
    Browse the repository at this point in the history
  14. WIP

    - turned off test suite for open library API
    - added basic min width & height to mat-card inside Book-Ui
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    88cb2b7 View commit details
    Browse the repository at this point in the history
  15. WIP

    - actually skip api test, not pending
    - trying to force mat-card to have some size in DOM with out images... strangely enough it works fine locally with the same command but breaks remotely during CI
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    4186a13 View commit details
    Browse the repository at this point in the history
  16. Tweak

    - instead of doing it artifically with CSS, when there is no image, just display the Book id (for now)
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    91f3d48 View commit details
    Browse the repository at this point in the history
  17. Test

    - strange, trying to get this to work in PR build too
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    5028235 View commit details
    Browse the repository at this point in the history
  18. Attempt

    - use alt attr in img
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    ec624f5 View commit details
    Browse the repository at this point in the history
  19. Attempt

    - let's make cypress wait for the backend stub to resolve before trying to click an element whose rendering is effected
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    c0c11fe View commit details
    Browse the repository at this point in the history
  20. Fix

    - should have checked locally 1st
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    95a431a View commit details
    Browse the repository at this point in the history
  21. Working

    - setup stub response, visit page which triggers API call, but wait before clicking for that API call to resolve
    mrWh1te committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    60d3c51 View commit details
    Browse the repository at this point in the history