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

test: Cypress e2e setup #2552

Open
wants to merge 10 commits into
base: alpha
Choose a base branch
from

Conversation

mehulmathur16
Copy link

@mehulmathur16 mehulmathur16 commented May 2, 2024

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

Copy link

parse-github-assistant bot commented May 2, 2024

Thanks for opening this pull request!

@mehulmathur16 mehulmathur16 changed the title Added Cypress e2e setup test: cypress e2e setup May 2, 2024
Copy link

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
Copy link

uffizzi-cloud bot commented May 2, 2024

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

@mtrezza
Copy link
Member

mtrezza commented May 3, 2024

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
Copy link
Author

mehulmathur16 commented May 3, 2024

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

.github/workflows/ci.yml Outdated Show resolved Hide resolved
Signed-off-by: Manuel <[email protected]>
.gitignore Outdated Show resolved Hide resolved
Signed-off-by: Manuel <[email protected]>
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Signed-off-by: Manuel <[email protected]>
CONTRIBUTING.md Outdated Show resolved Hide resolved
cypress/fixtures/example.json Outdated Show resolved Hide resolved
cypress/support/commands.js Outdated Show resolved Hide resolved
cypress/support/e2e.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/lib/tests/e2e/dashboard.e2e.test.js Show resolved Hide resolved
@mehulmathur16
Copy link
Author

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

);

cy.visit('/')
cy.wait(3000)
Copy link
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
Copy link
Member

mtrezza commented May 4, 2024

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
Copy link
Member

mtrezza commented Oct 31, 2024

@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