Skip to content

1679 setup end to end tests #1585

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

Merged
merged 28 commits into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6d39dff
Playwright initial create
gogo4ds Mar 19, 2025
5a64102
webserver setup
gogo4ds Mar 19, 2025
fec22b5
Added auth fixture
gogo4ds Mar 19, 2025
1e6f81b
Added workflow
gogo4ds Mar 19, 2025
93547c4
Merge branch 'v2-development' of https://github.com/SoftUni-Internal/…
gogo4ds Mar 19, 2025
61c9c5e
Updated scripts to run real env tests
gogo4ds Mar 19, 2025
5a1d09e
Updated eslint
gogo4ds Mar 25, 2025
b68b3d7
Added more rules
gogo4ds Mar 25, 2025
165fe56
Eslint update and fixes
gogo4ds Mar 25, 2025
bc9cdad
Stylelint fixes
gogo4ds Mar 25, 2025
3ecd50e
Added playwright eslint config
gogo4ds Mar 25, 2025
685069d
Fixes
gogo4ds Mar 26, 2025
02a83db
Merge branch 'v2-development' of https://github.com/SoftUni-Internal/…
gogo4ds Mar 26, 2025
f9f8daa
Stylelint fixes
gogo4ds Mar 26, 2025
e8e7480
Added redirect to /login in /profile
gogo4ds Mar 31, 2025
d0cd12c
Merge branch 'v2-development' of https://github.com/SoftUni-Internal/…
gogo4ds Apr 3, 2025
a3ac12b
Used eslint error
gogo4ds Apr 3, 2025
c90a847
fix
gogo4ds Apr 3, 2025
c3caff7
Merge branch 'v2-development' of https://github.com/SoftUni-Internal/…
gogo4ds Apr 3, 2025
15d8455
fix
gogo4ds Apr 3, 2025
b06e69d
Made RememberMe selected by default
gogo4ds Apr 3, 2025
d301be5
Merge branch 'v2-development' of https://github.com/SoftUni-Internal/…
gogo4ds Jun 25, 2025
c498829
Refactored JSX to improve code readability and reduce redundant paren…
gogo4ds Jun 25, 2025
abf9329
Redirect unauthenticated users to login when accessing the personal p…
gogo4ds Jun 25, 2025
089ccd9
Update `start:backend` script to include `--build` flag for Docker Co…
gogo4ds Jun 25, 2025
de31bd7
Updated dependencies, refined TypeScript configuration, and improved …
gogo4ds Jun 26, 2025
bfe9812
Refactor password input change logic in `ContestPasswordForm` for str…
gogo4ds Jun 26, 2025
2c2e5d9
Merge branch 'v2-development' of https://github.com/SoftUni-Internal/…
gogo4ds Jul 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install -g yarn && yarn
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
8 changes: 8 additions & 0 deletions Servers/UI/OJS.Servers.Ui/ClientApp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# Playwright
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
.env.e2e
Original file line number Diff line number Diff line change
@@ -1,52 +1,76 @@
import { defineConfig } from "eslint/config";
import globals from "globals";
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import reactPlugin from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import importPlugin from 'eslint-plugin-import';
import promisePlugin from 'eslint-plugin-promise';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
import reduxConfig from './src/redux/eslint.redux.config.js';
import playwrightConfig from './tests/eslint.playwright.config.js';

module.exports = {
env: {
browser: true,
es2021: true,
export default defineConfig([
tseslint.configs.recommendedTypeChecked,
reactPlugin.configs.flat.recommended,
importPlugin.flatConfigs.recommended,
reactHooks.configs['recommended-latest'],
promisePlugin.configs['flat/recommended'],
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
settings: {
'import/resolver': {
typescript: {},
},
'react': {
version: 'detect',
},
},
globals: { Promise: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:react/recommended',
'airbnb',
'plugin:css-modules/recommended',
// 'stylelint',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
ecmaFeatures: { jsx: true },
ecmaVersion: 2021,
sourceType: 'module',
languageOptions: {
globals: globals.browser,
parser: tseslint.parser,
parserOptions: {
ecmaFeatures: { jsx: true },
sourceType: 'module',
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
plugins: [
'react',
'@typescript-eslint',
'react-hooks',
'promise',
'babel',
'css-modules',
'simple-import-sort',
],
settings: { 'import/resolver': { typescript: {} } },
ignorePatterns: [
'*.cjs',
'vite.config.js'
plugins: {
'js': js,
'jsx-a11y': jsxA11yPlugin,
'simple-import-sort': simpleImportSortPlugin,
'@typescript-eslint': tseslint.plugin,
},
extends: [
"js/recommended",
],
rules: {
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
'no-unused-vars': 'off',
'no-undefined': 'off',
'no-use-before-define': 'off',
'prefer-destructuring': 'off',
'react/no-array-index-key': 'off',
'no-undefined': 'off',
'react/react-in-jsx-scope': 'off',

'node/no-missing-import': 0,
'sort-imports': 0,
'no-confusing-arrow': 0,
'node/no-unsupported-features/es-syntax': 0,

'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-function-type': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/only-throw-error': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-use-before-define': [ 'error' ],
'@typescript-eslint/naming-convention': [
'error',
{
Expand All @@ -58,9 +82,8 @@ module.exports = {
},
},
],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': [ 'error' ],
'@typescript-eslint/no-explicit-any': 'warn',

'react/display-name': 'warn',
'react/jsx-filename-extension': [ 'warn', { extensions: [ '.tsx' ] } ],
'react/jsx-props-no-spreading': ['warn', { custom: 'ignore' }],
'import/extensions': [
Expand Down Expand Up @@ -111,7 +134,7 @@ module.exports = {
// make sure for-in loops have an if statement (off by default)
'guard-for-in': 'error',
// indent is 4 spaces
indent: [
'indent': [
'error',
4,
{
Expand All @@ -138,7 +161,7 @@ module.exports = {
// linebreak unix (LF) is better than Windows (CRLF)
'linebreak-style': [ 'error', 'unix' ],
// max 140 characters for code, and 100 for comments
'max-len': [ 'error', {
'max-len': [ 'warn', {
tabWidth: 4,
code: 140,
comments: 100,
Expand Down Expand Up @@ -254,9 +277,6 @@ module.exports = {
'no-unreachable': 'error',
// disallow usage of expressions in statement position
'no-unused-expressions': 'error',
// disallow declaration of variables that are not used in the code
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
// enforce consistent line breaks inside braces
'object-curly-newline': [
'error', {
Expand Down Expand Up @@ -289,17 +309,14 @@ module.exports = {
'space-in-parens': [ 'error', 'never' ],

/* import */
'import/first': 'error',
'import/prefer-default-export': 'error',
'import/exports-last': 'error',
'import/group-exports': 'error',
'import/no-unused-modules': [ 'error', {
unusedExports: true,
missingExports: true,
} ],
// "import/dynamic-import-chunkname": ["error"],
// 'import/first': 'error',
// 'import/prefer-default-export': 'error',
// 'import/no-unused-modules': ['error', {
// unusedExports: true,
// missingExports: true,
// }],

/* react rules */
// /* react rules */
'react/jsx-indent': [ 'error', 4 ],
// No sense in TypeScript context
'react/prop-types': 'off',
Expand All @@ -322,13 +339,8 @@ module.exports = {
'promise/prefer-await-to-then': 'error',
'promise/prefer-await-to-callbacks': 'error',

/* babel */
'babel/semi': 'error',

/* html elements */
'jsx-a11y/label-has-associated-control': [
'error',
{ required: { some: [ 'nesting', 'id' ] } } ],
'jsx-a11y/label-has-associated-control': [ 'error', { required: { some: [ 'nesting', 'id' ] } } ],
'jsx-a11y/label-has-for': [ 'error', { required: { some: [ 'nesting', 'id' ] } } ],
'simple-import-sort/imports': [
'error',
Expand Down Expand Up @@ -370,24 +382,8 @@ module.exports = {
},
],
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
},
overrides: [
{
files: ['src/redux/features/**/*.ts'],
extends: ['./src/redux/.eslintrc.cjs'],
},
],
};
},
playwrightConfig,
reduxConfig,
]);
Loading