From 36ef5b2232557d0b540068986b6bd670b49aa5ec Mon Sep 17 00:00:00 2001 From: Anne Haley Date: Thu, 29 Sep 2022 14:50:10 -0400 Subject: [PATCH] Update review mode (#604) * Fix review mode toggle not accepting initial value * Update review mode (always show all scans) * Change pyppeteer test --- .../tests/pyppeteer/test_save_decisions.py | 17 +--- web_client/src/components/ExperimentsView.vue | 41 ++++----- web_client/src/store/index.ts | 84 +++++++++---------- 3 files changed, 56 insertions(+), 86 deletions(-) diff --git a/miqa/core/tests/pyppeteer/test_save_decisions.py b/miqa/core/tests/pyppeteer/test_save_decisions.py index b1cffa3b..0641e107 100644 --- a/miqa/core/tests/pyppeteer/test_save_decisions.py +++ b/miqa/core/tests/pyppeteer/test_save_decisions.py @@ -69,16 +69,9 @@ async def test_save_decisions_tier_1( ).click() await page.waitFor(1_000) - # Go back up a scan and confirm the previous decision marked all artifacts as present - await (await page.waitForXPath('//i[contains(@class, "fa-caret-up")]')).click() - saved_artifacts = await page.xpath( - '//div[contains(., "No comment")]/following-sibling::div/' - 'span/span[contains(@class,"v-chip__content")]' - ) - assert len(saved_artifacts) == len(artifact_chips) - # Submit another decision on the third scan # This time marking all artifacts as absent and the scan as Usable + await page.goBack() artifact_chips = await page.xpath('//span[contains(@class,"v-chip__content")]') for chip in artifact_chips: # clicking twice marks the artifact as absent @@ -92,14 +85,6 @@ async def test_save_decisions_tier_1( ).click() await page.waitFor(1_000) - # Go back up a scan and confirm the previous decision marked all artifacts as absent - await (await page.waitForXPath('//i[contains(@class, "fa-caret-up")]')).click() - saved_artifacts = await page.xpath( - '//div[contains(., "I disagree")]/following-sibling::div/' - 'span/span[contains(@class,"v-chip__content")]' - ) - assert len(saved_artifacts) == 0 - # Go back to the project page await (await page.waitForXPath('//a[contains(., "Projects")]')).click() await ( diff --git a/web_client/src/components/ExperimentsView.vue b/web_client/src/components/ExperimentsView.vue index efac9f8c..c740c46e 100644 --- a/web_client/src/components/ExperimentsView.vue +++ b/web_client/src/components/ExperimentsView.vue @@ -5,6 +5,7 @@ import { } from 'vuex'; import UserAvatar from '@/components/UserAvatar.vue'; import djangoRest from '@/django'; +import { includeScan } from '@/store'; import { API_URL, decisionOptions } from '../constants'; export default { @@ -72,6 +73,7 @@ export default { ...mapActions([ 'loadProject', ]), + includeScan, scansForExperiment(expId) { const expScanIds = this.experimentScans[expId]; return expScanIds.filter( @@ -179,41 +181,30 @@ export default {