mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-11 10:03:51 +00:00
Ordered imports alphabetically
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import { CreateShortUrl as createShortUrlsCreator } from '../../src/short-urls/CreateShortUrl';
|
||||
import type { ShortUrlCreation } from '../../src/short-urls/reducers/shortUrlCreation';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
|
||||
describe('<CreateShortUrl />', () => {
|
||||
const ShortUrlForm = () => <span>ShortUrlForm</span>;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { EditShortUrl as createEditShortUrl } from '../../src/short-urls/EditShortUrl';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { ShortUrl } from '../../src/short-urls/data';
|
||||
import { EditShortUrl as createEditShortUrl } from '../../src/short-urls/EditShortUrl';
|
||||
import type { ShortUrlDetail } from '../../src/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrlEdition } from '../../src/short-urls/reducers/shortUrlEdition';
|
||||
import type { ShortUrl } from '../../src/short-urls/data';
|
||||
|
||||
describe('<EditShortUrl />', () => {
|
||||
const shortUrlCreation = { validateUrls: true };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Paginator } from '../../src/short-urls/Paginator';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ShlinkPaginator } from '../../src/api/types';
|
||||
import { Paginator } from '../../src/short-urls/Paginator';
|
||||
import { ELLIPSIS } from '../../src/utils/helpers/pagination';
|
||||
|
||||
describe('<Paginator />', () => {
|
||||
|
||||
@@ -2,9 +2,9 @@ import { screen } from '@testing-library/react';
|
||||
import type { UserEvent } from '@testing-library/user-event/setup/setup';
|
||||
import { formatISO } from 'date-fns';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import type { Mode } from '../../src/short-urls/ShortUrlForm';
|
||||
import { ShortUrlForm as createShortUrlForm } from '../../src/short-urls/ShortUrlForm';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import { parseDate } from '../../src/utils/helpers/date';
|
||||
import type { OptionalString } from '../../src/utils/utils';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { endOfDay, formatISO, startOfDay } from 'date-fns';
|
||||
import { MemoryRouter, useLocation, useNavigate } from 'react-router-dom';
|
||||
import { ShortUrlsFilteringBar as filteringBarCreator } from '../../src/short-urls/ShortUrlsFilteringBar';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { DateRange } from '../../src/utils/helpers/dateIntervals';
|
||||
import { ShortUrlsFilteringBar as filteringBarCreator } from '../../src/short-urls/ShortUrlsFilteringBar';
|
||||
import { formatDate } from '../../src/utils/helpers/date';
|
||||
import type { DateRange } from '../../src/utils/helpers/dateIntervals';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
jest.mock('react-router-dom', () => ({
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter, useNavigate } from 'react-router-dom';
|
||||
import { ShortUrlsList as createShortUrlsList } from '../../src/short-urls/ShortUrlsList';
|
||||
import type { ShortUrl, ShortUrlsOrder } from '../../src/short-urls/data';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { MercureBoundProps } from '../../src/mercure/helpers/boundToMercureHub';
|
||||
import type { ShortUrlsList as ShortUrlsListModel } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import type { ReachableServer } from '../../src/servers/data';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { ShortUrl, ShortUrlsOrder } from '../../src/short-urls/data';
|
||||
import type { ShortUrlsList as ShortUrlsListModel } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import { ShortUrlsList as createShortUrlsList } from '../../src/short-urls/ShortUrlsList';
|
||||
import type { ShortUrlsTableType } from '../../src/short-urls/ShortUrlsTable';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
import type { SemVer } from '../../src/utils/helpers/version';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
jest.mock('react-router-dom', () => ({
|
||||
...jest.requireActual('react-router-dom'),
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { fireEvent, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrlsTable as shortUrlsTableCreator } from '../../src/short-urls/ShortUrlsTable';
|
||||
import type { ShortUrlsList } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import type { ShortUrlsOrderableFields } from '../../src/short-urls/data';
|
||||
import { SHORT_URLS_ORDERABLE_FIELDS } from '../../src/short-urls/data';
|
||||
import type { ShortUrlsList } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import { ShortUrlsTable as shortUrlsTableCreator } from '../../src/short-urls/ShortUrlsTable';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<ShortUrlsTable />', () => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { CreateShortUrlResult as createResult } from '../../../src/short-urls/helpers/CreateShortUrlResult';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { CreateShortUrlResult as createResult } from '../../../src/short-urls/helpers/CreateShortUrlResult';
|
||||
import type { ShortUrlCreation } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import type { TimeoutToggle } from '../../../src/utils/helpers/hooks';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import type { ShortUrlCreation } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
|
||||
describe('<CreateShortUrlResult />', () => {
|
||||
const copyToClipboard = jest.fn();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { DeleteShortUrlModal } from '../../../src/short-urls/helpers/DeleteShortUrlModal';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShortUrlDeletion } from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import type { InvalidShortUrlDeletion, ProblemDetailsError } from '../../../src/api/types/errors';
|
||||
import { ErrorTypeV2, ErrorTypeV3 } from '../../../src/api/types/errors';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { DeleteShortUrlModal } from '../../../src/short-urls/helpers/DeleteShortUrlModal';
|
||||
import type { ShortUrlDeletion } from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import { TestModalWrapper } from '../../__helpers__/TestModalWrapper';
|
||||
|
||||
describe('<DeleteShortUrlModal />', () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { screen } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ReportExporter } from '../../../src/common/services/ReportExporter';
|
||||
import { ExportShortUrlsBtn as createExportShortUrlsBtn } from '../../../src/short-urls/helpers/ExportShortUrlsBtn';
|
||||
import type { NotFoundServer, ReachableServer, SelectedServer } from '../../../src/servers/data';
|
||||
import { ExportShortUrlsBtn as createExportShortUrlsBtn } from '../../../src/short-urls/helpers/ExportShortUrlsBtn';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<ExportShortUrlsBtn />', () => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { fireEvent, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { QrCodeModal as createQrCodeModal } from '../../../src/short-urls/helpers/QrCodeModal';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ReachableServer } from '../../../src/servers/data';
|
||||
import type { SemVer } from '../../../src/utils/helpers/version';
|
||||
import type { ImageDownloader } from '../../../src/common/services/ImageDownloader';
|
||||
import type { ReachableServer } from '../../../src/servers/data';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { QrCodeModal as createQrCodeModal } from '../../../src/short-urls/helpers/QrCodeModal';
|
||||
import type { SemVer } from '../../../src/utils/helpers/version';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<QrCodeModal />', () => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import type { LinkSuffix } from '../../../src/short-urls/helpers/ShortUrlDetailLink';
|
||||
import { ShortUrlDetailLink } from '../../../src/short-urls/helpers/ShortUrlDetailLink';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { NotFoundServer, ReachableServer } from '../../../src/servers/data';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { LinkSuffix } from '../../../src/short-urls/helpers/ShortUrlDetailLink';
|
||||
import { ShortUrlDetailLink } from '../../../src/short-urls/helpers/ShortUrlDetailLink';
|
||||
|
||||
describe('<ShortUrlDetailLink />', () => {
|
||||
it.each([
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrlStatus } from '../../../src/short-urls/helpers/ShortUrlStatus';
|
||||
import type { ShortUrl, ShortUrlMeta, ShortUrlVisitsSummary } from '../../../src/short-urls/data';
|
||||
import { ShortUrlStatus } from '../../../src/short-urls/helpers/ShortUrlStatus';
|
||||
|
||||
describe('<ShortUrlStatus />', () => {
|
||||
const setUp = (shortUrl: ShortUrl) => ({
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrlVisitsCount } from '../../../src/short-urls/helpers/ShortUrlVisitsCount';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { ShortUrlVisitsCount } from '../../../src/short-urls/helpers/ShortUrlVisitsCount';
|
||||
|
||||
describe('<ShortUrlVisitsCount />', () => {
|
||||
const setUp = (visitsCount: number, shortUrl: ShortUrl) => ({
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { last } from 'ramda';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { addDays, formatISO, subDays } from 'date-fns';
|
||||
import { last } from 'ramda';
|
||||
import { MemoryRouter, useLocation } from 'react-router-dom';
|
||||
import { ShortUrlsRow as createShortUrlsRow } from '../../../src/short-urls/helpers/ShortUrlsRow';
|
||||
import type { TimeoutToggle } from '../../../src/utils/helpers/hooks';
|
||||
import type { ShortUrl, ShortUrlMeta } from '../../../src/short-urls/data';
|
||||
import type { Settings } from '../../../src/settings/reducers/settings';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ReachableServer } from '../../../src/servers/data';
|
||||
import { parseDate, now } from '../../../src/utils/helpers/date';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import type { Settings } from '../../../src/settings/reducers/settings';
|
||||
import type { ShortUrl, ShortUrlMeta } from '../../../src/short-urls/data';
|
||||
import { ShortUrlsRow as createShortUrlsRow } from '../../../src/short-urls/helpers/ShortUrlsRow';
|
||||
import { now, parseDate } from '../../../src/utils/helpers/date';
|
||||
import type { TimeoutToggle } from '../../../src/utils/helpers/hooks';
|
||||
import type { OptionalString } from '../../../src/utils/utils';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import { colorGeneratorMock } from '../../utils/services/__mocks__/ColorGenerator.mock';
|
||||
|
||||
interface SetUpOptions {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ShortUrlsRowMenu as createShortUrlsRowMenu } from '../../../src/short-urls/helpers/ShortUrlsRowMenu';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ReachableServer } from '../../../src/servers/data';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { ShortUrlsRowMenu as createShortUrlsRowMenu } from '../../../src/short-urls/helpers/ShortUrlsRowMenu';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<ShortUrlsRowMenu />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import type { QrErrorCorrection } from '../../../../src/utils/helpers/qrCodes';
|
||||
import { QrErrorCorrectionDropdown } from '../../../../src/short-urls/helpers/qr-codes/QrErrorCorrectionDropdown';
|
||||
import type { QrErrorCorrection } from '../../../../src/utils/helpers/qrCodes';
|
||||
import { renderWithEvents } from '../../../__helpers__/setUpTest';
|
||||
|
||||
describe('<QrErrorCorrectionDropdown />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import type { QrCodeFormat } from '../../../../src/utils/helpers/qrCodes';
|
||||
import { QrFormatDropdown } from '../../../../src/short-urls/helpers/qr-codes/QrFormatDropdown';
|
||||
import type { QrCodeFormat } from '../../../../src/utils/helpers/qrCodes';
|
||||
import { renderWithEvents } from '../../../__helpers__/setUpTest';
|
||||
|
||||
describe('<QrFormatDropdown />', () => {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type {
|
||||
CreateShortUrlAction } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import {
|
||||
shortUrlCreationReducerCreator,
|
||||
createShortUrl as createShortUrlCreator,
|
||||
shortUrlCreationReducerCreator,
|
||||
} from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
describe('shortUrlCreationReducer', () => {
|
||||
const shortUrl = Mock.of<ShortUrl>();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import {
|
||||
shortUrlDeletionReducerCreator,
|
||||
deleteShortUrl as deleteShortUrlCretor,
|
||||
} from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ProblemDetailsError } from '../../../src/api/types/errors';
|
||||
import {
|
||||
deleteShortUrl as deleteShortUrlCretor,
|
||||
shortUrlDeletionReducerCreator,
|
||||
} from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
|
||||
describe('shortUrlDeletionReducer', () => {
|
||||
const deleteShortUrlCall = jest.fn();
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ShortUrlDetailAction } from '../../../src/short-urls/reducers/shortUrlDetail';
|
||||
import { shortUrlDetailReducerCreator } from '../../../src/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShortUrlDetailAction } from '../../../src/short-urls/reducers/shortUrlDetail';
|
||||
import { shortUrlDetailReducerCreator } from '../../../src/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrlsList } from '../../../src/short-urls/reducers/shortUrlsList';
|
||||
|
||||
describe('shortUrlDetailReducer', () => {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { SelectedServer } from '../../../src/servers/data';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type {
|
||||
ShortUrlEditedAction } from '../../../src/short-urls/reducers/shortUrlEdition';
|
||||
import {
|
||||
shortUrlEditionReducerCreator,
|
||||
editShortUrl as editShortUrlCreator,
|
||||
shortUrlEditionReducerCreator,
|
||||
} from '../../../src/short-urls/reducers/shortUrlEdition';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { SelectedServer } from '../../../src/servers/data';
|
||||
|
||||
describe('shortUrlEditionReducer', () => {
|
||||
const longUrl = 'https://shlink.io';
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkPaginator, ShlinkShortUrlsResponse } from '../../../src/api/types';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { createShortUrl as createShortUrlCreator } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import { shortUrlDeleted } from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
import { editShortUrl as editShortUrlCreator } from '../../../src/short-urls/reducers/shortUrlEdition';
|
||||
import {
|
||||
listShortUrls as listShortUrlsCreator,
|
||||
shortUrlsListReducerCreator,
|
||||
} from '../../../src/short-urls/reducers/shortUrlsList';
|
||||
import { shortUrlDeleted } from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
import type { ShlinkPaginator, ShlinkShortUrlsResponse } from '../../../src/api/types';
|
||||
import { createShortUrl as createShortUrlCreator } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import { editShortUrl as editShortUrlCreator } from '../../../src/short-urls/reducers/shortUrlEdition';
|
||||
import { createNewVisits } from '../../../src/visits/reducers/visitCreation';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
|
||||
describe('shortUrlsListReducer', () => {
|
||||
const shortCode = 'abc123';
|
||||
|
||||
Reference in New Issue
Block a user