mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-20 13:36:20 +00:00
Move more components to shlink-web-component when applicable
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { CopyToClipboardIcon } from '../../src/utils/CopyToClipboardIcon';
|
||||
import { CopyToClipboardIcon } from '../../shlink-web-component/utils/components/CopyToClipboardIcon';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<CopyToClipboardIcon />', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { ExportBtn } from '../../src/utils/ExportBtn';
|
||||
import { ExportBtn } from '../../shlink-web-component/utils/components/ExportBtn';
|
||||
|
||||
describe('<ExportBtn />', () => {
|
||||
const setUp = (amount?: number, loading = false) => render(<ExportBtn amount={amount} loading={loading} />);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Placement } from '@popperjs/core';
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import type { InfoTooltipProps } from '../../src/utils/InfoTooltip';
|
||||
import { InfoTooltip } from '../../src/utils/InfoTooltip';
|
||||
import type { InfoTooltipProps } from '../../shlink-web-component/utils/components/InfoTooltip';
|
||||
import { InfoTooltip } from '../../shlink-web-component/utils/components/InfoTooltip';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<InfoTooltip />', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { PaginationDropdown } from '../../src/utils/PaginationDropdown';
|
||||
import { PaginationDropdown } from '../../shlink-web-component/utils/components/PaginationDropdown';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<PaginationDropdown />', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { roundTen } from '../../../src/utils/helpers/numbers';
|
||||
import { roundTen } from '../../../shlink-web-component/utils/helpers/numbers';
|
||||
|
||||
describe('numbers', () => {
|
||||
describe('roundTen', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { QrCodeFormat, QrErrorCorrection } from '../../../src/utils/helpers/qrCodes';
|
||||
import { buildQrCodeUrl } from '../../../src/utils/helpers/qrCodes';
|
||||
import type { QrCodeFormat, QrErrorCorrection } from '../../../shlink-web-component/utils/helpers/qrCodes';
|
||||
import { buildQrCodeUrl } from '../../../shlink-web-component/utils/helpers/qrCodes';
|
||||
|
||||
describe('qrCodes', () => {
|
||||
describe('buildQrCodeUrl', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { TableOrderIcon } from '../../../shlink-web-component/utils/table/TableOrderIcon';
|
||||
import type { OrderDir } from '../../../src/utils/helpers/ordering';
|
||||
import { TableOrderIcon } from '../../../src/utils/table/TableOrderIcon';
|
||||
|
||||
describe('<TableOrderIcon />', () => {
|
||||
const setUp = (field: string, currentDir?: OrderDir, className?: string) => render(
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
capitalize,
|
||||
nonEmptyValueOrNull,
|
||||
parseBooleanToString,
|
||||
parseOptionalBooleanToString,
|
||||
@@ -45,17 +44,6 @@ describe('utils', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('capitalize', () => {
|
||||
it.each([
|
||||
['foo', 'Foo'],
|
||||
['BAR', 'BAR'],
|
||||
['bAZ', 'BAZ'],
|
||||
['with spaces', 'With spaces'],
|
||||
])('sets first letter in uppercase', (value, expectedResult) => {
|
||||
expect(capitalize(value)).toEqual(expectedResult);
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseBooleanToString', () => {
|
||||
it.each([
|
||||
[true, 'true'],
|
||||
|
||||
Reference in New Issue
Block a user