Skip to content

Introduce E2E tests#49

Merged
ScriptyChris merged 58 commits intodevelopfrom
maintenance/introduce-e2e-tests
Feb 25, 2022
Merged

Introduce E2E tests#49
ScriptyChris merged 58 commits intodevelopfrom
maintenance/introduce-e2e-tests

Conversation

@ScriptyChris
Copy link
Copy Markdown
Owner

Partially related to #22.

  • automate database population during it's initialization by script located in Docker's
    /docker-entrypoint-initdb.d folder
  • add Mailhog as Docker service
  • add Cypress as Docker service and add some E2E tests for start (user registration, login, reset password, checking account features list)
  • place unit tests inside /test/unit folder to have them separated from E2E tests (located in /test/e2e)
  • move Docker related files to separate folder

…abase connector module, which is used by database-index.ts and populate.ts modules; Prepare project for E2E tests with Cypress framework - it's ran via Docker;
…; Add E2E tests: 're-send registration confirmation email', 'redirect to login page from registration popup' and 'reset user password';
…, install 'express' and uninstall 'body-parser' (it's now used from 'express' module); Change '__mocks__/**' modules to export CommonJS instead of ESM to minimize problems related to default imports in source code and unit tests; Simplify chained mocking and requiring mocks in unit tests by helper function;
…e or convenient account creationg and login); Extend Login and Register related E2E tests;
…sed element selectors to unified [data-cy] custom attribute selectors;
…s - add executing registration/confirmation/login processes over UI in there; Fix parsing registration confirmation token by frontend; Add arbitrary wait time before fetching emails from Mailhog;
…gistration; Rename DELETE user 'query' prop to 'rawQuery' to be contextually more readable;
…unt by APIs (without touching UI) to speed up tests that don't need to check UI in these 'user session' phases;
@ScriptyChris ScriptyChris added the maintenance Actions related to building, testing, refactoring etc. that don't directly affect using app label Jan 27, 2022
…ally create .env (based on .env.example) if it doesn't exist;
…ules folder and echo message when node_modules doesn't exist;
…led, only authorized clients can connect

LOCAL:
SI:localuser:scriptychris status;
…result of access control enabled, only authorized clients can connect

LOCAL:
SI:localuser:scriptychris;
…ring Docker image build to avoid implicitly deleting it by volume;
…ode to JavaScript - Cypress has built-in ts-node, so it can execute TS on the fly; Introduce module path aliases for whole app; Rename root's /utils to /commons and include it in prettifying/linting process; Rename /test/unit/test-index to /test/unit/utils and /test/unit/mockUtils to /test/unit/inline-mocks;
…on code changes; Fix nodemon not watching '.ts' files; Refactor nodemon usage to utilize it's config files; Check if app is built (with available dependencies) before running E2E in development mode;
@ScriptyChris ScriptyChris merged commit e89a22d into develop Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Actions related to building, testing, refactoring etc. that don't directly affect using app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant