Skip to content

Commit fd9d169

Browse files
authored
Move file uploader basic stories to proper folder (#5352)
1 parent a815e8c commit fd9d169

11 files changed

+41
-40
lines changed

src/file-uploader/__tests__/file-uploader.scenario.tsx renamed to src/file-uploader-basic/__tests__/file-uploader-basic-disabled.scenario.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ This source code is licensed under the MIT license found in the
55
LICENSE file in the root directory of this source tree.
66
*/
77
import * as React from 'react';
8-
import { FileUploader } from '..';
8+
9+
import { FileUploaderBasic } from '..';
910

1011
export function Scenario() {
11-
return <FileUploader />;
12+
return <FileUploaderBasic disabled />;
1213
}

src/file-uploader/__tests__/file-uploader-error.scenario.tsx renamed to src/file-uploader-basic/__tests__/file-uploader-basic-error.scenario.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ LICENSE file in the root directory of this source tree.
66
*/
77
import * as React from 'react';
88

9-
import { FileUploader } from '..';
9+
import { FileUploaderBasic } from '..';
1010

1111
export function Scenario() {
1212
return (
13-
<FileUploader
13+
<FileUploaderBasic
1414
progressAmount={40}
1515
progressMessage="Uploading... 8.24 of 45.08MB"
1616
errorMessage="Upload failed... connection was lost."

src/file-uploader/__tests__/file-uploader-post-drop.scenario.tsx renamed to src/file-uploader-basic/__tests__/file-uploader-basic-post-drop.scenario.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ LICENSE file in the root directory of this source tree.
66
*/
77
import * as React from 'react';
88

9-
import { FileUploader } from '..';
9+
import { FileUploaderBasic } from '..';
1010

1111
export function Scenario() {
1212
return (
1313
<React.Fragment>
14-
<FileUploader progressMessage="uploading..." progressAmount={40} />
14+
<FileUploaderBasic progressMessage="uploading..." progressAmount={40} />
1515
</React.Fragment>
1616
);
1717
}

src/file-uploader/__tests__/file-uploader-pre-drop.scenario.tsx renamed to src/file-uploader-basic/__tests__/file-uploader-basic-pre-drop.scenario.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ LICENSE file in the root directory of this source tree.
66
*/
77
import * as React from 'react';
88

9-
import { FileUploader } from '..';
9+
import { FileUploaderBasic } from '..';
1010

1111
export function Scenario() {
1212
return (
1313
<React.Fragment>
14-
<FileUploader />
14+
<FileUploaderBasic />
1515
</React.Fragment>
1616
);
1717
}

src/file-uploader/__tests__/file-uploader-progress-bar.scenario.tsx renamed to src/file-uploader-basic/__tests__/file-uploader-basic-progress-bar.scenario.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ LICENSE file in the root directory of this source tree.
66
*/
77
import * as React from 'react';
88

9-
import { FileUploader } from '..';
9+
import { FileUploaderBasic } from '..';
1010

1111
export function Scenario() {
12-
return <FileUploader progressAmount={40} progressMessage="Uploading... 8.24 of 45.08MB" />;
12+
return <FileUploaderBasic progressAmount={40} progressMessage="Uploading... 8.24 of 45.08MB" />;
1313
}

src/file-uploader/__tests__/file-uploader-spinner.scenario.tsx renamed to src/file-uploader-basic/__tests__/file-uploader-basic-spinner.scenario.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ LICENSE file in the root directory of this source tree.
66
*/
77
import * as React from 'react';
88

9-
import { FileUploader } from '..';
9+
import { FileUploaderBasic } from '..';
1010

1111
export function Scenario() {
12-
return <FileUploader progressMessage="Uploading... hang tight." />;
12+
return <FileUploaderBasic progressMessage="Uploading... hang tight." />;
1313
}

src/file-uploader/__tests__/file-uploader.e2e.ts renamed to src/file-uploader-basic/__tests__/file-uploader-basic.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ LICENSE file in the root directory of this source tree.
88
import { expect, test } from '@playwright/test';
99
import { mount, analyzeAccessibility } from '../../test/integration';
1010

11-
test.describe('file-uploader', () => {
11+
test.describe('file-uploader-basic', () => {
1212
test('pre-drop passes basic a11y tests', async ({ page }) => {
13-
await mount(page, 'file-uploader--pre-drop');
13+
await mount(page, 'file-uploader-basic--pre-drop');
1414
const accessibilityReport = await analyzeAccessibility(page);
1515

1616
expect(accessibilityReport).toHaveNoAccessibilityIssues();
1717
});
1818

1919
test('post-drop passes basic a11y tests', async ({ page }) => {
20-
await mount(page, 'file-uploader--post-drop');
20+
await mount(page, 'file-uploader-basic--post-drop');
2121
const accessibilityReport = await analyzeAccessibility(page);
2222

2323
expect(accessibilityReport).toHaveNoAccessibilityIssues();

src/file-uploader/__tests__/file-uploader-disabled.scenario.tsx renamed to src/file-uploader-basic/__tests__/file-uploader-basic.scenario.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ This source code is licensed under the MIT license found in the
55
LICENSE file in the root directory of this source tree.
66
*/
77
import * as React from 'react';
8-
9-
import { FileUploader } from '..';
8+
import { FileUploaderBasic } from '..';
109

1110
export function Scenario() {
12-
return <FileUploader disabled />;
11+
return <FileUploaderBasic />;
1312
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
Copyright (c) Uber Technologies, Inc.
3+
4+
This source code is licensed under the MIT license found in the
5+
LICENSE file in the root directory of this source tree.
6+
*/
7+
import React from 'react';
8+
import { Scenario as FileUploaderBasicDisabled } from './file-uploader-basic-disabled.scenario';
9+
import { Scenario as FileUploaderBasicError } from './file-uploader-basic-error.scenario';
10+
import { Scenario as FileUploaderBasicPostDrop } from './file-uploader-basic-post-drop.scenario';
11+
import { Scenario as FileUploaderBasicPreDrop } from './file-uploader-basic-pre-drop.scenario';
12+
import { Scenario as FileUploaderBasicProgressBar } from './file-uploader-basic-progress-bar.scenario';
13+
import { Scenario as FileUploaderBasicSpinner } from './file-uploader-basic-spinner.scenario';
14+
import { Scenario as FileUploaderBasicDefault } from './file-uploader-basic.scenario';
15+
16+
export const Disabled = () => <FileUploaderBasicDisabled />;
17+
export const Error = () => <FileUploaderBasicError />;
18+
export const PostDrop = () => <FileUploaderBasicPostDrop />;
19+
export const PreDrop = () => <FileUploaderBasicPreDrop />;
20+
export const ProgressBar = () => <FileUploaderBasicProgressBar />;
21+
export const Spinner = () => <FileUploaderBasicSpinner />;
22+
export const FileUploader = () => <FileUploaderBasicDefault />;

src/file-uploader/__tests__/file-uploader.stories.tsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)