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

Adjust E2E tests for project configuration changes #863

Open
wants to merge 94 commits into
base: feat/project-config
Choose a base branch
from

Conversation

maximilianoertel
Copy link
Collaborator

@maximilianoertel maximilianoertel commented Oct 10, 2024

Proposed changes

This PR introduces a series of changes to our E2E tests in order to mostly improve compatibility with the introduced changes related to environment configuration.

Infrastructure

  • Environment variables for Cypress are now prefixed with CYPRESS_ to follow the Cypress naming practices (docs)
  • Environment variables loaded from the .env.test file are parsed by dotenvx and only variables containing the prefix are loaded into Cypress. Mimicking Cypress's native behaviour, the prefix is stripped before injecting the variables.
  • Environment variables can be directly accessed in tests without needing to first the map them inside the Cypress config.
  • Test runs are now reported using an updated naming pattern and tags, improving overall DX in Cypress Cloud.
  • Tests now run in 4 instead of 2 containers per browser, effectively reducing total execution time.
Screenshot 2024-11-26 at 22 28 44

Tests

  • The login command is improved by introducing both a redirect assertion and additional validation.
  • All (well, almost all) arbitrary timeouts are removed. This required minor refactoring of failing and flaky tests.
  • Related tests are consolidated for better organization and maintainability.
  • Tests now follow a new naming pattern, improving overall readability and DX.
  • Except for the removal of timeouts, the super admin test suite was not changed as the whole suite is under review.
  • Similarly, the network tests were not updated as they are currently failing and will be updated in a follow-up PR.
Screenshot 2024-11-27 at 15 57 05

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (non-breaking change that does not add functionality but makes code cleaner or more efficient)
  • Documentation Update
  • Tests (new or updated tests)
  • Style (changes to code styling)
  • CI (continuous integration changes)
  • Repository Maintenance
  • Other (please describe below)

Checklist

  • I have read the guidelines for contributing.
  • The changes in this PR are as small as they can be. They represent one and only one fix or enhancement.
  • Linting checks pass with my changes.
  • Any existing unit tests pass with my changes.
  • Any existing end-to-end tests pass with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • If this PR fixes an existing issue, I have added a unit or end-to-end test that will detect if this issue reoccurs.
  • I have added JSDoc comments as appropriate.
  • I have added the necessary documentation to the roar-docs repository.
  • I have shared this PR on the roar-pr-reviews channel (if I have access)
  • I have linked relevant issues (if any)

Justification of missing checklist items

n/a

Further comments

n/a

Resolves https://github.com/yeatmanlab/roar-project-management/issues/585

Copy link

github-actions bot commented Oct 10, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 4.98% 380 / 7629
🔵 Statements 4.88% 411 / 8405
🔵 Functions 6.12% 115 / 1879
🔵 Branches 2.29% 105 / 4585
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/AppSpinner.vue 0% 100% 0% 0% 2-5
src/components/CardAdministration.vue 0% 0% 0% 0% 182-44
src/components/ConsentModal.vue 0% 0% 0% 0% 34-4
src/components/ListOrgs.vue 0% 0% 0% 0% 194-137
src/components/NavBar.vue 0% 0% 0% 0% 87-58
src/components/RoarDataTable.vue 0% 0% 0% 0% 707-529
src/components/auth/RegisterChildren.vue 0% 0% 0% 0% 383-348
src/constants/routes.js 100% 100% 100% 100%
src/pages/HomeAdministrator.vue 0% 0% 0% 0% 147-51
src/pages/HomeParticipant.vue 0% 0% 0% 0% 116-53
src/pages/SignIn.vue 0% 0% 0% 0% 159-123
src/pages/StudentReport.vue 0% 0% 0% 0% 203-161
src/router/index.js 0% 0% 0% 0% 8-487
Generated in workflow #1223 for commit 4b8c1d4 by the Vitest Coverage Report Action

Copy link

cypress bot commented Oct 10, 2024

@maximilianoertel maximilianoertel force-pushed the ref/project-config-ci-e2e branch from 0a1244c to a7e55ec Compare October 10, 2024 22:04
@maximilianoertel maximilianoertel changed the title ref/project-config-ci-e2e Adjust E2E tests for project configuration changes Oct 10, 2024
@maximilianoertel maximilianoertel self-assigned this Oct 10, 2024
@maximilianoertel maximilianoertel added the enhancement New feature or request label Oct 10, 2024
@maximilianoertel maximilianoertel marked this pull request as ready for review October 11, 2024 14:03
@maximilianoertel maximilianoertel requested a review from a team as a code owner October 11, 2024 14:03
@maximilianoertel maximilianoertel force-pushed the ref/project-config-ci-e2e branch 4 times, most recently from c982d63 to 8620452 Compare October 14, 2024 15:39
@maximilianoertel maximilianoertel changed the base branch from ref/project-config-ci to ref/project-config October 14, 2024 23:11
@maximilianoertel maximilianoertel changed the base branch from ref/project-config to ref/project-config-ci October 14, 2024 23:11
@maximilianoertel maximilianoertel force-pushed the ref/project-config-ci-e2e branch 2 times, most recently from e1f8a4f to ce3bccb Compare November 22, 2024 23:02
@maximilianoertel maximilianoertel force-pushed the ref/project-config-ci-e2e branch from cfc9cb0 to eaf62d5 Compare January 15, 2025 16:32
@maximilianoertel maximilianoertel force-pushed the ref/project-config-ci-e2e branch from e0dbe80 to 4b8c1d4 Compare January 16, 2025 15:36
Base automatically changed from ref/project-config-ci to feat/project-config January 16, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants