From 55bf9f314ff2ff082d50da11010f35232e7aa590 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Tue, 19 May 2020 14:21:34 +0300 Subject: [PATCH] test fixes --- .../src/components/atoms/Account.module.scss | 2 +- .../atoms/CategoryImage.module.scss | 4 +- .../components/atoms/Form/Input.module.scss | 12 ++-- .../AccountStatus/Indicator.module.scss | 4 +- .../AccountStatus/Popover.module.scss | 10 +-- client/src/components/molecules/JobTeaser.tsx | 6 +- .../organisms/WalletSelector.module.scss | 2 +- .../components/templates/Asset/AssetJob.tsx | 2 +- client/src/utils/getUserJobs.ts | 70 +++++++++---------- 9 files changed, 56 insertions(+), 56 deletions(-) diff --git a/client/src/components/atoms/Account.module.scss b/client/src/components/atoms/Account.module.scss index b0b6898..22e5eac 100644 --- a/client/src/components/atoms/Account.module.scss +++ b/client/src/components/atoms/Account.module.scss @@ -47,7 +47,7 @@ display: inline-block; fill: currentColor; margin-right: $spacer / 8; - transition: 0.2s ease-out; + transition: .2s ease-out; } } diff --git a/client/src/components/atoms/CategoryImage.module.scss b/client/src/components/atoms/CategoryImage.module.scss index a19c59d..d28f8f6 100644 --- a/client/src/components/atoms/CategoryImage.module.scss +++ b/client/src/components/atoms/CategoryImage.module.scss @@ -15,7 +15,7 @@ .header { // stylelint-disable value-keyword-case - composes: categoryImage; + composes: categoryimage; // stylelint-enable value-keyword-case height: 8rem; margin-top: $spacer / $line-height; @@ -23,7 +23,7 @@ .dimmed { // stylelint-disable value-keyword-case - composes: categoryImage; + composes: categoryimage; // stylelint-enable value-keyword-case opacity: .6; } diff --git a/client/src/components/atoms/Form/Input.module.scss b/client/src/components/atoms/Form/Input.module.scss index 7cc3fad..e5adb6e 100644 --- a/client/src/components/atoms/Form/Input.module.scss +++ b/client/src/components/atoms/Form/Input.module.scss @@ -33,8 +33,8 @@ width: 1.25rem; height: 1.25rem; top: 50%; - margin-top: -0.6rem; - fill: rgba($brand-grey-light, 0.7); + margin-top: -.6rem; + fill: rgba($brand-grey-light, .7); } } @@ -50,7 +50,7 @@ padding: $spacer / 3; margin: 0; border-radius: $border-radius; - transition: 0.2s ease-out; + transition: .2s ease-out; min-height: 43px; appearance: none; @@ -65,8 +65,8 @@ font-size: $font-size-base; color: $brand-grey-light; font-weight: $font-weight-base; - transition: 0.2s ease-out; - opacity: 0.7; + transition: .2s ease-out; + opacity: .7; } &[readonly], @@ -155,7 +155,7 @@ font-size: $font-size-small; line-height: 1.2; border: 2px solid $brand-grey-lighter; - border-radius: 0.2rem; + border-radius: .2rem; position: absolute; left: 0; right: 0; diff --git a/client/src/components/molecules/AccountStatus/Indicator.module.scss b/client/src/components/molecules/AccountStatus/Indicator.module.scss index 55ee748..b8c8cbc 100644 --- a/client/src/components/molecules/AccountStatus/Indicator.module.scss +++ b/client/src/components/molecules/AccountStatus/Indicator.module.scss @@ -18,7 +18,7 @@ /* yellow triangle */ .statusIndicatorCloseEnough { // stylelint-disable value-keyword-case - composes: statusIndicator; + composes: statusindicator; // stylelint-enable value-keyword-case background: none; width: 0; @@ -31,7 +31,7 @@ /* green circle */ .statusIndicatorActive { // stylelint-disable value-keyword-case - composes: statusIndicator; + composes: statusindicator; // stylelint-enable value-keyword-case border-radius: 50%; background: $green; diff --git a/client/src/components/molecules/AccountStatus/Popover.module.scss b/client/src/components/molecules/AccountStatus/Popover.module.scss index a4faa66..273b3b3 100644 --- a/client/src/components/molecules/AccountStatus/Popover.module.scss +++ b/client/src/components/molecules/AccountStatus/Popover.module.scss @@ -7,12 +7,12 @@ $popoverWidth: 18rem; width: $popoverWidth; padding: $spacer / 2; background: $brand-black; - border-radius: 0.1rem; - border: 0.1rem solid $brand-grey-light; - box-shadow: 0 6px 16px 0 rgba($brand-black, 0.3); + border-radius: .1rem; + border: .1rem solid $brand-grey-light; + box-shadow: 0 6px 16px 0 rgba($brand-black, .3); color: $brand-grey-light; font-size: $font-size-small; - animation: showPopup 0.2s ease-in forwards; + animation: showPopup .2s ease-in forwards; white-space: initial; text-align: left; } @@ -28,7 +28,7 @@ $popoverWidth: 18rem; } .popoverInfoline { - border-bottom: 0.05rem solid $brand-grey; + border-bottom: .05rem solid $brand-grey; padding: $spacer / 3 0; &:first-child { diff --git a/client/src/components/molecules/JobTeaser.tsx b/client/src/components/molecules/JobTeaser.tsx index b5c354a..888e2fc 100644 --- a/client/src/components/molecules/JobTeaser.tsx +++ b/client/src/components/molecules/JobTeaser.tsx @@ -3,6 +3,7 @@ import { User } from '../../context' import moment from 'moment' import styles from './JobTeaser.module.scss' import Dotdotdot from 'react-dotdotdot' +import shortid from 'shortid' export default function JobTeaser({ job }: { job: any }) { const { ocean } = useContext(User) @@ -54,7 +55,10 @@ export default function JobTeaser({ job }: { job: any }) { <>
Output URL
{job.resultsUrl.map((result: string) => ( - {result.substring(0, 52)}... + + {' '} + {result.substring(0, 52)}... + ))} ) : ( diff --git a/client/src/components/organisms/WalletSelector.module.scss b/client/src/components/organisms/WalletSelector.module.scss index aabc9ea..2989d26 100644 --- a/client/src/components/organisms/WalletSelector.module.scss +++ b/client/src/components/organisms/WalletSelector.module.scss @@ -24,7 +24,7 @@ align-items: flex-start; text-align: left; cursor: pointer; - transition: border 0.2s ease-out; + transition: border .2s ease-out; margin-bottom: $spacer; position: relative; diff --git a/client/src/components/templates/Asset/AssetJob.tsx b/client/src/components/templates/Asset/AssetJob.tsx index d54bfb7..247d556 100644 --- a/client/src/components/templates/Asset/AssetJob.tsx +++ b/client/src/components/templates/Asset/AssetJob.tsx @@ -153,7 +153,7 @@ export default function AssetsJobs({ ddo, ocean }: JobsProps) { {isPublished ? (

Your job started!

-
diff --git a/client/src/utils/getUserJobs.ts b/client/src/utils/getUserJobs.ts index 01545c3..be52daf 100644 --- a/client/src/utils/getUserJobs.ts +++ b/client/src/utils/getUserJobs.ts @@ -1,47 +1,43 @@ -const tempList = - [{ - "agreementId": "a40d4fbddf7c45fb988b3f47e7fb8d50386ee8c968c94a0db6909cd96582e6cd", - "algorithmLogUrl": null, - "dateCreated": 1585581794.73346, - "dateFinished": null, - "jobId": "5e67cdffc2224907b10cdb802820033ee", - "owner": "0x4D156A2ef69ffdDC55838176C6712C90f60a2285", - "removed": 0, - "resultsDid": "", - "resultsUrl": "", - "status": 10, - "statusText": "Job started", - "stopreq": 0 +const tempList = [ + { + agreementId: + 'a40d4fbddf7c45fb988b3f47e7fb8d50386ee8c968c94a0db6909cd96582e6cd', + algorithmLogUrl: null, + dateCreated: 1585581794.73346, + dateFinished: null, + jobId: '5e67cdffc2224907b10cdb802820033ee', + owner: '0x4D156A2ef69ffdDC55838176C6712C90f60a2285', + removed: 0, + resultsDid: '', + resultsUrl: '', + status: 10, + statusText: 'Job started', + stopreq: 0 }, { - "agreementId": "a40d4fbddf7c45fb988b3f47e7fb8d50386ee8c968c94a0db6909cd96582e6cd", - "algorithmLogUrl": null, - "dateCreated": 1585581794.73346, - "dateFinished": null, - "jobId": "5e67cdffc2224907b10cdb80820033ee", - "owner": "0x4D156A2ef69ffdDC55838176C6712C90f60a2285", - "removed": 0, - "resultsDid": "", - "resultsUrl": "", - "status": 10, - "statusText": "Job started", - "stopreq": 0 + agreementId: + 'a40d4fbddf7c45fb988b3f47e7fb8d50386ee8c968c94a0db6909cd96582e6cd', + algorithmLogUrl: null, + dateCreated: 1585581794.73346, + dateFinished: null, + jobId: '5e67cdffc2224907b10cdb80820033ee', + owner: '0x4D156A2ef69ffdDC55838176C6712C90f60a2285', + removed: 0, + resultsDid: '', + resultsUrl: '', + status: 10, + statusText: 'Job started', + stopreq: 0 } - ] - - - +] export async function getUserJobs(ocean: any, account: string) { try { const accounts = await ocean.accounts.list() - //const jobList = await ocean.compute.status(account) - // const jobList = await ocean.compute.status(accounts[0]) - - return tempList; - + // const jobList = await ocean.compute.status(account) + // const jobList = await ocean.compute.status(accounts[0]) + return tempList } catch (error) { console.error(error.message) } - -} \ No newline at end of file +}