Skip to content
Open
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
4 changes: 2 additions & 2 deletions cypress/e2e/Auth.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import { getTestSelectorByModule } from 'support/helpers';
import {
interceptFetchClientFailedRequest,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Branch/BranchCatalog.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clearInputField,
clickActionButton,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Branch/BranchManagement.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clearBranchDetailsForm,
fillBranchDetailsForm,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Branch/BranchView.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import { getLinearLoader, getTestSelectorByModule, selectAction, verifyInputFields, verifyTextFields } from 'support/helpers';
import {
interceptEditBranchRequest,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Company/CompanyManagement.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clearInputField,
clickActionButton,
Expand Down
5 changes: 3 additions & 2 deletions cypress/e2e/Company/CompanySettings.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { COMPANY_SETTINGS_KEY, ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { COMPANY_SETTINGS_KEY } from 'shared/constants/configs';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clickActionButton,
clickFlowsIcon,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Department/DepartmentCatalog.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clearInputField,
clickActionButton,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Department/DepartmentManagement.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
getLinearLoader,
getLoadingButtonLoadingIcon,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Department/DepartmentView.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import { getLinearLoader, getTestSelectorByModule, selectAction, verifyInputFields, verifyTextFields } from 'support/helpers';
import {
interceptFetchBranchesRequest,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Employee/EmployeeCatalog.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clearInputField,
getLinearLoader,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Employee/EmployeeManagement.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clickActionButton,
getLinearLoader,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Employee/EmployeeOrgChart.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
checkEmployeeReportsTo,
clickActionButton,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Employee/Profile.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clearInputField,
clickActionButton,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Flows.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
checkIsSubFlowDisabled,
checkIsSubFlowHasDisabledAttribute,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/License.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import { getTestSelectorByModule } from 'support/helpers';
import {
interceptFetchBranchesRequest,
Expand Down
5 changes: 3 additions & 2 deletions cypress/e2e/Offboarding.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { COMPANY_SETTINGS_KEY, ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { COMPANY_SETTINGS_KEY } from 'shared/constants/configs';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clickActionButton,
getTestSelectorByModule,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Onboarding.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from 'shared/constants';
import { Module, SubModule } from 'shared/types';
import { ROUTES } from 'shared/constants/routes';
import { Module, SubModule } from 'shared/types/module';
import {
clickActionButton,
clickField,
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types="cypress" />

import { SinonStub } from 'cypress/types/sinon';
import { ThemeMode } from 'shared/types';
import { ThemeMode } from 'shared/types/theme';

// ***********************************************
// This example commands.ts shows you how to
Expand Down
6 changes: 5 additions & 1 deletion cypress/support/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { Branch, ColorSchemeId, Department, EntityInput, Module, SubModule, ThemeMode } from 'shared/types';
import { Branch } from 'shared/types/branch';
import { EntityInput } from 'shared/types/common';
import { Department } from 'shared/types/department';
import { Module, SubModule } from 'shared/types/module';
import { ColorSchemeId, ThemeMode } from 'shared/types/theme';

const colorSchemeValues: ColorSchemeId[] = [
'midnight',
Expand Down
18 changes: 9 additions & 9 deletions cypress/support/interceptors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Branch, Department, Employee, PaginatedResponse } from '../../src/shared/types';
import { Branch } from '../../src/shared/types/branch';
import { Department } from '../../src/shared/types/department';
import { Employee } from '../../src/shared/types/employee';

type PaginatedResponse<T> = {
items: T[];
};

const baseUrl = Cypress.config('baseUrl');
const serverBaseUrl = Cypress.env('serverBaseUrl');
Expand All @@ -12,18 +18,12 @@ export const interceptFetchSystemLicenseRequest = () => {

export const interceptFetchClientRequest = () => {
cy.fixture('client').then((client) => {
cy.intercept('GET', `${serverBaseUrl}/Identity/Client?origin=${Cypress.config('baseUrl')}`, { body: client }).as('fetchClientRequest');
cy.intercept('GET', `${serverBaseUrl}/Identity/Client*`, { body: client }).as('fetchClientRequest');
});
};

export const interceptFetchClientFailedRequest = () => {
cy.interceptWithAuth(
'GET',
`${serverBaseUrl}/Identity/Client?origin=${Cypress.config('baseUrl')}`,
null,
'fetchClientFailedRequest',
404
);
cy.interceptWithAuth('GET', `${serverBaseUrl}/Identity/Client*`, null, 'fetchClientFailedRequest', 404);
};

export const interceptLoginRequest = () => {
Expand Down
5 changes: 2 additions & 3 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,11 @@ const config: Config = {

// A map from regular expressions to paths to transformers
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.ts?$': 'ts-jest',
'^.+\\.[tj]sx?$': 'ts-jest',
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
transformIgnorePatterns: ['node_modules/(?!(\\oidc-client-ts)/)'],
transformIgnorePatterns: ['node_modules/(?!(@fossa-app|@fable-org|oidc-client-ts)/)'],

// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,
Expand Down
16 changes: 16 additions & 0 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.13.0",
"@fossa-app/bridge": "^0.1.34",
"@mui/icons-material": "^6.1.6",
"@mui/material": "^6.4.8",
"@reduxjs/toolkit": "^2.11.2",
"axios": "^1.16.1",
"leaflet": "^1.9.4",
"oidc-client-ts": "^3.5.0",
"react": "^19.2.0",
Expand Down
124 changes: 0 additions & 124 deletions src/AxiosInterceptor.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/Catalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { generatePath, useNavigate } from 'react-router-dom';
import { AsyncThunkAction } from '@reduxjs/toolkit';
import { AppDispatch, PaginatedStateEntity, RootState, Status, useAppDispatch, useAppSelector } from 'store';
import { selectUserRoles } from 'store/features';
import { Module, SubModule, Entity, PaginationParams, UserRole, ErrorResponseDTO, PaginatedResponse } from 'shared/types';
import { Module, SubModule, Entity, PaginationParams, UserRole, ProblemDetailsModel, PaginatedResponse } from 'shared/types';
import { APP_CONFIG } from 'shared/constants';
import { getTestSelectorByModule } from 'shared/helpers';
import { useUnmount } from 'shared/hooks';
Expand All @@ -15,7 +15,7 @@ import { renderPrimaryLinkText } from 'components/UI/helpers/renderPrimaryLinkTe

interface StateAction {
state: RootState;
rejectValue: ErrorResponseDTO;
rejectValue: ProblemDetailsModel;
dispatch?: AppDispatch;
}

Expand Down
Loading
Loading