mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-03 22:31:52 +00:00
Create src folder for shlink-web-component
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { CopyToClipboardIcon } from '../../shlink-web-component/utils/components/CopyToClipboardIcon';
|
||||
import { CopyToClipboardIcon } from '../../shlink-web-component/src/utils/components/CopyToClipboardIcon';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<CopyToClipboardIcon />', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { ExportBtn } from '../../shlink-web-component/utils/components/ExportBtn';
|
||||
import { ExportBtn } from '../../shlink-web-component/src/utils/components/ExportBtn';
|
||||
|
||||
describe('<ExportBtn />', () => {
|
||||
const setUp = (amount?: number, loading = false) => render(<ExportBtn amount={amount} loading={loading} />);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { IconProp } from '@fortawesome/fontawesome-svg-core';
|
||||
import { faAppleAlt, faCalendar, faTable } from '@fortawesome/free-solid-svg-icons';
|
||||
import { screen } from '@testing-library/react';
|
||||
import { IconInput } from '../../shlink-web-component/utils/components/IconInput';
|
||||
import { IconInput } from '../../shlink-web-component/src/utils/components/IconInput';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<IconInput />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Placement } from '@popperjs/core';
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import type { InfoTooltipProps } from '../../shlink-web-component/utils/components/InfoTooltip';
|
||||
import { InfoTooltip } from '../../shlink-web-component/utils/components/InfoTooltip';
|
||||
import type { InfoTooltipProps } from '../../shlink-web-component/src/utils/components/InfoTooltip';
|
||||
import { InfoTooltip } from '../../shlink-web-component/src/utils/components/InfoTooltip';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<InfoTooltip />', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { PaginationDropdown } from '../../shlink-web-component/utils/components/PaginationDropdown';
|
||||
import { PaginationDropdown } from '../../shlink-web-component/src/utils/components/PaginationDropdown';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<PaginationDropdown />', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { parseISO } from 'date-fns';
|
||||
import type { DateInputProps } from '../../../shlink-web-component/utils/dates/DateInput';
|
||||
import { DateInput } from '../../../shlink-web-component/utils/dates/DateInput';
|
||||
import type { DateInputProps } from '../../../shlink-web-component/src/utils/dates/DateInput';
|
||||
import { DateInput } from '../../../shlink-web-component/src/utils/dates/DateInput';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DateInput />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { DropdownBtn } from '../../../shlink-frontend-kit/src/navigation/DropdownBtn';
|
||||
import type { DateInterval } from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import { DATE_INTERVALS, rangeOrIntervalToString } from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import type { DateInterval } from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import { DATE_INTERVALS, rangeOrIntervalToString } from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import { DateIntervalDropdownItems } from '../../../src/utils/dates/DateIntervalDropdownItems';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import type { DateInterval } from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import { rangeOrIntervalToString } from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import type { DateInterval } from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import { rangeOrIntervalToString } from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import { DateIntervalSelector } from '../../../src/utils/dates/DateIntervalSelector';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { DateRangeRow } from '../../../shlink-web-component/utils/dates/DateRangeRow';
|
||||
import { DateRangeRow } from '../../../shlink-web-component/src/utils/dates/DateRangeRow';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DateRangeRow />', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { DateRangeSelectorProps } from '../../../shlink-web-component/utils/dates/DateRangeSelector';
|
||||
import { DateRangeSelector } from '../../../shlink-web-component/utils/dates/DateRangeSelector';
|
||||
import type { DateInterval } from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import type { DateRangeSelectorProps } from '../../../shlink-web-component/src/utils/dates/DateRangeSelector';
|
||||
import { DateRangeSelector } from '../../../shlink-web-component/src/utils/dates/DateRangeSelector';
|
||||
import type { DateInterval } from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DateRangeSelector />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { parseDate } from '../../../shlink-web-component/utils/dates/helpers/date';
|
||||
import type { TimeProps } from '../../../shlink-web-component/utils/dates/Time';
|
||||
import { Time } from '../../../shlink-web-component/utils/dates/Time';
|
||||
import { parseDate } from '../../../shlink-web-component/src/utils/dates/helpers/date';
|
||||
import type { TimeProps } from '../../../shlink-web-component/src/utils/dates/Time';
|
||||
import { Time } from '../../../shlink-web-component/src/utils/dates/Time';
|
||||
|
||||
describe('<Time />', () => {
|
||||
const setUp = (props: TimeProps) => render(<Time {...props} />);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { addDays, formatISO, subDays } from 'date-fns';
|
||||
import { formatDate, formatIsoDate, isBeforeOrEqual, isBetween, parseDate } from '../../../shlink-web-component/utils/dates/helpers/date';
|
||||
import { formatDate, formatIsoDate, isBeforeOrEqual, isBetween, parseDate } from '../../../shlink-web-component/src/utils/dates/helpers/date';
|
||||
|
||||
describe('date', () => {
|
||||
const now = new Date();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { endOfDay, format, formatISO, startOfDay, subDays } from 'date-fns';
|
||||
import { now, parseDate } from '../../../shlink-web-component/utils/dates/helpers/date';
|
||||
import { now, parseDate } from '../../../shlink-web-component/src/utils/dates/helpers/date';
|
||||
import type {
|
||||
DateInterval } from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
DateInterval } from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import {
|
||||
dateRangeIsEmpty,
|
||||
dateToMatchingInterval,
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
rangeIsInterval,
|
||||
rangeOrIntervalToString,
|
||||
toDateRange,
|
||||
} from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
} from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
|
||||
describe('date-types', () => {
|
||||
const daysBack = (days: number) => subDays(now(), days);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { roundTen } from '../../../shlink-web-component/utils/helpers/numbers';
|
||||
import { roundTen } from '../../../shlink-web-component/src/utils/helpers/numbers';
|
||||
|
||||
describe('numbers', () => {
|
||||
describe('roundTen', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { QrCodeFormat, QrErrorCorrection } from '../../../shlink-web-component/utils/helpers/qrCodes';
|
||||
import { buildQrCodeUrl } from '../../../shlink-web-component/utils/helpers/qrCodes';
|
||||
import type { QrCodeFormat, QrErrorCorrection } from '../../../shlink-web-component/src/utils/helpers/qrCodes';
|
||||
import { buildQrCodeUrl } from '../../../shlink-web-component/src/utils/helpers/qrCodes';
|
||||
|
||||
describe('qrCodes', () => {
|
||||
describe('buildQrCodeUrl', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { parseQuery, stringifyQuery } from '../../../shlink-web-component/utils/helpers/query';
|
||||
import { parseQuery, stringifyQuery } from '../../../shlink-web-component/src/utils/helpers/query';
|
||||
|
||||
describe('query', () => {
|
||||
describe('parseQuery', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { ColorGenerator } from '../../../shlink-web-component/utils/services/ColorGenerator';
|
||||
import { ColorGenerator } from '../../../shlink-web-component/src/utils/services/ColorGenerator';
|
||||
import type { LocalStorage } from '../../../src/utils/services/LocalStorage';
|
||||
import { MAIN_COLOR } from '../../../src/utils/theme';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ColorGenerator } from '../../../../shlink-web-component/utils/services/ColorGenerator';
|
||||
import type { ColorGenerator } from '../../../../shlink-web-component/src/utils/services/ColorGenerator';
|
||||
|
||||
export const colorGeneratorMock = fromPartial<ColorGenerator>({
|
||||
getColorForKey: vi.fn(() => 'red'),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { TableOrderIcon } from '../../../shlink-web-component/utils/table/TableOrderIcon';
|
||||
import type { OrderDir } from '../../../shlink-frontend-kit/src/ordering/ordering';
|
||||
import { TableOrderIcon } from '../../../shlink-web-component/src/utils/table/TableOrderIcon';
|
||||
|
||||
describe('<TableOrderIcon />', () => {
|
||||
const setUp = (field: string, currentDir?: OrderDir, className?: string) => render(
|
||||
|
||||
Reference in New Issue
Block a user