Skip to content

Commit

Permalink
🔧 chore: update test&e2e config
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Sep 26, 2020
1 parent b543e17 commit 10acfae
Show file tree
Hide file tree
Showing 46 changed files with 51 additions and 48 deletions.
2 changes: 1 addition & 1 deletion config/config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export default defineConfig({
dynamicRoot: true,
},
alias: {
'@e2e-utils': resolve(__dirname, '../docs/__utils__'),
'@docs-utils': resolve(__dirname, '../docs/__utils__'),
},
});
5 changes: 4 additions & 1 deletion config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ export default defineConfig({
loading: '@ant-design/pro-skeleton',
},
alias: {
'@e2e-utils': resolve(__dirname, '../docs/__utils__'),
'@docs-utils': resolve(__dirname, '../docs/__utils__'),
},
hash: true,
theme: {
'@c-primary': '#ff9800',
},
});
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/BackgroundImage/InlinePng.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
// @ts-ignore
import styles from './Inline.less';

Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/BackgroundImage/InlineSvg.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
// @ts-ignore
import styles from './Inline.less';

Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/BackgroundImage/WithSize.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/BackgroundImage/WithoutSize.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/CanvasBasic.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Line } from '@ant-design/charts';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

const data = [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/CanvasCors.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect } from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import { Checkbox } from 'antd';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

const SwitchDemo: FC = () => {
const { elements, ref } = useElements();
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Image/ImageInline.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useRef } from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import copy from 'copy-to-clipboard';
import { message } from 'antd';

Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Image/ImageNoProtocol.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Image/ImagePng.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Image/ImageSvg.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Image/TwoInlineImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useRef } from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Radio.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Radio } from 'antd';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import { Select } from 'antd';

const { Option } = Select;
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Switch.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import { Switch, Space } from 'antd';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

const SwitchDemo: FC = () => {
const { elements, ref } = useElements();
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/BlockAlign.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import './Text.less';

/**
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/Ellipsis.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/FlexAlign.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import './Text.less';

/**
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import { Input } from 'antd';

/**
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/InputAligin.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

export default () => {
const { elements, ref } = useElements();
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/Label.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import './Text.less';

/**
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/MutliLine.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/Span.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/SpanIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import { AppleOutlined } from '@ant-design/icons';

/**
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/SpanInlineBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import './Text.less';
/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/SpanLinkRow.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/basic/demos/Text/TagInlineBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/components/demos/DefaultModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC, useEffect } from 'react';
import { Modal } from 'antd';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
// @ts-ignore
import styles from './Modal.less';

Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/components/demos/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Tag } from 'antd';
import ProTable from '@ant-design/pro-table';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

const dataSource = [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/components/demos/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import { Tabs } from 'antd';
import { AppleOutlined, AndroidOutlined } from '@ant-design/icons';

Expand Down
6 changes: 3 additions & 3 deletions docs/e2e/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ nav:

演示: ![demo](https://gw.alipayobjects.com/zos/antfincdn/TrL5ejOKSE/demo.gif)

### @e2e-layout
### @docs-utils

用例代码显示上并不包括 `@e2e-layout` 的代码
用例代码显示上并不包括 `@docs-utils` 的代码

如果需要查看 `@e2e-layout` 的代码, 请到 `docs/__utils__` 文件夹 [查看](https://github.com/ant-design/html2sketch/tree/master/docs/__utils__)
如果需要查看 `@docs-utils` 的代码, 请到 `docs/__utils__` 文件夹 [查看](https://github.com/ant-design/html2sketch/tree/master/docs/__utils__)
2 changes: 1 addition & 1 deletion docs/e2e/styles/demos/LineGradient.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/svg/demos/Icons.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
import { DropboxOutlined, BehanceOutlined } from '@ant-design/icons';

const SvgIcons: FC = () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/svg/demos/SvgGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC } from 'react';
import { Button } from 'antd';
import { UpCircleOutlined } from '@ant-design/icons';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
* Button demos
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/svg/demos/SvgIllustration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { FC } from 'react';
// @ts-ignore
import { ReactComponent as Svg } from './svg/illustration.svg';

import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

/**
* 插画解析 demos
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/svg/demos/SvgMutliPath.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { TestLayout, useElements } from '@e2e-utils';
import { TestLayout, useElements } from '@docs-utils';
import { PlusOutlined } from '@ant-design/icons';

const IconTest: FC = () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/svg/demos/SvgPathGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { TestLayout, useElements } from '@e2e-utils';
import { TestLayout, useElements } from '@docs-utils';
import { UpCircleOutlined } from '@ant-design/icons';

const IconTest: FC = () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/svg/demos/SvgSimpleIllustration.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable */
import React, { FC } from 'react';
import { TestLayout, useElements } from '@e2e-utils';
import { TestLayout, useElements } from '@docs-utils';

const IconTest: FC = () => {
const { elements, ref } = useElements();
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/svg/demos/SvgTest.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
// @ts-ignore
import { ReactComponent as Svg } from './svg/test.svg';

Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/svg/demos/SvgText.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';
// @ts-ignore
import { ReactComponent as Svg } from './svg/text.svg';

Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/svg/demos/SvgUseSymbol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ReactComponent as SvgLink } from './svg/symbolLink.svg';
// @ts-ignore
import { ReactComponent as Svg } from './svg/useSymbol.svg';

import { useElements, TestLayout } from '@e2e-utils';
import { useElements, TestLayout } from '@docs-utils';

const SvgIcons: FC = () => {
const { elements, ref } = useElements();
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/basic/image.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
outputJSONData,
pngURLImageJSON,
inlineImageJSON,
} from '@e2e';
} from '@e2e-utils';

describe('测试图片', () => {
test('inline 的图片类型正常', async () => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/components/modal.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SketchFormat from '@sketch-hq/sketch-file-format-ts';
import { initHtml2Sketch, isUpdate, outputJSONData } from '@e2e';
import { initHtml2Sketch, isUpdate, outputJSONData } from '@e2e-utils';

describe('测试 Modal 类型', () => {
test('Modal 正常', async () => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/svg/icon.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
outputJSONData,
svgButtonJSON,
svgIconJSON,
} from '@e2e';
} from '@e2e-utils';

describe('测试 Svg Icon', () => {
test('Svg icon', async () => {
Expand Down

0 comments on commit 10acfae

Please sign in to comment.