Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @testing-library/user-event from 12.6.3 to 13.0.1 #175

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@stripe/stripe-js": "^1.12.1",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@testing-library/user-event": "^12.6.2",
"@testing-library/user-event": "^13.0.1",
"bulma": "^0.9.2",
"eslint-config-google": "^0.14.0",
"prop-types": "^15.7.2",
Expand Down
6 changes: 3 additions & 3 deletions src/components/TableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ const TableRow = (props) => {
}
if (props.data) {
return props.data.map((item) => (
<tr key={`table-row-${item.uuid}`}>
<td><a href={`${props.prefix}/${item.uuid}`}>{item.uuid}</a></td>
<tr key={`table-row-${item.id}`}>
<td><a href={`${props.prefix}/${item.id}`}>{item.id}</a></td>
<td><span>{item.name}</span></td>
<TableCol attrs={attrs} data={item} />
<CondCol rif={item.status}><StatusBadge status={item.status} /></CondCol>
<CondCol rif={props.action}><ActionButton action={props.action} text={props.actionLabel} url={`${props.prefix}/${item.uuid}`} /></CondCol>
<CondCol rif={props.action}><ActionButton action={props.action} text={props.actionLabel} url={`${props.prefix}/${item.id}`} /></CondCol>
</tr>
));
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const Dashboard = () => {
<div className="card">
<div className="card-header">
<h3 className="card-header-title">
Outputs list ({mediaList ? mediaList.total : '0'})
Outputs list ({mediaList ? mediaList.length : '0'})
</h3>
</div>
<div className="card-content content">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/FileView.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const FileView = (props) => {
<div className="card card-content content">
<div>
<p className="subtitle is-5 has-text-left">
<label>ID</label>: <strong>{media ? media.uuid : <span className="is-loading">Loading</span>}</strong>
<label>ID</label>: <strong>{media ? media.id : <span className="is-loading">Loading</span>}</strong>
</p>
</div>
<div>
Expand Down
9 changes: 4 additions & 5 deletions src/pages/TemplateWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import {Link} from 'react-router-dom';

const InputList = ({inputs}) => {
if (!inputs) return (<option disabled>Loading</option>);

return inputs.map((input, index) => (
<option value={input.elementName} key={`${input.elementName}-${index}`}>{input.elementName}</option>
<option value={input.id} key={`${input.file}-${index}`}>{input.file}</option>
));
};

Expand Down Expand Up @@ -73,8 +72,8 @@ const TemplateWizard = (props) => {
const handleFileSubmit = async (event) => {
// TODO: create FormData
event.preventDefault();
await uploadFile(new FormData(event.target));
window.location.href = '/file/89awefjsdfaksd';
const fileResp = await uploadFile(new FormData(event.target));
window.location.href = `/file/${fileResp.id}`;
};
const uploadFile = async (req) => {
if (!globalConsumer.token) {
Expand Down Expand Up @@ -134,7 +133,7 @@ const TemplateWizard = (props) => {
</div>
<fieldset className="block">
<legend className="subtitle is-5">Choose videos for each view:</legend>
<ViewInputs inputs={inputs.elements} views={media.views || []} />
<ViewInputs inputs={inputs} views={media.views || []} />
</fieldset>
<button className="button is-primary block" type="submit">Submit</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/TemplatesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const TemplatesView = () => {
<div className="card">
<div className="card-header">
<h2 className="card-header-title">
Templates list ({mediaList ? mediaList.total : '0'})
Templates list ({mediaList ? mediaList.length : '0'})
</h2>
<a className="button is-info is-rounded" href="templates/new" title="Begin Process Wizard">
New&nbsp;&nbsp;
Expand Down Expand Up @@ -60,7 +60,7 @@ const TemplatesView = () => {
</tr>
</tfoot>
<tbody>
<TableRow prefix="/templates" action="/use" actionLabel="Use" attrs={attrs} data={mediaList.elements} />
<TableRow prefix="/templates" action="/use" actionLabel="Use" attrs={attrs} data={mediaList} />
</tbody>
</table>
</div>
Expand Down
4 changes: 2 additions & 2 deletions test/src/mocks/ElementResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"type": "string",
"faker": "system.fileName"
},
"uuid": {
"id": {
"type": "string",
"faker": "random.uuid"
},
Expand All @@ -37,7 +37,7 @@
"required": [
"elementType",
"elementName",
"uuid",
"id",
"creationDate",
"updatedDate",
"status"
Expand Down
4 changes: 2 additions & 2 deletions test/src/mocks/OutputResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"type": "string",
"faker": "date.past"
},
"uuid": {
"id": {
"type": "string",
"faker": "random.uuid"
}
Expand All @@ -46,6 +46,6 @@
"status",
"templateId",
"updatedDate",
"uuid"
"id"
]
}
4 changes: 2 additions & 2 deletions test/src/mocks/TemplateResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
3840
]
},
"uuid": {
"id": {
"type": "string",
"faker": "random.uuid"
}
Expand All @@ -37,6 +37,6 @@
"height",
"views",
"name",
"uuid"
"id"
]
}