Skip to content

Commit

Permalink
test(ui): adjust the directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Jan 23, 2022
1 parent 8ef6157 commit 5394fe7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { render, screen, fireEvent } from '@testing-library/react';

import { PREFIX } from '../../tests';
import { DButton } from '../button';
import { DFooter } from './Footer';
import { PREFIX } from '../../../tests';
import { DButton } from '../../button';
import { DFooter } from '../Footer';

describe('DFooter', () => {
const okButton = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen, fireEvent } from '@testing-library/react';

import { DIcon } from '../icon';
import { DHeader } from './Header';
import { DIcon } from '../../icon';
import { DHeader } from '../Header';

const icon = <DIcon data-testid="custom-icon"></DIcon>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { render, screen } from '@testing-library/react';

import { PREFIX } from '../../tests';
import { DIcon } from '../icon';
import { DButtonGroup, DButton } from './index';
import { PREFIX } from '../../../tests';
import { DIcon } from '../../icon';
import { DButton } from '../Button';
import { DButtonGroup } from '../ButtonGroup';

const icon = <DIcon data-testid="custom-icon"></DIcon>;

Expand Down
1 change: 0 additions & 1 deletion packages/ui/src/components/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const Input: React.ForwardRefRenderFunction<DInputRef, DInputProps> = (props, re
'',
dModel,
onModelChange,
/* istanbul ignore next */
dFormControlName ? { formControlName: dFormControlName, id: _id } : undefined
);

Expand Down
1 change: 0 additions & 1 deletion packages/ui/src/components/input/InputAffix.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export function DInputAffix(props: DInputAffixProps) {
const handleNumberChange = useCallback(
(isIncrease = true) => {
const handleFunc = () => {
/* istanbul ignore next */
if (inputEl) {
const step = getNumberAttribute(inputEl.step, 1);
const max = getNumberAttribute(inputEl.max, Infinity);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { DInputProps } from './Input';
import type { DInputAffixProps } from './InputAffix';
import type { DInputProps } from '../Input';
import type { DInputAffixProps } from '../InputAffix';
import type { RenderResult } from '@testing-library/react';

import { render, act, fireEvent } from '@testing-library/react';

import { PREFIX } from '../../tests';
import { DIcon } from '../icon';
import { DInput, DInputAffix } from './index';
import { PREFIX } from '../../../tests';
import { DIcon } from '../../icon';
import { DInput } from '../Input';
import { DInputAffix } from '../InputAffix';

jest.useFakeTimers();

Expand Down

0 comments on commit 5394fe7

Please sign in to comment.