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

360-fix-e2e-specs #371

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

360-fix-e2e-specs #371

wants to merge 30 commits into from

Commits on Feb 5, 2024

  1. wip: fix the broken browse test

    we're importing the waresFixture so that we can,
    access the new request page as an unauthorized user.
    
    - ref: #360
    
    Co-authored-by: alisha evans <[email protected]>
    DaltonMcauliffe and alishaevn committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    d924336 View commit details
    Browse the repository at this point in the history
  2. refactor browse.cy.js

    update the spec to account for the "new request" flow as an authorized
    and unauthorized user. left TODO's for dalton, adrian and jean to pick
    up when they return to this work.
    alishaevn committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    5dceb17 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Merge branch 'main' into 360-fix-e2e-specs

    LEARN Academy authored and LEARN Academy committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    5c01246 View commit details
    Browse the repository at this point in the history
  2. Restored previously working browse specs

    Co-authored-by: Alisha Evans <[email protected]>
    2 people authored and LEARN Academy committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    d309919 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. fix the broken browse page specs

    the intercept command was not ever working. now, we are expecting to use
    the real api calls instead of mocked ones. this is to ensure that our
    critical paths of browsing and creating a request are always working,
    even when the api is updated.
    
    I also refactored part of the browse page specs into the home page spec,
    since that's the flow it was actually testing. also edited the cypress
    config to make it more dynamic, which will help with this code existing
    in the various client codebases.
    alishaevn committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    0997e35 View commit details
    Browse the repository at this point in the history
  2. update the browse spec to check 10 services

    there may potentially be hundreds of services on a page. to avoid
    a timeout, we will only choose from 10 services. this still ensures
    that a variety of dynamic forms are tested
    alishaevn committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    8d41406 View commit details
    Browse the repository at this point in the history
  3. browser spec updated

    LEARN Academy authored and LEARN Academy committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    573bee6 View commit details
    Browse the repository at this point in the history
  4. able to log in a user on the browse spec

    Co-authored-by: Dalton Mcauliffe <[email protected]>
    Co-authored-by: Adrian Carranza <[email protected]>
    3 people committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    5ed092a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    175c037 View commit details
    Browse the repository at this point in the history
  6. correctly testing that reaching a request page as a logged in user works

    Co-authored-by: DaltonMcauliffe <[email protected]>
    Co-authored-by: Adrian Carranza <[email protected]>
    3 people committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    2e0d5d5 View commit details
    Browse the repository at this point in the history
  7. remove the 'only'

    alishaevn committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    326b54d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f222cac View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    abcfa62 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2024

  1. Configuration menu
    Copy the full SHA
    a8eef12 View commit details
    Browse the repository at this point in the history
  2. increase the default timeout for browse tests

    loading a full browse page can take a while. the beachside biotech provider has 585
    services and we're loading them all at once. certain services also have more complex
    dynamic forms, which could mean it takes longer for them to load. increasing the
    timeout for both operations prevents a failure due to time, opposed to assertion.
    alishaevn committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    9d1a8ac View commit details
    Browse the repository at this point in the history
  3. cypress env updates

    alphabetize the env variables
    add the secrets to the github workflow so they can be picked up by CI
    alishaevn committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    db10801 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b782b26 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. specify the environment to use for cypress tests

    currently, all cypress tests are failing in ci through github actions
    with the error below.
    ```
    Error: [next-auth][error][NO_SECRET]
    https://next-auth.js.org/errors#no_secret Please define a `secret` in production. MissingSecret [MissingSecretError]: Please define a `secret` in production.
    ```
    
    the value of `NEXTAUTH_SECRET` has been set in the staging and production
    github environments however. running the job in debug mode shows that the
    secret's value is returning as null.
    ```
    ```
    
    this commit is an attempt to get the tests to pass in ci by specifying the environment to use for cypress tests. hopefully it'll pick up the secret.
    alishaevn committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    ae53512 View commit details
    Browse the repository at this point in the history
  2. add the NEXTAUTH_URL to the cypress job

    attempt to get around new ci error:
    ```
    [next-auth][warn][NEXTAUTH_URL]
    https://next-auth.js.org/warnings#nextauth_url
    ```
    alishaevn committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    c988026 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. only request 10 services in the browse specs

    intercepting the `useFilteredWares` hook to only request 10 services.
    we're still hitting the actual api, but hopefully this will speed things
    up, while still providing dynamic form variety.
    alishaevn committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    511f7d9 View commit details
    Browse the repository at this point in the history
  2. create the waitForElement command

    attempt to get around long timeouts by waiting for an expected element
    to be on the page before continuing
    alishaevn committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    49989cb View commit details
    Browse the repository at this point in the history
  3. formatting

    alishaevn committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    d566d87 View commit details
    Browse the repository at this point in the history
  4. run cypress specs headed in ci

    when running specs locally with "cypress open" (headed), they pass.
    they fail locally when running "cypress run"(headless) for timeout issues.
    ci also runs headless, and gets timeout issues. I'm updating the config
    to run headed in ci in an attempt to get them to pass.
    
    ref: cypress-io/github-action#403 (comment)
    alishaevn committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    3479ce0 View commit details
    Browse the repository at this point in the history
  5. pass cypress workflow specific command

    the change in 3479ce0 still erred. I created a new
    script for the cypress workflow to call specifically.
    
    ref: cypress-io/github-action#403 (comment)
    alishaevn committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    d09233e View commit details
    Browse the repository at this point in the history
  6. use port 3001 in ci

    alishaevn committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    bd00f6c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f5a064d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    064dfa3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7bdd439 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. increase the defaultCommandTimeout

    also wait for more elements to appear on the page before running assertions
    alishaevn committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    a6de9cd View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Configuration menu
    Copy the full SHA
    9ee6f90 View commit details
    Browse the repository at this point in the history