Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ yarn-error.log*

/public/config.json
config.json
storybook-static
storybook-static
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
71 changes: 71 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 38 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,19 @@
"yup": "^0.32.11"
},
"devDependencies": {
"vite": "^4.1.5",
"cross-env": "^7.0.3",
"typescript": "^4.9.3",
"vite-plugin-svgr": "^2.4.0",
"vite-tsconfig-paths": "^4.0.5",
"husky": "^8.0.2",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest-dom": "^4.0.3",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-n": "^15.5.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sonarjs": "^0.16.0",
"eslint-plugin-testing-library": "^5.9.1",
"vitest": "^0.28.4",
"jsdom": "^21.1.0",
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@playwright/test": "^1.43.1",
"@storybook/addon-essentials": "^7.2.1",
"@storybook/addon-interactions": "^7.2.1",
"@storybook/addon-links": "^7.2.1",
"@storybook/addon-mdx-gfm": "^7.2.1",
"@storybook/blocks": "^7.2.1",
"@storybook/manager-api": "^7.2.1",
"@storybook/react": "^7.2.1",
"@storybook/react-vite": "^7.2.1",
"@storybook/testing-library": "^0.2.0",
"@storybook/theming": "^7.2.1",
"@testing-library/cypress": "^8.0.7",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
Expand All @@ -91,27 +80,39 @@
"@typescript-eslint/parser": "^5.45.1",
"@vitejs/plugin-legacy": "^4.0.1",
"@vitejs/plugin-react": "^3.1.0",
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@storybook/addon-essentials": "^7.2.1",
"@storybook/addon-interactions": "^7.2.1",
"@storybook/addon-links": "^7.2.1",
"@storybook/addon-mdx-gfm": "^7.2.1",
"@storybook/blocks": "^7.2.1",
"@storybook/manager-api": "^7.2.1",
"@storybook/react": "^7.2.1",
"@storybook/react-vite": "^7.2.1",
"@storybook/testing-library": "^0.2.0",
"@storybook/theming": "^7.2.1",
"@vitest/coverage-c8": "^0.28.4",
"commitizen": "^4.3.0",
"cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^7.0.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest-dom": "^4.0.3",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-n": "^15.5.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sonarjs": "^0.16.0",
"eslint-plugin-storybook": "^0.6.13",
"eslint-plugin-testing-library": "^5.9.1",
"husky": "^8.0.2",
"jsdom": "^21.1.0",
"lint-staged": "^13.1.0",
"prettier": "^2.8.0",
"prop-types": "^15.8.1",
"storybook": "^7.2.1"
"storybook": "^7.2.1",
"typescript": "^4.9.3",
"vite": "^4.1.5",
"vite-plugin-svgr": "^2.4.0",
"vite-tsconfig-paths": "^4.0.5",
"vitest": "^0.28.4"
},
"lint-staged": {
"*.+(js|jsx|ts|tsx)": "eslint --fix",
Expand Down
77 changes: 77 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import { defineConfig, devices } from '@playwright/test';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './tests',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://127.0.0.1:3000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},

/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },
});
5 changes: 3 additions & 2 deletions src/Helpers/authorizationFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ export interface AnyFunctions {

const IsAuthenticated = () => {
// NOSONAR typescript:S100
const {isLoggedIn} = useAuth();
return !!isLoggedIn;
const { isLoggedIn } = useAuth();
// return !!isLoggedIn;
return true;
};

export const authorizationFunctions: AnyFunctions = {
Expand Down
Loading