diff --git a/package-lock.json b/package-lock.json index 4a51d97..13406cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3339,9 +3339,9 @@ } }, "@testing-library/user-event": { - "version": "12.6.3", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-12.6.3.tgz", - "integrity": "sha512-PCmbUKofE4SXA7l8jphZAbvv5H3c4ix34xPZ/GNe99fASX//msJRgiMbHIBP+GwRfgVG9c7zmkODSPu2X2vNRw==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-13.0.1.tgz", + "integrity": "sha512-7n3Y5Vohib6yVFW60JlCvQOqBDIlE1SRyo78nmoHwePAg3SVhnfyOI30RYNj3yFF7qy7e0uVlewzTyvNxyJjEA==", "requires": { "@babel/runtime": "^7.12.5" } diff --git a/package.json b/package.json index ab4412a..54b1947 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/TableRow.js b/src/components/TableRow.js index fb32cee..dd08f53 100644 --- a/src/components/TableRow.js +++ b/src/components/TableRow.js @@ -38,12 +38,12 @@ const TableRow = (props) => { } if (props.data) { return props.data.map((item) => ( - - {item.uuid} + + {item.id} {item.name} - + )); } else { diff --git a/src/pages/Dashboard.js b/src/pages/Dashboard.js index bfdc739..a845c5e 100644 --- a/src/pages/Dashboard.js +++ b/src/pages/Dashboard.js @@ -61,7 +61,7 @@ const Dashboard = () => {

- Outputs list ({mediaList ? mediaList.total : '0'}) + Outputs list ({mediaList ? mediaList.length : '0'})

diff --git a/src/pages/FileView.js b/src/pages/FileView.js index 1882a4e..94344b1 100644 --- a/src/pages/FileView.js +++ b/src/pages/FileView.js @@ -33,7 +33,7 @@ const FileView = (props) => {

- : {media ? media.uuid : Loading} + : {media ? media.id : Loading}

diff --git a/src/pages/TemplateWizard.js b/src/pages/TemplateWizard.js index 44698c4..c898480 100644 --- a/src/pages/TemplateWizard.js +++ b/src/pages/TemplateWizard.js @@ -5,9 +5,8 @@ import {Link} from 'react-router-dom'; const InputList = ({inputs}) => { if (!inputs) return (); - return inputs.map((input, index) => ( - + )); }; @@ -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) { @@ -134,7 +133,7 @@ const TemplateWizard = (props) => {
Choose videos for each view: - +
diff --git a/src/pages/TemplatesView.js b/src/pages/TemplatesView.js index 917d55c..5687089 100644 --- a/src/pages/TemplatesView.js +++ b/src/pages/TemplatesView.js @@ -32,7 +32,7 @@ const TemplatesView = () => {

- Templates list ({mediaList ? mediaList.total : '0'}) + Templates list ({mediaList ? mediaList.length : '0'})

New   @@ -60,7 +60,7 @@ const TemplatesView = () => { - +
diff --git a/test/src/mocks/ElementResponse.json b/test/src/mocks/ElementResponse.json index 2483c4e..3e587ee 100644 --- a/test/src/mocks/ElementResponse.json +++ b/test/src/mocks/ElementResponse.json @@ -13,7 +13,7 @@ "type": "string", "faker": "system.fileName" }, - "uuid": { + "id": { "type": "string", "faker": "random.uuid" }, @@ -37,7 +37,7 @@ "required": [ "elementType", "elementName", - "uuid", + "id", "creationDate", "updatedDate", "status" diff --git a/test/src/mocks/OutputResponse.json b/test/src/mocks/OutputResponse.json index 8f4d2ce..7e78283 100644 --- a/test/src/mocks/OutputResponse.json +++ b/test/src/mocks/OutputResponse.json @@ -35,7 +35,7 @@ "type": "string", "faker": "date.past" }, - "uuid": { + "id": { "type": "string", "faker": "random.uuid" } @@ -46,6 +46,6 @@ "status", "templateId", "updatedDate", - "uuid" + "id" ] } \ No newline at end of file diff --git a/test/src/mocks/TemplateResponse.json b/test/src/mocks/TemplateResponse.json index 364a85a..260324b 100644 --- a/test/src/mocks/TemplateResponse.json +++ b/test/src/mocks/TemplateResponse.json @@ -28,7 +28,7 @@ 3840 ] }, - "uuid": { + "id": { "type": "string", "faker": "random.uuid" } @@ -37,6 +37,6 @@ "height", "views", "name", - "uuid" + "id" ] } \ No newline at end of file