mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-03 06:11:48 +00:00
Create src folder for shlink-web-component
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShlinkApiErrorProps } from '../../shlink-web-component/common/ShlinkApiError';
|
||||
import { ShlinkApiError } from '../../shlink-web-component/common/ShlinkApiError';
|
||||
import type { ShlinkApiErrorProps } from '../../shlink-web-component/src/common/ShlinkApiError';
|
||||
import { ShlinkApiError } from '../../shlink-web-component/src/common/ShlinkApiError';
|
||||
import type { InvalidArgumentError, ProblemDetailsError } from '../../src/api/types/errors';
|
||||
import { ErrorTypeV2, ErrorTypeV3 } from '../../src/api/types/errors';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl, ShortUrlsOrder } from '../../../shlink-web-component/short-urls/data';
|
||||
import type { ShortUrl, ShortUrlsOrder } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkDomain, ShlinkVisits, ShlinkVisitsOverview } from '../../../src/api/types';
|
||||
import { ErrorTypeV2, ErrorTypeV3 } from '../../../src/api/types/errors';
|
||||
|
||||
@@ -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 '../../shlink-web-component/common/AsideMenu';
|
||||
import { AsideMenu } from '../../shlink-web-component/src/common/AsideMenu';
|
||||
|
||||
describe('<AsideMenu />', () => {
|
||||
const setUp = () => render(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { SimplePaginator } from '../../shlink-web-component/utils/components/SimplePaginator';
|
||||
import { ELLIPSIS } from '../../shlink-web-component/utils/helpers/pagination';
|
||||
import { SimplePaginator } from '../../shlink-web-component/src/utils/components/SimplePaginator';
|
||||
import { ELLIPSIS } from '../../shlink-web-component/src/utils/helpers/pagination';
|
||||
|
||||
describe('<SimplePaginator />', () => {
|
||||
const setUp = (pagesCount: number, currentPage = 1) => render(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { ImageDownloader } from '../../../shlink-web-component/utils/services/ImageDownloader';
|
||||
import { ImageDownloader } from '../../../shlink-web-component/src/utils/services/ImageDownloader';
|
||||
import type { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
import { windowMock } from '../../__mocks__/Window.mock';
|
||||
|
||||
|
||||
@@ -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 type { ExportableShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { ReportExporter } from '../../../shlink-web-component/src/utils/services/ReportExporter';
|
||||
import type { NormalizedVisit } from '../../../shlink-web-component/src/visits/types';
|
||||
import { windowMock } from '../../__mocks__/Window.mock';
|
||||
|
||||
describe('ReportExporter', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { Domain } from '../../shlink-web-component/domains/data';
|
||||
import { DomainRow } from '../../shlink-web-component/domains/DomainRow';
|
||||
import type { Domain } from '../../shlink-web-component/src/domains/data';
|
||||
import { DomainRow } from '../../shlink-web-component/src/domains/DomainRow';
|
||||
import type { ShlinkDomainRedirects } from '../../src/api/types';
|
||||
|
||||
describe('<DomainRow />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { DomainSelector } from '../../shlink-web-component/domains/DomainSelector';
|
||||
import type { DomainsList } from '../../shlink-web-component/domains/reducers/domainsList';
|
||||
import { DomainSelector } from '../../shlink-web-component/src/domains/DomainSelector';
|
||||
import type { DomainsList } from '../../shlink-web-component/src/domains/reducers/domainsList';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<DomainSelector />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { ManageDomains } from '../../shlink-web-component/domains/ManageDomains';
|
||||
import type { DomainsList } from '../../shlink-web-component/domains/reducers/domainsList';
|
||||
import { ManageDomains } from '../../shlink-web-component/src/domains/ManageDomains';
|
||||
import type { DomainsList } from '../../shlink-web-component/src/domains/reducers/domainsList';
|
||||
import type { ShlinkDomain } from '../../src/api/types';
|
||||
import type { ProblemDetailsError } from '../../src/api/types/errors';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen, waitForElementToBeRemoved } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { Domain } from '../../../shlink-web-component/domains/data';
|
||||
import { DomainDropdown } from '../../../shlink-web-component/domains/helpers/DomainDropdown';
|
||||
import type { Domain } from '../../../shlink-web-component/src/domains/data';
|
||||
import { DomainDropdown } from '../../../shlink-web-component/src/domains/helpers/DomainDropdown';
|
||||
import type { SelectedServer } from '../../../src/servers/data';
|
||||
import type { SemVer } from '../../../src/utils/helpers/version';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { DomainStatus } from '../../../shlink-web-component/domains/data';
|
||||
import { DomainStatusIcon } from '../../../shlink-web-component/domains/helpers/DomainStatusIcon';
|
||||
import type { DomainStatus } from '../../../shlink-web-component/src/domains/data';
|
||||
import { DomainStatusIcon } from '../../../shlink-web-component/src/domains/helpers/DomainStatusIcon';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DomainStatusIcon />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fireEvent, screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { EditDomainRedirectsModal } from '../../../shlink-web-component/domains/helpers/EditDomainRedirectsModal';
|
||||
import { EditDomainRedirectsModal } from '../../../shlink-web-component/src/domains/helpers/EditDomainRedirectsModal';
|
||||
import type { ShlinkDomain } from '../../../src/api/types';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { editDomainRedirects } from '../../../shlink-web-component/domains/reducers/domainRedirects';
|
||||
import { editDomainRedirects } from '../../../shlink-web-component/src/domains/reducers/domainRedirects';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkDomainRedirects } from '../../../src/api/types';
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { Domain } from '../../../shlink-web-component/domains/data';
|
||||
import type { EditDomainRedirects } from '../../../shlink-web-component/domains/reducers/domainRedirects';
|
||||
import { editDomainRedirects } from '../../../shlink-web-component/domains/reducers/domainRedirects';
|
||||
import type { Domain } from '../../../shlink-web-component/src/domains/data';
|
||||
import type { EditDomainRedirects } from '../../../shlink-web-component/src/domains/reducers/domainRedirects';
|
||||
import { editDomainRedirects } from '../../../shlink-web-component/src/domains/reducers/domainRedirects';
|
||||
import {
|
||||
domainsListReducerCreator,
|
||||
replaceRedirectsOnDomain,
|
||||
replaceStatusOnDomain,
|
||||
} from '../../../shlink-web-component/domains/reducers/domainsList';
|
||||
} from '../../../shlink-web-component/src/domains/reducers/domainsList';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkDomainRedirects } from '../../../src/api/types';
|
||||
import { parseApiError } from '../../../src/api/utils';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { EventSourcePolyfill } from 'event-source-polyfill';
|
||||
import { identity } from 'ramda';
|
||||
import { bindToMercureTopic } from '../../../shlink-web-component/mercure/helpers';
|
||||
import type { MercureInfo } from '../../../shlink-web-component/mercure/reducers/mercureInfo';
|
||||
import { bindToMercureTopic } from '../../../shlink-web-component/src/mercure/helpers';
|
||||
import type { MercureInfo } from '../../../shlink-web-component/src/mercure/reducers/mercureInfo';
|
||||
|
||||
vi.mock('event-source-polyfill');
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { mercureInfoReducerCreator } from '../../../shlink-web-component/mercure/reducers/mercureInfo';
|
||||
import { mercureInfoReducerCreator } from '../../../shlink-web-component/src/mercure/reducers/mercureInfo';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { GetState } from '../../../src/container/types';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { MercureInfo } from '../../shlink-web-component/mercure/reducers/mercureInfo';
|
||||
import { Overview as overviewCreator } from '../../shlink-web-component/overview/Overview';
|
||||
import { prettify } from '../../shlink-web-component/utils/helpers/numbers';
|
||||
import type { MercureInfo } from '../../shlink-web-component/src/mercure/reducers/mercureInfo';
|
||||
import { Overview as overviewCreator } from '../../shlink-web-component/src/overview/Overview';
|
||||
import { prettify } from '../../shlink-web-component/src/utils/helpers/numbers';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<Overview />', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { HighlightCardProps } from '../../../shlink-web-component/overview/helpers/HighlightCard';
|
||||
import { HighlightCard } from '../../../shlink-web-component/overview/helpers/HighlightCard';
|
||||
import type { HighlightCardProps } from '../../../shlink-web-component/src/overview/helpers/HighlightCard';
|
||||
import { HighlightCard } from '../../../shlink-web-component/src/overview/helpers/HighlightCard';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<HighlightCard />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import type { VisitsHighlightCardProps } from '../../../shlink-web-component/overview/helpers/VisitsHighlightCard';
|
||||
import { VisitsHighlightCard } from '../../../shlink-web-component/overview/helpers/VisitsHighlightCard';
|
||||
import type { VisitsHighlightCardProps } from '../../../shlink-web-component/src/overview/helpers/VisitsHighlightCard';
|
||||
import { VisitsHighlightCard } from '../../../shlink-web-component/src/overview/helpers/VisitsHighlightCard';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<VisitsHighlightCard />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrlsOrder } from '../../shlink-web-component/short-urls/data';
|
||||
import type { ShortUrlsOrder } from '../../shlink-web-component/src/short-urls/data';
|
||||
import type { ShortUrlsListSettings as ShortUrlsSettings } from '../../src/settings/reducers/settings';
|
||||
import { ShortUrlsListSettings } from '../../src/settings/ShortUrlsListSettings';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { TagsOrder } from '../../shlink-web-component/tags/data/TagsListChildrenProps';
|
||||
import type { TagsOrder } from '../../shlink-web-component/src/tags/data/TagsListChildrenProps';
|
||||
import type { TagsSettings as TagsSettingsOptions } from '../../src/settings/reducers/settings';
|
||||
import { TagsSettings } from '../../src/settings/TagsSettings';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { CreateShortUrl as createShortUrlsCreator } from '../../shlink-web-component/short-urls/CreateShortUrl';
|
||||
import type { ShortUrlCreation } from '../../shlink-web-component/short-urls/reducers/shortUrlCreation';
|
||||
import { CreateShortUrl as createShortUrlsCreator } from '../../shlink-web-component/src/short-urls/CreateShortUrl';
|
||||
import type { ShortUrlCreation } from '../../shlink-web-component/src/short-urls/reducers/shortUrlCreation';
|
||||
|
||||
describe('<CreateShortUrl />', () => {
|
||||
const ShortUrlForm = () => <span>ShortUrlForm</span>;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { EditShortUrl as createEditShortUrl } from '../../shlink-web-component/short-urls/EditShortUrl';
|
||||
import type { ShortUrlDetail } from '../../shlink-web-component/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrlEdition } from '../../shlink-web-component/short-urls/reducers/shortUrlEdition';
|
||||
import { EditShortUrl as createEditShortUrl } from '../../shlink-web-component/src/short-urls/EditShortUrl';
|
||||
import type { ShortUrlDetail } from '../../shlink-web-component/src/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrlEdition } from '../../shlink-web-component/src/short-urls/reducers/shortUrlEdition';
|
||||
|
||||
describe('<EditShortUrl />', () => {
|
||||
const shortUrlCreation = { validateUrls: true };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Paginator } from '../../shlink-web-component/short-urls/Paginator';
|
||||
import { ELLIPSIS } from '../../shlink-web-component/utils/helpers/pagination';
|
||||
import { Paginator } from '../../shlink-web-component/src/short-urls/Paginator';
|
||||
import { ELLIPSIS } from '../../shlink-web-component/src/utils/helpers/pagination';
|
||||
import type { ShlinkPaginator } from '../../src/api/types';
|
||||
|
||||
describe('<Paginator />', () => {
|
||||
|
||||
@@ -2,9 +2,9 @@ import { screen } from '@testing-library/react';
|
||||
import type { UserEvent } from '@testing-library/user-event/setup/setup';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { formatISO } from 'date-fns';
|
||||
import type { Mode } from '../../shlink-web-component/short-urls/ShortUrlForm';
|
||||
import { ShortUrlForm as createShortUrlForm } from '../../shlink-web-component/short-urls/ShortUrlForm';
|
||||
import { parseDate } from '../../shlink-web-component/utils/dates/helpers/date';
|
||||
import type { Mode } from '../../shlink-web-component/src/short-urls/ShortUrlForm';
|
||||
import { ShortUrlForm as createShortUrlForm } from '../../shlink-web-component/src/short-urls/ShortUrlForm';
|
||||
import { parseDate } from '../../shlink-web-component/src/utils/dates/helpers/date';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import type { OptionalString } from '../../src/utils/utils';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
@@ -2,9 +2,9 @@ import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { endOfDay, formatISO, startOfDay } from 'date-fns';
|
||||
import { MemoryRouter, useLocation, useNavigate } from 'react-router-dom';
|
||||
import { ShortUrlsFilteringBar as filteringBarCreator } from '../../shlink-web-component/short-urls/ShortUrlsFilteringBar';
|
||||
import { formatDate } from '../../shlink-web-component/utils/dates/helpers/date';
|
||||
import type { DateRange } from '../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import { ShortUrlsFilteringBar as filteringBarCreator } from '../../shlink-web-component/src/short-urls/ShortUrlsFilteringBar';
|
||||
import { formatDate } from '../../shlink-web-component/src/utils/dates/helpers/date';
|
||||
import type { DateRange } from '../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter, useNavigate } from 'react-router-dom';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/mercure/helpers/boundToMercureHub';
|
||||
import type { ShortUrlsOrder } from '../../shlink-web-component/short-urls/data';
|
||||
import type { ShortUrlsList as ShortUrlsListModel } from '../../shlink-web-component/short-urls/reducers/shortUrlsList';
|
||||
import { ShortUrlsList as createShortUrlsList } from '../../shlink-web-component/short-urls/ShortUrlsList';
|
||||
import type { ShortUrlsTableType } from '../../shlink-web-component/short-urls/ShortUrlsTable';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/src/mercure/helpers/boundToMercureHub';
|
||||
import type { ShortUrlsOrder } from '../../shlink-web-component/src/short-urls/data';
|
||||
import type { ShortUrlsList as ShortUrlsListModel } from '../../shlink-web-component/src/short-urls/reducers/shortUrlsList';
|
||||
import { ShortUrlsList as createShortUrlsList } from '../../shlink-web-component/src/short-urls/ShortUrlsList';
|
||||
import type { ShortUrlsTableType } from '../../shlink-web-component/src/short-urls/ShortUrlsTable';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { SemVer } from '../../src/utils/helpers/version';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { fireEvent, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrlsOrderableFields } from '../../shlink-web-component/short-urls/data';
|
||||
import { SHORT_URLS_ORDERABLE_FIELDS } from '../../shlink-web-component/short-urls/data';
|
||||
import type { ShortUrlsList } from '../../shlink-web-component/short-urls/reducers/shortUrlsList';
|
||||
import { ShortUrlsTable as shortUrlsTableCreator } from '../../shlink-web-component/short-urls/ShortUrlsTable';
|
||||
import type { ShortUrlsOrderableFields } from '../../shlink-web-component/src/short-urls/data';
|
||||
import { SHORT_URLS_ORDERABLE_FIELDS } from '../../shlink-web-component/src/short-urls/data';
|
||||
import type { ShortUrlsList } from '../../shlink-web-component/src/short-urls/reducers/shortUrlsList';
|
||||
import { ShortUrlsTable as shortUrlsTableCreator } from '../../shlink-web-component/src/short-urls/ShortUrlsTable';
|
||||
import type { SelectedServer } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { UseExistingIfFoundInfoIcon } from '../../shlink-web-component/short-urls/UseExistingIfFoundInfoIcon';
|
||||
import { UseExistingIfFoundInfoIcon } from '../../shlink-web-component/src/short-urls/UseExistingIfFoundInfoIcon';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<UseExistingIfFoundInfoIcon />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { CreateShortUrlResult as createResult } from '../../../shlink-web-component/short-urls/helpers/CreateShortUrlResult';
|
||||
import type { ShortUrlCreation } from '../../../shlink-web-component/short-urls/reducers/shortUrlCreation';
|
||||
import { CreateShortUrlResult as createResult } from '../../../shlink-web-component/src/short-urls/helpers/CreateShortUrlResult';
|
||||
import type { ShortUrlCreation } from '../../../shlink-web-component/src/short-urls/reducers/shortUrlCreation';
|
||||
import type { TimeoutToggle } from '../../../src/utils/helpers/hooks';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import { DeleteShortUrlModal } from '../../../shlink-web-component/short-urls/helpers/DeleteShortUrlModal';
|
||||
import type { ShortUrlDeletion } from '../../../shlink-web-component/short-urls/reducers/shortUrlDeletion';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { DeleteShortUrlModal } from '../../../shlink-web-component/src/short-urls/helpers/DeleteShortUrlModal';
|
||||
import type { ShortUrlDeletion } from '../../../shlink-web-component/src/short-urls/reducers/shortUrlDeletion';
|
||||
import type { InvalidShortUrlDeletion } from '../../../src/api/types/errors';
|
||||
import { ErrorTypeV2, ErrorTypeV3 } from '../../../src/api/types/errors';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
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 '../../../shlink-web-component/utils/services/ReportExporter';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { ExportShortUrlsBtn as createExportShortUrlsBtn } from '../../../shlink-web-component/src/short-urls/helpers/ExportShortUrlsBtn';
|
||||
import type { ReportExporter } from '../../../shlink-web-component/src/utils/services/ReportExporter';
|
||||
import type { NotFoundServer, SelectedServer } from '../../../src/servers/data';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fireEvent, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { QrCodeModal as createQrCodeModal } from '../../../shlink-web-component/short-urls/helpers/QrCodeModal';
|
||||
import { QrCodeModal as createQrCodeModal } from '../../../shlink-web-component/src/short-urls/helpers/QrCodeModal';
|
||||
import type { SemVer } from '../../../src/utils/helpers/version';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import type { LinkSuffix } from '../../../shlink-web-component/short-urls/helpers/ShortUrlDetailLink';
|
||||
import { ShortUrlDetailLink } from '../../../shlink-web-component/short-urls/helpers/ShortUrlDetailLink';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import type { LinkSuffix } from '../../../shlink-web-component/src/short-urls/helpers/ShortUrlDetailLink';
|
||||
import { ShortUrlDetailLink } from '../../../shlink-web-component/src/short-urls/helpers/ShortUrlDetailLink';
|
||||
import type { NotFoundServer, ReachableServer } from '../../../src/servers/data';
|
||||
|
||||
describe('<ShortUrlDetailLink />', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { ShortUrlFormCheckboxGroup } from '../../../shlink-web-component/short-urls/helpers/ShortUrlFormCheckboxGroup';
|
||||
import { ShortUrlFormCheckboxGroup } from '../../../shlink-web-component/src/short-urls/helpers/ShortUrlFormCheckboxGroup';
|
||||
|
||||
describe('<ShortUrlFormCheckboxGroup />', () => {
|
||||
it.each([
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl, ShortUrlMeta } from '../../../shlink-web-component/short-urls/data';
|
||||
import { ShortUrlStatus } from '../../../shlink-web-component/short-urls/helpers/ShortUrlStatus';
|
||||
import type { ShortUrl, ShortUrlMeta } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { ShortUrlStatus } from '../../../shlink-web-component/src/short-urls/helpers/ShortUrlStatus';
|
||||
import type { ShlinkVisitsSummary } from '../../../src/api/types';
|
||||
|
||||
describe('<ShortUrlStatus />', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import { ShortUrlVisitsCount } from '../../../shlink-web-component/short-urls/helpers/ShortUrlVisitsCount';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { ShortUrlVisitsCount } from '../../../shlink-web-component/src/short-urls/helpers/ShortUrlVisitsCount';
|
||||
|
||||
describe('<ShortUrlVisitsCount />', () => {
|
||||
const setUp = (visitsCount: number, shortUrl: ShortUrl) => ({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { ShortUrlsFilterDropdown } from '../../../shlink-web-component/short-urls/helpers/ShortUrlsFilterDropdown';
|
||||
import { ShortUrlsFilterDropdown } from '../../../shlink-web-component/src/short-urls/helpers/ShortUrlsFilterDropdown';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<ShortUrlsFilterDropdown />', () => {
|
||||
|
||||
@@ -3,9 +3,9 @@ import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { addDays, formatISO, subDays } from 'date-fns';
|
||||
import { last } from 'ramda';
|
||||
import { MemoryRouter, useLocation } from 'react-router-dom';
|
||||
import type { ShortUrl, ShortUrlMeta } from '../../../shlink-web-component/short-urls/data';
|
||||
import { ShortUrlsRow as createShortUrlsRow } from '../../../shlink-web-component/short-urls/helpers/ShortUrlsRow';
|
||||
import { now, parseDate } from '../../../shlink-web-component/utils/dates/helpers/date';
|
||||
import type { ShortUrl, ShortUrlMeta } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { ShortUrlsRow as createShortUrlsRow } from '../../../shlink-web-component/src/short-urls/helpers/ShortUrlsRow';
|
||||
import { now, parseDate } from '../../../shlink-web-component/src/utils/dates/helpers/date';
|
||||
import type { ReachableServer } from '../../../src/servers/data';
|
||||
import type { Settings } from '../../../src/settings/reducers/settings';
|
||||
import type { TimeoutToggle } from '../../../src/utils/helpers/hooks';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import { ShortUrlsRowMenu as createShortUrlsRowMenu } from '../../../shlink-web-component/short-urls/helpers/ShortUrlsRowMenu';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { ShortUrlsRowMenu as createShortUrlsRowMenu } from '../../../shlink-web-component/src/short-urls/helpers/ShortUrlsRowMenu';
|
||||
import type { ReachableServer } from '../../../src/servers/data';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Tags } from '../../../shlink-web-component/short-urls/helpers/Tags';
|
||||
import { Tags } from '../../../shlink-web-component/src/short-urls/helpers/Tags';
|
||||
import { colorGeneratorMock } from '../../utils/services/__mocks__/ColorGenerator.mock';
|
||||
|
||||
describe('<Tags />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import { shortUrlDataFromShortUrl, urlDecodeShortCode, urlEncodeShortCode } from '../../../shlink-web-component/short-urls/helpers';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { shortUrlDataFromShortUrl, urlDecodeShortCode, urlEncodeShortCode } from '../../../shlink-web-component/src/short-urls/helpers';
|
||||
|
||||
describe('helpers', () => {
|
||||
describe('shortUrlDataFromShortUrl', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { QrErrorCorrectionDropdown } from '../../../../shlink-web-component/short-urls/helpers/qr-codes/QrErrorCorrectionDropdown';
|
||||
import type { QrErrorCorrection } from '../../../../shlink-web-component/utils/helpers/qrCodes';
|
||||
import { QrErrorCorrectionDropdown } from '../../../../shlink-web-component/src/short-urls/helpers/qr-codes/QrErrorCorrectionDropdown';
|
||||
import type { QrErrorCorrection } from '../../../../shlink-web-component/src/utils/helpers/qrCodes';
|
||||
import { renderWithEvents } from '../../../__helpers__/setUpTest';
|
||||
|
||||
describe('<QrErrorCorrectionDropdown />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { QrFormatDropdown } from '../../../../shlink-web-component/short-urls/helpers/qr-codes/QrFormatDropdown';
|
||||
import type { QrCodeFormat } from '../../../../shlink-web-component/utils/helpers/qrCodes';
|
||||
import { QrFormatDropdown } from '../../../../shlink-web-component/src/short-urls/helpers/qr-codes/QrFormatDropdown';
|
||||
import type { QrCodeFormat } from '../../../../shlink-web-component/src/utils/helpers/qrCodes';
|
||||
import { renderWithEvents } from '../../../__helpers__/setUpTest';
|
||||
|
||||
describe('<QrFormatDropdown />', () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import {
|
||||
createShortUrl as createShortUrlCreator,
|
||||
shortUrlCreationReducerCreator,
|
||||
} from '../../../shlink-web-component/short-urls/reducers/shortUrlCreation';
|
||||
} from '../../../shlink-web-component/src/short-urls/reducers/shortUrlCreation';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import {
|
||||
deleteShortUrl as deleteShortUrlCreator,
|
||||
shortUrlDeletionReducerCreator,
|
||||
} from '../../../shlink-web-component/short-urls/reducers/shortUrlDeletion';
|
||||
} from '../../../shlink-web-component/src/short-urls/reducers/shortUrlDeletion';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ProblemDetailsError } from '../../../src/api/types/errors';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import { shortUrlDetailReducerCreator } from '../../../shlink-web-component/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrlsList } from '../../../shlink-web-component/short-urls/reducers/shortUrlsList';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { shortUrlDetailReducerCreator } from '../../../shlink-web-component/src/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrlsList } from '../../../shlink-web-component/src/short-urls/reducers/shortUrlsList';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import {
|
||||
editShortUrl as editShortUrlCreator,
|
||||
shortUrlEditionReducerCreator,
|
||||
} from '../../../shlink-web-component/short-urls/reducers/shortUrlEdition';
|
||||
} from '../../../shlink-web-component/src/short-urls/reducers/shortUrlEdition';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { SelectedServer } from '../../../src/servers/data';
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import { createShortUrl as createShortUrlCreator } from '../../../shlink-web-component/short-urls/reducers/shortUrlCreation';
|
||||
import { shortUrlDeleted } from '../../../shlink-web-component/short-urls/reducers/shortUrlDeletion';
|
||||
import { editShortUrl as editShortUrlCreator } from '../../../shlink-web-component/short-urls/reducers/shortUrlEdition';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { createShortUrl as createShortUrlCreator } from '../../../shlink-web-component/src/short-urls/reducers/shortUrlCreation';
|
||||
import { shortUrlDeleted } from '../../../shlink-web-component/src/short-urls/reducers/shortUrlDeletion';
|
||||
import { editShortUrl as editShortUrlCreator } from '../../../shlink-web-component/src/short-urls/reducers/shortUrlEdition';
|
||||
import {
|
||||
listShortUrls as listShortUrlsCreator,
|
||||
shortUrlsListReducerCreator,
|
||||
} from '../../../shlink-web-component/short-urls/reducers/shortUrlsList';
|
||||
import { createNewVisits } from '../../../shlink-web-component/visits/reducers/visitCreation';
|
||||
import type { CreateVisit } from '../../../shlink-web-component/visits/types';
|
||||
} from '../../../shlink-web-component/src/short-urls/reducers/shortUrlsList';
|
||||
import { createNewVisits } from '../../../shlink-web-component/src/visits/reducers/visitCreation';
|
||||
import type { CreateVisit } from '../../../shlink-web-component/src/visits/types';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkShortUrlsResponse } from '../../../src/api/types';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { identity } from 'ramda';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/mercure/helpers/boundToMercureHub';
|
||||
import type { TagsList } from '../../shlink-web-component/tags/reducers/tagsList';
|
||||
import type { TagsListProps } from '../../shlink-web-component/tags/TagsList';
|
||||
import { TagsList as createTagsList } from '../../shlink-web-component/tags/TagsList';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/src/mercure/helpers/boundToMercureHub';
|
||||
import type { TagsList } from '../../shlink-web-component/src/tags/reducers/tagsList';
|
||||
import type { TagsListProps } from '../../shlink-web-component/src/tags/TagsList';
|
||||
import { TagsList as createTagsList } from '../../shlink-web-component/src/tags/TagsList';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<TagsList />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { TagsTable as createTagsTable } from '../../shlink-web-component/tags/TagsTable';
|
||||
import { TagsTable as createTagsTable } from '../../shlink-web-component/src/tags/TagsTable';
|
||||
import { rangeOf } from '../../src/utils/utils';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { TagsTableRow as createTagsTableRow } from '../../shlink-web-component/tags/TagsTableRow';
|
||||
import { TagsTableRow as createTagsTableRow } from '../../shlink-web-component/src/tags/TagsTableRow';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
import { colorGeneratorMock } from '../utils/services/__mocks__/ColorGenerator.mock';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { DeleteTagConfirmModal } from '../../../shlink-web-component/tags/helpers/DeleteTagConfirmModal';
|
||||
import type { TagDeletion } from '../../../shlink-web-component/tags/reducers/tagDelete';
|
||||
import { DeleteTagConfirmModal } from '../../../shlink-web-component/src/tags/helpers/DeleteTagConfirmModal';
|
||||
import type { TagDeletion } from '../../../shlink-web-component/src/tags/reducers/tagDelete';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DeleteTagConfirmModal />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { EditTagModal as createEditTagModal } from '../../../shlink-web-component/tags/helpers/EditTagModal';
|
||||
import type { TagEdition } from '../../../shlink-web-component/tags/reducers/tagEdit';
|
||||
import { EditTagModal as createEditTagModal } from '../../../shlink-web-component/src/tags/helpers/EditTagModal';
|
||||
import type { TagEdition } from '../../../shlink-web-component/src/tags/reducers/tagEdit';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<EditTagModal />', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
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 '../../../shlink-web-component/utils/services/ColorGenerator';
|
||||
import { Tag } from '../../../shlink-web-component/src/tags/helpers/Tag';
|
||||
import type { ColorGenerator } from '../../../shlink-web-component/src/utils/services/ColorGenerator';
|
||||
import { MAIN_COLOR } from '../../../src/utils/theme';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { TagsSelector as createTagsSelector } from '../../../shlink-web-component/tags/helpers/TagsSelector';
|
||||
import type { TagsList } from '../../../shlink-web-component/tags/reducers/tagsList';
|
||||
import { TagsSelector as createTagsSelector } from '../../../shlink-web-component/src/tags/helpers/TagsSelector';
|
||||
import type { TagsList } from '../../../shlink-web-component/src/tags/reducers/tagsList';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import { colorGeneratorMock } from '../../utils/services/__mocks__/ColorGenerator.mock';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { tagDeleted, tagDeleteReducerCreator } from '../../../shlink-web-component/tags/reducers/tagDelete';
|
||||
import { tagDeleted, tagDeleteReducerCreator } from '../../../shlink-web-component/src/tags/reducers/tagDelete';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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 { editTag as editTagCreator, tagEdited, tagEditReducerCreator } from '../../../shlink-web-component/src/tags/reducers/tagEdit';
|
||||
import type { ColorGenerator } from '../../../shlink-web-component/src/utils/services/ColorGenerator';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import { createShortUrl as createShortUrlCreator } from '../../../shlink-web-component/short-urls/reducers/shortUrlCreation';
|
||||
import { tagDeleted } from '../../../shlink-web-component/tags/reducers/tagDelete';
|
||||
import { tagEdited } from '../../../shlink-web-component/tags/reducers/tagEdit';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { createShortUrl as createShortUrlCreator } from '../../../shlink-web-component/src/short-urls/reducers/shortUrlCreation';
|
||||
import { tagDeleted } from '../../../shlink-web-component/src/tags/reducers/tagDelete';
|
||||
import { tagEdited } from '../../../shlink-web-component/src/tags/reducers/tagEdit';
|
||||
import type {
|
||||
TagsList } from '../../../shlink-web-component/tags/reducers/tagsList';
|
||||
TagsList } from '../../../shlink-web-component/src/tags/reducers/tagsList';
|
||||
import {
|
||||
filterTags,
|
||||
listTags as listTagsCreator,
|
||||
tagsListReducerCreator,
|
||||
} from '../../../shlink-web-component/tags/reducers/tagsList';
|
||||
import { createNewVisits } from '../../../shlink-web-component/visits/reducers/visitCreation';
|
||||
import type { CreateVisit } from '../../../shlink-web-component/visits/types';
|
||||
} from '../../../shlink-web-component/src/tags/reducers/tagsList';
|
||||
import { createNewVisits } from '../../../shlink-web-component/src/visits/reducers/visitCreation';
|
||||
import type { CreateVisit } from '../../../shlink-web-component/src/visits/types';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
describe('tagsListReducer', () => {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -2,9 +2,9 @@ import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { formatISO } from 'date-fns';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/mercure/helpers/boundToMercureHub';
|
||||
import { DomainVisits as createDomainVisits } from '../../shlink-web-component/visits/DomainVisits';
|
||||
import type { DomainVisits } from '../../shlink-web-component/visits/reducers/domainVisits';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/src/mercure/helpers/boundToMercureHub';
|
||||
import { DomainVisits as createDomainVisits } from '../../shlink-web-component/src/visits/DomainVisits';
|
||||
import type { DomainVisits } from '../../shlink-web-component/src/visits/reducers/domainVisits';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
vi.mock('react-router-dom', async () => ({
|
||||
|
||||
@@ -2,9 +2,9 @@ import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { formatISO } from 'date-fns';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/mercure/helpers/boundToMercureHub';
|
||||
import { NonOrphanVisits as createNonOrphanVisits } from '../../shlink-web-component/visits/NonOrphanVisits';
|
||||
import type { VisitsInfo } from '../../shlink-web-component/visits/reducers/types';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/src/mercure/helpers/boundToMercureHub';
|
||||
import { NonOrphanVisits as createNonOrphanVisits } from '../../shlink-web-component/src/visits/NonOrphanVisits';
|
||||
import type { VisitsInfo } from '../../shlink-web-component/src/visits/reducers/types';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<NonOrphanVisits />', () => {
|
||||
|
||||
@@ -2,9 +2,9 @@ import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { formatISO } from 'date-fns';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/mercure/helpers/boundToMercureHub';
|
||||
import { OrphanVisits as createOrphanVisits } from '../../shlink-web-component/visits/OrphanVisits';
|
||||
import type { VisitsInfo } from '../../shlink-web-component/visits/reducers/types';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/src/mercure/helpers/boundToMercureHub';
|
||||
import { OrphanVisits as createOrphanVisits } from '../../shlink-web-component/src/visits/OrphanVisits';
|
||||
import type { VisitsInfo } from '../../shlink-web-component/src/visits/reducers/types';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<OrphanVisits />', () => {
|
||||
|
||||
@@ -3,10 +3,10 @@ import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { formatISO } from 'date-fns';
|
||||
import { identity } from 'ramda';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/mercure/helpers/boundToMercureHub';
|
||||
import type { ShortUrlVisits as ShortUrlVisitsState } from '../../shlink-web-component/visits/reducers/shortUrlVisits';
|
||||
import type { ShortUrlVisitsProps } from '../../shlink-web-component/visits/ShortUrlVisits';
|
||||
import { ShortUrlVisits as createShortUrlVisits } from '../../shlink-web-component/visits/ShortUrlVisits';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/src/mercure/helpers/boundToMercureHub';
|
||||
import type { ShortUrlVisits as ShortUrlVisitsState } from '../../shlink-web-component/src/visits/reducers/shortUrlVisits';
|
||||
import type { ShortUrlVisitsProps } from '../../shlink-web-component/src/visits/ShortUrlVisits';
|
||||
import { ShortUrlVisits as createShortUrlVisits } from '../../shlink-web-component/src/visits/ShortUrlVisits';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<ShortUrlVisits />', () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { formatDistance, parseISO } from 'date-fns';
|
||||
import type { ShortUrlDetail } from '../../shlink-web-component/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrlVisits } from '../../shlink-web-component/visits/reducers/shortUrlVisits';
|
||||
import { ShortUrlVisitsHeader } from '../../shlink-web-component/visits/ShortUrlVisitsHeader';
|
||||
import type { ShortUrlDetail } from '../../shlink-web-component/src/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrlVisits } from '../../shlink-web-component/src/visits/reducers/shortUrlVisits';
|
||||
import { ShortUrlVisitsHeader } from '../../shlink-web-component/src/visits/ShortUrlVisitsHeader';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<ShortUrlVisitsHeader />', () => {
|
||||
|
||||
@@ -2,10 +2,10 @@ import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { formatISO } from 'date-fns';
|
||||
import { MemoryRouter } from 'react-router';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/mercure/helpers/boundToMercureHub';
|
||||
import type { TagVisits as TagVisitsStats } from '../../shlink-web-component/visits/reducers/tagVisits';
|
||||
import type { TagVisitsProps } from '../../shlink-web-component/visits/TagVisits';
|
||||
import { TagVisits as createTagVisits } from '../../shlink-web-component/visits/TagVisits';
|
||||
import type { MercureBoundProps } from '../../shlink-web-component/src/mercure/helpers/boundToMercureHub';
|
||||
import type { TagVisits as TagVisitsStats } from '../../shlink-web-component/src/visits/reducers/tagVisits';
|
||||
import type { TagVisitsProps } from '../../shlink-web-component/src/visits/TagVisits';
|
||||
import { TagVisits as createTagVisits } from '../../shlink-web-component/src/visits/TagVisits';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
vi.mock('react-router-dom', async () => ({
|
||||
|
||||
@@ -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 '../../shlink-web-component/src/utils/services/ColorGenerator';
|
||||
import type { TagVisits } from '../../shlink-web-component/src/visits/reducers/tagVisits';
|
||||
import { TagVisitsHeader } from '../../shlink-web-component/src/visits/TagVisitsHeader';
|
||||
|
||||
describe('<TagVisitsHeader />', () => {
|
||||
const tagVisits = fromPartial<TagVisits>({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { Visit } from '../../shlink-web-component/visits/types';
|
||||
import { VisitsHeader } from '../../shlink-web-component/visits/VisitsHeader';
|
||||
import type { Visit } from '../../shlink-web-component/src/visits/types';
|
||||
import { VisitsHeader } from '../../shlink-web-component/src/visits/VisitsHeader';
|
||||
|
||||
describe('<VisitsHeader />', () => {
|
||||
const visits: Visit[] = [fromPartial({}), fromPartial({}), fromPartial({})];
|
||||
|
||||
@@ -2,9 +2,9 @@ import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { createMemoryHistory } from 'history';
|
||||
import { Router } from 'react-router-dom';
|
||||
import type { VisitsInfo } from '../../shlink-web-component/visits/reducers/types';
|
||||
import type { Visit } from '../../shlink-web-component/visits/types';
|
||||
import { VisitsStats } from '../../shlink-web-component/visits/VisitsStats';
|
||||
import type { VisitsInfo } from '../../shlink-web-component/src/visits/reducers/types';
|
||||
import type { Visit } from '../../shlink-web-component/src/visits/types';
|
||||
import { VisitsStats } from '../../shlink-web-component/src/visits/VisitsStats';
|
||||
import { rangeOf } from '../../src/utils/utils';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { NormalizedVisit } from '../../shlink-web-component/visits/types';
|
||||
import type { VisitsTableProps } from '../../shlink-web-component/visits/VisitsTable';
|
||||
import { VisitsTable } from '../../shlink-web-component/visits/VisitsTable';
|
||||
import type { NormalizedVisit } from '../../shlink-web-component/src/visits/types';
|
||||
import type { VisitsTableProps } from '../../shlink-web-component/src/visits/VisitsTable';
|
||||
import { VisitsTable } from '../../shlink-web-component/src/visits/VisitsTable';
|
||||
import { rangeOf } from '../../src/utils/utils';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { ChartCard } from '../../../shlink-web-component/visits/charts/ChartCard';
|
||||
import { ChartCard } from '../../../shlink-web-component/src/visits/charts/ChartCard';
|
||||
|
||||
describe('<ChartCard />', () => {
|
||||
const setUp = (title: Function | string = '', footer?: ReactNode) => render(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { DoughnutChart } from '../../../shlink-web-component/visits/charts/DoughnutChart';
|
||||
import { DoughnutChart } from '../../../shlink-web-component/src/visits/charts/DoughnutChart';
|
||||
import { setUpCanvas } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DoughnutChart />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { Chart, ChartDataset } from 'chart.js';
|
||||
import { DoughnutChartLegend } from '../../../shlink-web-component/visits/charts/DoughnutChartLegend';
|
||||
import { DoughnutChartLegend } from '../../../shlink-web-component/src/visits/charts/DoughnutChartLegend';
|
||||
|
||||
describe('<DoughnutChartLegend />', () => {
|
||||
const labels = ['foo', 'bar', 'baz', 'foo2', 'bar2'];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { HorizontalBarChartProps } from '../../../shlink-web-component/visits/charts/HorizontalBarChart';
|
||||
import { HorizontalBarChart } from '../../../shlink-web-component/visits/charts/HorizontalBarChart';
|
||||
import type { HorizontalBarChartProps } from '../../../shlink-web-component/src/visits/charts/HorizontalBarChart';
|
||||
import { HorizontalBarChart } from '../../../shlink-web-component/src/visits/charts/HorizontalBarChart';
|
||||
import { setUpCanvas } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<HorizontalBarChart />', () => {
|
||||
|
||||
@@ -2,8 +2,8 @@ import { screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { formatISO, subDays, subMonths, subYears } from 'date-fns';
|
||||
import { LineChartCard } from '../../../shlink-web-component/visits/charts/LineChartCard';
|
||||
import type { NormalizedVisit } from '../../../shlink-web-component/visits/types';
|
||||
import { LineChartCard } from '../../../shlink-web-component/src/visits/charts/LineChartCard';
|
||||
import type { NormalizedVisit } from '../../../shlink-web-component/src/visits/types';
|
||||
import { setUpCanvas } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<LineChartCard />', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { range } from 'ramda';
|
||||
import type { ReactNode } from 'react';
|
||||
import { SortableBarChartCard } from '../../../shlink-web-component/visits/charts/SortableBarChartCard';
|
||||
import type { Stats } from '../../../shlink-web-component/visits/types';
|
||||
import { SortableBarChartCard } from '../../../shlink-web-component/src/visits/charts/SortableBarChartCard';
|
||||
import type { Stats } from '../../../shlink-web-component/src/visits/types';
|
||||
import { rangeOf } from '../../../src/utils/utils';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { MapModal } from '../../../shlink-web-component/visits/helpers/MapModal';
|
||||
import type { CityStats } from '../../../shlink-web-component/visits/types';
|
||||
import { MapModal } from '../../../shlink-web-component/src/visits/helpers/MapModal';
|
||||
import type { CityStats } from '../../../shlink-web-component/src/visits/types';
|
||||
|
||||
describe('<MapModal />', () => {
|
||||
const toggle = vi.fn();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { OpenMapModalBtn } from '../../../shlink-web-component/visits/helpers/OpenMapModalBtn';
|
||||
import type { CityStats } from '../../../shlink-web-component/visits/types';
|
||||
import { OpenMapModalBtn } from '../../../shlink-web-component/src/visits/helpers/OpenMapModalBtn';
|
||||
import type { CityStats } from '../../../shlink-web-component/src/visits/types';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<OpenMapModalBtn />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { VisitsFilterDropdown } from '../../../shlink-web-component/visits/helpers/VisitsFilterDropdown';
|
||||
import type { OrphanVisitType, VisitsFilter } from '../../../shlink-web-component/visits/types';
|
||||
import { VisitsFilterDropdown } from '../../../shlink-web-component/src/visits/helpers/VisitsFilterDropdown';
|
||||
import type { OrphanVisitType, VisitsFilter } from '../../../shlink-web-component/src/visits/types';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<VisitsFilterDropdown />', () => {
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { addDays, formatISO, subDays } from 'date-fns';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/short-urls/data';
|
||||
import { formatIsoDate } from '../../../shlink-web-component/utils/dates/helpers/date';
|
||||
import type { DateInterval } from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import type { ShortUrl } from '../../../shlink-web-component/src/short-urls/data';
|
||||
import { formatIsoDate } from '../../../shlink-web-component/src/utils/dates/helpers/date';
|
||||
import type { DateInterval } from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import type {
|
||||
DomainVisits, LoadDomainVisits,
|
||||
} from '../../../shlink-web-component/visits/reducers/domainVisits';
|
||||
} from '../../../shlink-web-component/src/visits/reducers/domainVisits';
|
||||
import {
|
||||
DEFAULT_DOMAIN,
|
||||
domainVisitsReducerCreator,
|
||||
getDomainVisits as getDomainVisitsCreator,
|
||||
} from '../../../shlink-web-component/visits/reducers/domainVisits';
|
||||
import { createNewVisits } from '../../../shlink-web-component/visits/reducers/visitCreation';
|
||||
import type { Visit } from '../../../shlink-web-component/visits/types';
|
||||
} from '../../../shlink-web-component/src/visits/reducers/domainVisits';
|
||||
import { createNewVisits } from '../../../shlink-web-component/src/visits/reducers/visitCreation';
|
||||
import type { Visit } from '../../../shlink-web-component/src/visits/types';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkVisits } from '../../../src/api/types';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { addDays, formatISO, subDays } from 'date-fns';
|
||||
import { formatIsoDate } from '../../../shlink-web-component/utils/dates/helpers/date';
|
||||
import type { DateInterval } from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import { formatIsoDate } from '../../../shlink-web-component/src/utils/dates/helpers/date';
|
||||
import type { DateInterval } from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import {
|
||||
getNonOrphanVisits as getNonOrphanVisitsCreator,
|
||||
nonOrphanVisitsReducerCreator,
|
||||
} from '../../../shlink-web-component/visits/reducers/nonOrphanVisits';
|
||||
import type { VisitsInfo } from '../../../shlink-web-component/visits/reducers/types';
|
||||
import { createNewVisits } from '../../../shlink-web-component/visits/reducers/visitCreation';
|
||||
import type { Visit } from '../../../shlink-web-component/visits/types';
|
||||
} from '../../../shlink-web-component/src/visits/reducers/nonOrphanVisits';
|
||||
import type { VisitsInfo } from '../../../shlink-web-component/src/visits/reducers/types';
|
||||
import { createNewVisits } from '../../../shlink-web-component/src/visits/reducers/visitCreation';
|
||||
import type { Visit } from '../../../shlink-web-component/src/visits/types';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkVisits } from '../../../src/api/types';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { addDays, formatISO, subDays } from 'date-fns';
|
||||
import { formatIsoDate } from '../../../shlink-web-component/utils/dates/helpers/date';
|
||||
import type { DateInterval } from '../../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import { formatIsoDate } from '../../../shlink-web-component/src/utils/dates/helpers/date';
|
||||
import type { DateInterval } from '../../../shlink-web-component/src/utils/dates/helpers/dateIntervals';
|
||||
import {
|
||||
getOrphanVisits as getOrphanVisitsCreator,
|
||||
orphanVisitsReducerCreator,
|
||||
} from '../../../shlink-web-component/visits/reducers/orphanVisits';
|
||||
import type { VisitsInfo } from '../../../shlink-web-component/visits/reducers/types';
|
||||
import { createNewVisits } from '../../../shlink-web-component/visits/reducers/visitCreation';
|
||||
import type { Visit } from '../../../shlink-web-component/visits/types';
|
||||
} from '../../../shlink-web-component/src/visits/reducers/orphanVisits';
|
||||
import type { VisitsInfo } from '../../../shlink-web-component/src/visits/reducers/types';
|
||||
import { createNewVisits } from '../../../shlink-web-component/src/visits/reducers/visitCreation';
|
||||
import type { Visit } from '../../../shlink-web-component/src/visits/types';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkVisits } from '../../../src/api/types';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user