parse-community / parse-dashboard

A dashboard for managing Parse Server
https://parseplatform.org
Other
3.74k stars 1.39k forks source link

test: Cypress e2e setup #2552

Open mehulmathur16 opened 5 months ago

mehulmathur16 commented 5 months ago

Follow this for running e2e tests on local :

  1. Run npm dashboard for running the server.
  2. If you want to run tests on UI interactive mode. Execute npm run cypress:open. This script will open cypress UI, then you need to select e2e testing, after which you can run specific tests.

OR

  1. If you want to run all tests on CLI, execute npm run cypress:run.

Currently, some tests might fail, as I have made changes to src/ react components, which are not updating while I was testing this out on my local system. The npm run dashboard command seems to serve the same UI always.

Closes: #2007

parse-github-assistant[bot] commented 5 months ago

Thanks for opening this pull request!

parse-github-assistant[bot] commented 5 months ago

I will reformat the title to use the proper commit message syntax.

uffizzi-cloud[bot] commented 5 months ago

Uffizzi Ephemeral Environment deployment-51174

:watch: Updated May 02, 2024, 19:29 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2552

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

mtrezza commented 5 months ago

Could you add the UI test to the CI by adding something like this to ci.yml?

check-ui:
    name: UI Check
    timeout-minutes: 15
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Use Node.js ${{ env.NODE_VERSION }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: npm
      - name: Install dependencies
        run: npm ci --ignore-scripts
      - name: UI Check
        run: npm run cypress:run

And could you check the failing lint job?

mehulmathur16 commented 5 months ago

@mtrezza I have resolved the above. Can you please approve the workflow request ?

mehulmathur16 commented 5 months ago

@mtrezza Some cypress tests are failing currently. I'll fix them in sometime.

mtrezza commented 5 months ago

Could we move the Cypress tests into a subdirectory ui of the existing tests? Just so that tests are all in one place.

And what are the benefits of choosing Cyprus over puppet to you? Is it faster, more popular, more versatile, etc? One criterium we should keep in mind is that we want to make it as easy as possible for contributors to write tests along with their PRs, so we improve the coverage.