Skip to content

Commit fbe10ba

Browse files
Bump @testing-library/user-event from 12.6.3 to 13.0.1 (#175)
* Bump @testing-library/user-event from 12.6.3 to 13.0.1 Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 12.6.3 to 13.0.1. - [Release notes](https://github.com/testing-library/user-event/releases) - [Changelog](https://github.com/testing-library/user-event/blob/master/CHANGELOG.md) - [Commits](testing-library/user-event@v12.6.3...v13.0.1) Signed-off-by: dependabot[bot] <[email protected]> * fix template pushes Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kemal Ahmed <[email protected]>
1 parent 9772c55 commit fbe10ba

File tree

10 files changed

+21
-22
lines changed

10 files changed

+21
-22
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@stripe/stripe-js": "^1.12.1",
1616
"@testing-library/jest-dom": "^5.11.9",
1717
"@testing-library/react": "^11.2.5",
18-
"@testing-library/user-event": "^12.6.2",
18+
"@testing-library/user-event": "^13.0.1",
1919
"bulma": "^0.9.2",
2020
"eslint-config-google": "^0.14.0",
2121
"prop-types": "^15.7.2",

src/components/TableRow.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ const TableRow = (props) => {
3838
}
3939
if (props.data) {
4040
return props.data.map((item) => (
41-
<tr key={`table-row-${item.uuid}`}>
42-
<td><a href={`${props.prefix}/${item.uuid}`}>{item.uuid}</a></td>
41+
<tr key={`table-row-${item.id}`}>
42+
<td><a href={`${props.prefix}/${item.id}`}>{item.id}</a></td>
4343
<td><span>{item.name}</span></td>
4444
<TableCol attrs={attrs} data={item} />
4545
<CondCol rif={item.status}><StatusBadge status={item.status} /></CondCol>
46-
<CondCol rif={props.action}><ActionButton action={props.action} text={props.actionLabel} url={`${props.prefix}/${item.uuid}`} /></CondCol>
46+
<CondCol rif={props.action}><ActionButton action={props.action} text={props.actionLabel} url={`${props.prefix}/${item.id}`} /></CondCol>
4747
</tr>
4848
));
4949
} else {

src/pages/Dashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const Dashboard = () => {
6161
<div className="card">
6262
<div className="card-header">
6363
<h3 className="card-header-title">
64-
Outputs list ({mediaList ? mediaList.total : '0'})
64+
Outputs list ({mediaList ? mediaList.length : '0'})
6565
</h3>
6666
</div>
6767
<div className="card-content content">

src/pages/FileView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const FileView = (props) => {
3333
<div className="card card-content content">
3434
<div>
3535
<p className="subtitle is-5 has-text-left">
36-
<label>ID</label>: <strong>{media ? media.uuid : <span className="is-loading">Loading</span>}</strong>
36+
<label>ID</label>: <strong>{media ? media.id : <span className="is-loading">Loading</span>}</strong>
3737
</p>
3838
</div>
3939
<div>

src/pages/TemplateWizard.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import {Link} from 'react-router-dom';
55

66
const InputList = ({inputs}) => {
77
if (!inputs) return (<option disabled>Loading</option>);
8-
98
return inputs.map((input, index) => (
10-
<option value={input.elementName} key={`${input.elementName}-${index}`}>{input.elementName}</option>
9+
<option value={input.id} key={`${input.file}-${index}`}>{input.file}</option>
1110
));
1211
};
1312

@@ -73,8 +72,8 @@ const TemplateWizard = (props) => {
7372
const handleFileSubmit = async (event) => {
7473
// TODO: create FormData
7574
event.preventDefault();
76-
await uploadFile(new FormData(event.target));
77-
window.location.href = '/file/89awefjsdfaksd';
75+
const fileResp = await uploadFile(new FormData(event.target));
76+
window.location.href = `/file/${fileResp.id}`;
7877
};
7978
const uploadFile = async (req) => {
8079
if (!globalConsumer.token) {
@@ -134,7 +133,7 @@ const TemplateWizard = (props) => {
134133
</div>
135134
<fieldset className="block">
136135
<legend className="subtitle is-5">Choose videos for each view:</legend>
137-
<ViewInputs inputs={inputs.elements} views={media.views || []} />
136+
<ViewInputs inputs={inputs} views={media.views || []} />
138137
</fieldset>
139138
<button className="button is-primary block" type="submit">Submit</button>
140139
</div>

src/pages/TemplatesView.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const TemplatesView = () => {
3232
<div className="card">
3333
<div className="card-header">
3434
<h2 className="card-header-title">
35-
Templates list ({mediaList ? mediaList.total : '0'})
35+
Templates list ({mediaList ? mediaList.length : '0'})
3636
</h2>
3737
<a className="button is-info is-rounded" href="templates/new" title="Begin Process Wizard">
3838
New&nbsp;&nbsp;
@@ -60,7 +60,7 @@ const TemplatesView = () => {
6060
</tr>
6161
</tfoot>
6262
<tbody>
63-
<TableRow prefix="/templates" action="/use" actionLabel="Use" attrs={attrs} data={mediaList.elements} />
63+
<TableRow prefix="/templates" action="/use" actionLabel="Use" attrs={attrs} data={mediaList} />
6464
</tbody>
6565
</table>
6666
</div>

test/src/mocks/ElementResponse.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "string",
1414
"faker": "system.fileName"
1515
},
16-
"uuid": {
16+
"id": {
1717
"type": "string",
1818
"faker": "random.uuid"
1919
},
@@ -37,7 +37,7 @@
3737
"required": [
3838
"elementType",
3939
"elementName",
40-
"uuid",
40+
"id",
4141
"creationDate",
4242
"updatedDate",
4343
"status"

test/src/mocks/OutputResponse.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"type": "string",
3636
"faker": "date.past"
3737
},
38-
"uuid": {
38+
"id": {
3939
"type": "string",
4040
"faker": "random.uuid"
4141
}
@@ -46,6 +46,6 @@
4646
"status",
4747
"templateId",
4848
"updatedDate",
49-
"uuid"
49+
"id"
5050
]
5151
}

test/src/mocks/TemplateResponse.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
3840
2929
]
3030
},
31-
"uuid": {
31+
"id": {
3232
"type": "string",
3333
"faker": "random.uuid"
3434
}
@@ -37,6 +37,6 @@
3737
"height",
3838
"views",
3939
"name",
40-
"uuid"
40+
"id"
4141
]
4242
}

0 commit comments

Comments
 (0)