From 3e3ed90dedd978ec38b8ca0acd2067372df1db73 Mon Sep 17 00:00:00 2001 From: Shiv <44001656+SHIV5T3R@users.noreply.github.com> Date: Thu, 15 Aug 2024 12:08:25 +0100 Subject: [PATCH 1/5] Removed feature flags for PacBio pool pages --- src/components/pacbio/PacbioPoolEdit.vue | 52 ++++++++------------- src/components/pacbio/PacbioRunWellEdit.vue | 11 +---- 2 files changed, 20 insertions(+), 43 deletions(-) diff --git a/src/components/pacbio/PacbioPoolEdit.vue b/src/components/pacbio/PacbioPoolEdit.vue index 778c6dd6d..cb82c3c2b 100644 --- a/src/components/pacbio/PacbioPoolEdit.vue +++ b/src/components/pacbio/PacbioPoolEdit.vue @@ -51,40 +51,26 @@ /> - - -
-
- Volume - - {{ pool.used_volume }} - -
- +
+ Volume + - - -
-
+ {{ pool.used_volume }} + + + + + +
Concentration { // Computed property to show the available volume badge unless the aliquot is a pool and the feature flag is disabled const showAvailableVolume = (aliquot) => { - return ( - aliquot.source_type == 'Pacbio::Library' || - (aliquot.source_type == 'Pacbio::Pool' && pool_volume_validation_flag.value) - ) + return aliquot.source_type == 'Pacbio::Library' || aliquot.source_type == 'Pacbio::Pool' } // Define a computed property to determine the action for the modal which is either create or update @@ -298,9 +292,6 @@ const updateUsedAliquotSource = async (row, barcode) => { * This function is called when the modal is shown for a specific position and plate number. */ const setupWell = async () => { - pool_volume_validation_flag.value = await checkFeatureFlag( - 'y24_155_pacbio_run_pool_volume_validation', - ) // We clone the well as it gets binded to the form and we don't want to change the original object // without a confirmation action like the 'update' button Object.assign(well, await store.getOrCreateWell(position.value, plateNumber.value)) From 072094c7d2b92473a3835c5638a5de75e0ae58e1 Mon Sep 17 00:00:00 2001 From: Shiv <44001656+SHIV5T3R@users.noreply.github.com> Date: Thu, 15 Aug 2024 12:08:34 +0100 Subject: [PATCH 2/5] Removed feature flags for tests --- tests/e2e/specs/pacbio/pacbio_run_create.cy.js | 4 ---- tests/e2e/specs/pacbio/pacbio_run_edit.cy.js | 3 --- tests/unit/components/pacbio/PacbioPoolEdit.spec.js | 4 +--- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/e2e/specs/pacbio/pacbio_run_create.cy.js b/tests/e2e/specs/pacbio/pacbio_run_create.cy.js index ad16a7cc1..ee668a116 100644 --- a/tests/e2e/specs/pacbio/pacbio_run_create.cy.js +++ b/tests/e2e/specs/pacbio/pacbio_run_create.cy.js @@ -34,10 +34,6 @@ describe('Pacbio Run Create view', () => { data: {}, }, }) - - cy.withFlags({ - y24_155_pacbio_run_pool_volume_validation: { enabled: true }, - }) }) it('Creates a Sequel IIe run successfully - v11', () => { diff --git a/tests/e2e/specs/pacbio/pacbio_run_edit.cy.js b/tests/e2e/specs/pacbio/pacbio_run_edit.cy.js index b17c6a597..cd1a7e4ce 100644 --- a/tests/e2e/specs/pacbio/pacbio_run_edit.cy.js +++ b/tests/e2e/specs/pacbio/pacbio_run_edit.cy.js @@ -9,9 +9,6 @@ describe('Pacbio Run Edit view', () => { statusCode: 200, body: PacbioSmrtLinkVersionFactory().content, }) - cy.withFlags({ - y24_155_pacbio_run_pool_volume_validation: { enabled: true }, - }) }) it('Updates a Revio run successfully', () => { diff --git a/tests/unit/components/pacbio/PacbioPoolEdit.spec.js b/tests/unit/components/pacbio/PacbioPoolEdit.spec.js index a10a2a735..a5240c4ea 100644 --- a/tests/unit/components/pacbio/PacbioPoolEdit.spec.js +++ b/tests/unit/components/pacbio/PacbioPoolEdit.spec.js @@ -51,9 +51,7 @@ function mountWithStore({ state = {}, stubActions = false, plugins = [], props } vi.mock('swrv', () => ({ default: vi.fn(() => ({ data: { - features: { - y24_154_enable_used_volume_display_pool_edit: { enabled: true }, - }, + features: {}, }, })), })) From bfba280164a88349631e28457b1d25615c6fa184 Mon Sep 17 00:00:00 2001 From: Shiv <44001656+SHIV5T3R@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:45:43 +0100 Subject: [PATCH 3/5] Remove showAvailableVolume function --- src/components/pacbio/PacbioRunWellEdit.vue | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/components/pacbio/PacbioRunWellEdit.vue b/src/components/pacbio/PacbioRunWellEdit.vue index 6dd7aea6f..8f47fed87 100644 --- a/src/components/pacbio/PacbioRunWellEdit.vue +++ b/src/components/pacbio/PacbioRunWellEdit.vue @@ -45,7 +45,6 @@ @update:model-value="updateUsedAliquotVolume(row, $event)" >
@@ -149,9 +148,6 @@ const validLocalUsedAliquots = computed(() => { }) // Computed property to show the available volume badge unless the aliquot is a pool and the feature flag is disabled -const showAvailableVolume = (aliquot) => { - return aliquot.source_type == 'Pacbio::Library' || aliquot.source_type == 'Pacbio::Pool' -} // Define a computed property to determine the action for the modal which is either create or update const action = computed(() => { @@ -323,9 +319,6 @@ const setupWell = async () => { const errorsFor = (aliquot, attribute) => { if (aliquot && attribute) { // If we aren't showing available volume we also don't need to validate the volume - if (!showAvailableVolume(aliquot)) { - return - } aliquot.validateField(attribute, aliquot[attribute]) return aliquot.errors?.[attribute] } From 069e1e4bf9153c8ae30cd2ad8a120ee7d8df3623 Mon Sep 17 00:00:00 2001 From: Shiv <44001656+SHIV5T3R@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:50:15 +0100 Subject: [PATCH 4/5] Removed showAvailableVolume function in tests --- tests/unit/components/pacbio/PacbioRunWellEdit.spec.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/unit/components/pacbio/PacbioRunWellEdit.spec.js b/tests/unit/components/pacbio/PacbioRunWellEdit.spec.js index 45d2ffa35..93022ac8e 100644 --- a/tests/unit/components/pacbio/PacbioRunWellEdit.spec.js +++ b/tests/unit/components/pacbio/PacbioRunWellEdit.spec.js @@ -570,15 +570,7 @@ describe('PacbioRunWellEdit', () => { expect(wrapper.find('[data-action=remove-row]').exists()).toBeTruthy() }) - it('does not have an available volume badge if it is a pool aliquot and showAvailableVolume returns false', async () => { - wrapper.vm.showAvailableVolume = vi.fn().mockReturnValue(false) - // Refresh the component - await wrapper.vm.showModalForPositionAndPlate('A1', 1) - - expect(wrapper.find('[data-attribute=available-volume-div]').exists()).toBeFalsy() - }) - - it('has an available volume badge if it is a pool and showAvailableVolume returns true', async () => { + it('has an available volume badge if it is a pool', async () => { wrapper.vm.localUsedAliquots[0].available_volume = 5 await nextTick() expect(wrapper.find('[data-attribute=available-volume-div]').exists()).toBeTruthy() From 257ff783bfa01d7b22b49a75a4091a613f1405f0 Mon Sep 17 00:00:00 2001 From: Shiv <44001656+SHIV5T3R@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:51:09 +0100 Subject: [PATCH 5/5] Prettier --- src/components/pacbio/PacbioRunWellEdit.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/pacbio/PacbioRunWellEdit.vue b/src/components/pacbio/PacbioRunWellEdit.vue index 8f47fed87..0c10102f7 100644 --- a/src/components/pacbio/PacbioRunWellEdit.vue +++ b/src/components/pacbio/PacbioRunWellEdit.vue @@ -44,10 +44,7 @@ placeholder="Pool/Library volume" @update:model-value="updateUsedAliquotVolume(row, $event)" > -
+