feat: Add E2E tests (#4)

This commit is contained in:
2021-04-11 23:27:13 +02:00
committed by GitHub
parent e590d40db7
commit 6c16252b3b
16 changed files with 2618 additions and 43 deletions

View File

@@ -67,6 +67,7 @@ const FileView: React.FC<Props> = ({
actions.push(
<IconText
icon={DownloadOutlined}
className="msg-download"
type="primary"
text="Download"
onClick={() => downloadLink(file.name, file.blob!)}
@@ -77,6 +78,7 @@ const FileView: React.FC<Props> = ({
return (
<List.Item
actions={actions}
className="msg-item"
>
<List.Item.Meta
avatar={icon}

View File

@@ -13,8 +13,8 @@ const Add: React.FC = () => {
<>
<Divider>
<Radio.Group onChange={evt => setType(evt.target.value)} defaultValue={DEFAULT_VALUE}>
<Radio.Button value="text"><FileTextOutlined /> Text</Radio.Button>
<Radio.Button value="file"><FileOutlined /> File</Radio.Button>
<Radio.Button className="add-text-tab" value="text"><FileTextOutlined /> Text</Radio.Button>
<Radio.Button className="add-file-tab" value="file"><FileOutlined /> File</Radio.Button>
</Radio.Group>
</Divider>
{type === 'text' && <AddText />}

View File

@@ -19,12 +19,14 @@ const AddText : React.FC = () => {
<Form.Item>
<Input
placeholder="Title"
className="msg-title"
value={name}
onChange={evt => setName(evt.target.value)}
/>
</Form.Item>
<Form.Item>
<Input.TextArea
className="msg-body"
placeholder="Your message here..."
value={text}
rows={6}
@@ -34,6 +36,7 @@ const AddText : React.FC = () => {
<Form.Item>
<Button
onClick={add}
className="msg-add"
type="primary"
icon={<PlusOutlined />}
disabled={!text}