Move some modules from src to shlink-web-component

This commit is contained in:
Alejandro Celaya
2023-07-27 22:23:46 +02:00
parent 0169060de7
commit 275745fd3a
51 changed files with 212 additions and 133 deletions

View File

@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router';
import { AsideMenu } from '../../src/common/AsideMenu';
import { AsideMenu } from '../../shlink-web-component/common/AsideMenu';
describe('<AsideMenu />', () => {
const setUp = () => render(

View File

@@ -1,6 +1,6 @@
import type { ExportableShortUrl } from '../../../shlink-web-component/short-urls/data';
import { ReportExporter } from '../../../shlink-web-component/utils/services/ReportExporter';
import type { NormalizedVisit } from '../../../shlink-web-component/visits/types';
import { ReportExporter } from '../../../src/common/services/ReportExporter';
import { windowMock } from '../../__mocks__/Window.mock';
describe('ReportExporter', () => {

View File

@@ -3,7 +3,7 @@ import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router-dom';
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
import { ExportShortUrlsBtn as createExportShortUrlsBtn } from '../../../shlink-web-component/short-urls/helpers/ExportShortUrlsBtn';
import type { ReportExporter } from '../../../src/common/services/ReportExporter';
import type { ReportExporter } from '../../../shlink-web-component/utils/services/ReportExporter';
import type { NotFoundServer, SelectedServer } from '../../../src/servers/data';
import { renderWithEvents } from '../../__helpers__/setUpTest';

View File

@@ -2,7 +2,7 @@ import { screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import type { ReactNode } from 'react';
import { Tag } from '../../../shlink-web-component/tags/helpers/Tag';
import type { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
import type { ColorGenerator } from '../../../shlink-web-component/utils/services/ColorGenerator';
import { MAIN_COLOR } from '../../../src/utils/theme';
import { renderWithEvents } from '../../__helpers__/setUpTest';

View File

@@ -1,8 +1,8 @@
import { fromPartial } from '@total-typescript/shoehorn';
import { editTag as editTagCreator, tagEdited, tagEditReducerCreator } from '../../../shlink-web-component/tags/reducers/tagEdit';
import type { ColorGenerator } from '../../../shlink-web-component/utils/services/ColorGenerator';
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
import type { ShlinkState } from '../../../src/container/types';
import type { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
describe('tagEditReducer', () => {
const oldName = 'foo';

View File

@@ -1,4 +1,4 @@
import { parseQuery, stringifyQuery } from '../../../src/utils/helpers/query';
import { parseQuery, stringifyQuery } from '../../../shlink-web-component/utils/helpers/query';
describe('query', () => {
describe('parseQuery', () => {

View File

@@ -1,5 +1,5 @@
import { fromPartial } from '@total-typescript/shoehorn';
import { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
import { ColorGenerator } from '../../../shlink-web-component/utils/services/ColorGenerator';
import type { LocalStorage } from '../../../src/utils/services/LocalStorage';
import { MAIN_COLOR } from '../../../src/utils/theme';

View File

@@ -1,5 +1,5 @@
import { fromPartial } from '@total-typescript/shoehorn';
import type { ColorGenerator } from '../../../../src/utils/services/ColorGenerator';
import type { ColorGenerator } from '../../../../shlink-web-component/utils/services/ColorGenerator';
export const colorGeneratorMock = fromPartial<ColorGenerator>({
getColorForKey: vi.fn(() => 'red'),

View File

@@ -1,8 +1,8 @@
import { render, screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import type { ColorGenerator } from '../../shlink-web-component/utils/services/ColorGenerator';
import type { TagVisits } from '../../shlink-web-component/visits/reducers/tagVisits';
import { TagVisitsHeader } from '../../shlink-web-component/visits/TagVisitsHeader';
import type { ColorGenerator } from '../../src/utils/services/ColorGenerator';
describe('<TagVisitsHeader />', () => {
const tagVisits = fromPartial<TagVisits>({