фронтенд, в котором есть наши непубличные ветки
Go to file
2024-07-13 10:34:21 +03:00
.gitea/workflows Merge branch 'feature/e2e-tests' into router-upgrade 2024-07-04 01:25:07 +03:00
.github/workflows feat: e2e_tests job is started in case if ci all jobs are successeful. In output return github.event.depolyment ststus for debug. (not a prod mode) 2024-07-08 09:52:32 +00:00
.vscode sass-depr-suppres 2024-07-12 19:00:30 +03:00
api ga-integration 2024-06-26 11:22:05 +03:00
patches hub 2024-02-16 17:56:56 +03:00
public feed-wip 2024-07-03 20:38:43 +03:00
src author-page-view 2024-07-13 10:02:05 +03:00
templates preprocess-text-fix 2024-07-05 22:40:54 +03:00
tests e2e-title-check-fix 2024-07-09 17:32:48 +03:00
tests-with-auth fix: without auth playwright tests, they are in tests-with-auth dir. testing 2024-07-08 10:10:35 +00:00
.editorconfig init 2022-09-09 14:53:35 +03:00
.gitignore author-page-wip 2024-07-13 10:01:41 +03:00
.npmrc Merge branch 'editor' of gitlab.com:discoursio/discoursio-webapp into editor 2023-04-26 02:37:29 +00:00
.stylelintignore store layer 2022-09-13 12:30:36 +02:00
.stylelintrc.json stylelint-order-fmt 2024-07-12 16:19:49 +03:00
app.config.ts vercel-fix 2024-07-13 10:34:21 +03:00
biome.json home-tops 2024-06-28 10:47:38 +03:00
codegen.yml new-api 2024-03-04 15:32:48 +03:00
LICENSE e2e 2024-02-04 16:25:23 +03:00
package-lock.json sass-depr-suppres 2024-07-12 19:00:30 +03:00
package.json author-page-wip 2024-07-13 10:01:41 +03:00
playwright.config.ts fix: playwright config with baseURL env bar. 2024-07-08 10:24:07 +00:00
README.en.md author-page-wip 2024-07-13 10:01:41 +03:00
README.md author-page-wip 2024-07-13 10:01:41 +03:00
tsconfig.json tsc-ok 2024-06-25 14:25:20 +03:00

Development setup recommendations

How to start

Use bun i, npm i, pnpm i or yarn to install packages. Then generate cert and key file for devserver with mkcert localhost.

Config of variables

  • Use .env file to setup your own development environment
  • Env vars with prefix PUBLIC_ are widely used in /src/utils/config.ts

Useful commands

run checks, fix styles, imports, formatting and autofixable linting errors:

bun run typecheck
bun run fix

End-to-End (E2E) Tests

This directory contains end-to-end tests. These tests are written using Playwright

Structure

  • /tests/*: This directory contains the test files.
  • /playwright.config.ts: This is the configuration file for Playwright.

Getting Started

Follow these steps:

  1. Install dependencies: Run npm run e2e:install to install the necessary dependencies for running the tests.

  2. Run the tests: After using npm run e2e:tests.

Additional Information

If workers is no needed use:

  • npx playwright test --project=webkit --workers 4

For more information on how to write tests using Playwright - Playwright documentation.

🚀 Tests in CI Mode

Tests are executed within a GitHub workflow. We organize our tests into two main directories:

  • tests: Contains tests that do not require authentication.
  • tests-with-auth: Houses tests that interact with authenticated parts of the application.

🔧 Configuration:

Playwright is configured to utilize the BASE_URL environment variable. Ensure this is properly set in your CI configuration to point to the correct environment.

📝 Note:

After pages have been adjusted to work with authentication, all tests should be moved to the tests directory to streamline the testing process.