mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-11 10:03:51 +00:00
First shlink-frontend-kit iteration
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Checkbox } from '../../src/utils/Checkbox';
|
||||
import { Checkbox } from '../../shlink-frontend-kit/src/form/Checkbox';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<Checkbox />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import type { DropdownBtnProps } from '../../src/utils/DropdownBtn';
|
||||
import { DropdownBtn } from '../../src/utils/DropdownBtn';
|
||||
import type { DropdownBtnProps } from '../../shlink-frontend-kit/src/navigation/DropdownBtn';
|
||||
import { DropdownBtn } from '../../shlink-frontend-kit/src/navigation/DropdownBtn';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<DropdownBtn />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import type { MessageProps } from '../../src/utils/Message';
|
||||
import { Message } from '../../src/utils/Message';
|
||||
import type { MessageProps } from '../../shlink-frontend-kit/src/block/Message';
|
||||
import { Message } from '../../shlink-frontend-kit/src/block/Message';
|
||||
|
||||
describe('<Message />', () => {
|
||||
const setUp = (props: PropsWithChildren<MessageProps> = {}) => render(<Message {...props} />);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable no-console */
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { NavPillItem, NavPills } from '../../src/utils/NavPills';
|
||||
import { NavPillItem, NavPills } from '../../shlink-frontend-kit/src/navigation/NavPills';
|
||||
|
||||
describe('<NavPills />', () => {
|
||||
let originalError: typeof console.error;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { values } from 'ramda';
|
||||
import type { OrderDir } from '../../src/utils/helpers/ordering';
|
||||
import type { OrderingDropdownProps } from '../../src/utils/OrderingDropdown';
|
||||
import { OrderingDropdown } from '../../src/utils/OrderingDropdown';
|
||||
import type { OrderDir } from '../../shlink-frontend-kit/src/ordering/ordering';
|
||||
import type { OrderingDropdownProps } from '../../shlink-frontend-kit/src/ordering/OrderingDropdown';
|
||||
import { OrderingDropdown } from '../../shlink-frontend-kit/src/ordering/OrderingDropdown';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<OrderingDropdown />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import type { ResultProps, ResultType } from '../../src/utils/Result';
|
||||
import { Result } from '../../src/utils/Result';
|
||||
import type { ResultProps, ResultType } from '../../shlink-frontend-kit/src/block/Result';
|
||||
import { Result } from '../../shlink-frontend-kit/src/block/Result';
|
||||
|
||||
describe('<Result />', () => {
|
||||
const setUp = (props: ResultProps) => render(<Result {...props} />);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import type { DropdownBtnMenuProps } from '../../src/utils/RowDropdownBtn';
|
||||
import { RowDropdownBtn } from '../../src/utils/RowDropdownBtn';
|
||||
import type { DropdownBtnMenuProps } from '../../shlink-frontend-kit/src/navigation/RowDropdownBtn';
|
||||
import { RowDropdownBtn } from '../../shlink-frontend-kit/src/navigation/RowDropdownBtn';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<RowDropdownBtn />', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { SimpleCard } from '../../src/utils/SimpleCard';
|
||||
import { SimpleCard } from '../../shlink-frontend-kit/src/block/SimpleCard';
|
||||
|
||||
describe('<SimpleCard />', () => {
|
||||
it('does not render title if not provided', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
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 { DateIntervalDropdownItems } from '../../../src/utils/dates/DateIntervalDropdownItems';
|
||||
import { DropdownBtn } from '../../../src/utils/DropdownBtn';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DateIntervalDropdownItems />', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { OrderDir } from '../../../src/utils/helpers/ordering';
|
||||
import { determineOrderDir, orderToString, stringToOrder } from '../../../src/utils/helpers/ordering';
|
||||
import type { OrderDir } from '../../../shlink-frontend-kit/src/ordering/ordering';
|
||||
import { determineOrderDir, orderToString, stringToOrder } from '../../../shlink-frontend-kit/src/ordering/ordering';
|
||||
|
||||
describe('ordering', () => {
|
||||
describe('determineOrderDir', () => {
|
||||
|
||||
@@ -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 type { OrderDir } from '../../../shlink-frontend-kit/src/ordering/ordering';
|
||||
|
||||
describe('<TableOrderIcon />', () => {
|
||||
const setUp = (field: string, currentDir?: OrderDir, className?: string) => render(
|
||||
|
||||
Reference in New Issue
Block a user