Skip to content

test: Cypress e2e setup - #2552

Open
mehulmathur16 wants to merge 10 commits into
parse-community:alphafrom
mehulmathur16:feat/e2e-tests
Open

mehulmathur16 wants to merge 10 commits into
parse-community:alphafrom
mehulmathur16:feat/e2e-tests

Conversation

@mehulmathur16

@mehulmathur16 mehulmathur16 commented May 2, 2024 •

Copy link
Copy Markdown

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

parse-github-assistant Bot commented May 2, 2024 •

Copy link
Copy Markdown

Thanks for opening this pull request!

@mehulmathur16 mehulmathur16 changed the title Added Cypress e2e setup test: cypress e2e setup May 2, 2024
@parse-github-assistant

Copy link
Copy Markdown

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

@parse-github-assistant parse-github-assistant Bot changed the title test: cypress e2e setup test: Cypress e2e setup May 2, 2024
@uffizzi-cloud

uffizzi-cloud Bot commented May 2, 2024

Copy link
Copy Markdown

Uffizzi Ephemeral Environment deployment-51174

⌚ Updated May 02, 2024, 19:29 UTC

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

📄 View Application Logs etc.

What is Uffizzi? Learn more

Comment thread src/lib/tests/e2e/dashboard.e2e.test.js Resolved
@mtrezza

mtrezza commented May 3, 2024 •

Copy link
Copy Markdown
Member

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

mehulmathur16 commented May 3, 2024 •

Copy link
Copy Markdown
Author

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

Comment thread .github/workflows/ci.yml Resolved
Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com>
Comment thread .gitignore Resolved
Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com>
Comment thread CONTRIBUTING.md Resolved
Comment thread CONTRIBUTING.md Resolved
Comment thread CONTRIBUTING.md Resolved
Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com>
Comment thread CONTRIBUTING.md Resolved
Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com>
Comment thread cypress/fixtures/example.json Resolved
Comment thread cypress/support/commands.js Resolved
Comment thread cypress/support/e2e.js Resolved
Comment thread package.json Resolved
Comment thread package.json Resolved
Comment thread src/lib/tests/e2e/dashboard.e2e.test.js Resolved
@mehulmathur16

Copy link
Copy Markdown
Author

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

);

cy.visit('/')
cy.wait(3000)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary to wait here? Doesn't cypress handle the loading and continue once the page loading finished?

@mtrezza

mtrezza commented May 4, 2024 •

Copy link
Copy Markdown
Member

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.

@mtrezza

mtrezza commented Oct 31, 2024

Copy link
Copy Markdown
Member

@mehulmathur16 would you want to pick this up again? Or maybe @dplewis? Note there is a bounty on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add UI tests to CI

2 participants