From af57de4f0690bcd9bc9190c341db15fdd8921f44 Mon Sep 17 00:00:00 2001 From: Stuart McHattie Date: Wed, 27 Nov 2024 14:28:28 +0000 Subject: [PATCH 1/4] Switch to v2 for creating TagLayouts from templates --- app/models/labware_creators/tagged_plate.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/models/labware_creators/tagged_plate.rb b/app/models/labware_creators/tagged_plate.rb index 40aabd46f..27050835e 100644 --- a/app/models/labware_creators/tagged_plate.rb +++ b/app/models/labware_creators/tagged_plate.rb @@ -93,14 +93,12 @@ def convert_tag_plate_to_new_purpose def create_labware! create_plate! do |plate_uuid| - # TODO: {Y24-190} Work out a way to call the `create!` method on TagLayoutTemplate model in Sequencescape - # using the V2 API. I think either we need to misuse the PATCH method with some kind of - # attributes telling Sequencescape to run the `create!` method, or we need to create a new - # endpoint associated with a TagLayoutTemplate that will run the `create!` method. - api - .tag_layout_template - .find(tag_plate.template_uuid) - .create!(plate: plate_uuid, user: user_uuid, enforce_uniqueness: requires_tag2?) + Sequencescape::Api::V2::TagLayout.create!( + enforce_uniqueness: requires_tag2?, + plate_uuid: plate_uuid, + tag_layout_template_uuid: tag_plate.template_uuid, + user_uuid: user_uuid + ) end end end From d626290b59f5e529b577e082851a9c505774f0e7 Mon Sep 17 00:00:00 2001 From: Stuart McHattie Date: Wed, 27 Nov 2024 14:33:55 +0000 Subject: [PATCH 2/4] Update v2 resources in Javascript --- app/frontend/javascript/shared/resources.js | 160 +++++++++++++++++--- 1 file changed, 138 insertions(+), 22 deletions(-) diff --git a/app/frontend/javascript/shared/resources.js b/app/frontend/javascript/shared/resources.js index fcb524572..466988caf 100644 --- a/app/frontend/javascript/shared/resources.js +++ b/app/frontend/javascript/shared/resources.js @@ -1,6 +1,6 @@ /* - * Auto-generated by Sequencescape on 2024-10-18 14:57:17 +0100" - * Using Y24-190-support-limber-with-bulk-transfers-on-v2-api@e78b99f + * Auto-generated by Sequencescape on 2024-11-27 14:32:34 +0000" + * Using Y24-190-v2-create-from-tag-layout-templates@ab257bc * bundle exec rake devour:create_config" * */ @@ -201,6 +201,10 @@ const resources = [ "jsonApi": "hasMany", "type": "comment" }, + "qc_files": { + "jsonApi": "hasMany", + "type": "qc_file" + }, "receptacles": { "jsonApi": "hasMany" }, @@ -318,6 +322,61 @@ const resources = [ "options": { } }, + { + "resource": "plate_conversion", + "attributes": { + "parent_uuid": "", + "purpose_uuid": "", + "target_uuid": "", + "user_uuid": "", + "uuid": "", + "parent": { + "jsonApi": "hasOne", + "type": "plate" + }, + "purpose": { + "jsonApi": "hasOne", + "type": "plate_purpose" + }, + "target": { + "jsonApi": "hasOne", + "type": "plate" + }, + "user": { + "jsonApi": "hasOne", + "type": "user" + } + }, + "options": { + } + }, + { + "resource": "plate_creation", + "attributes": { + "child_purpose_uuid": "", + "parent_uuid": "", + "user_uuid": "", + "uuid": "", + "child": { + "jsonApi": "hasOne", + "type": "plate" + }, + "child_purpose": { + "jsonApi": "hasOne", + "type": "plate_purpose" + }, + "parent": { + "jsonApi": "hasOne", + "type": "plate" + }, + "user": { + "jsonApi": "hasOne", + "type": "user" + } + }, + "options": { + } + }, { "resource": "plate_purpose", "attributes": { @@ -352,6 +411,7 @@ const resources = [ "number_of_rows": "", "number_of_columns": "", "size": "", + "pooling_metadata": "", "purpose": { "jsonApi": "hasOne", "type": "purpose" @@ -376,6 +436,10 @@ const resources = [ "jsonApi": "hasMany", "type": "comment" }, + "qc_files": { + "jsonApi": "hasMany", + "type": "qc_file" + }, "receptacles": { "jsonApi": "hasMany" }, @@ -407,6 +471,14 @@ const resources = [ "jsonApi": "hasMany", "type": "state_change" }, + "submission_pools": { + "jsonApi": "hasMany", + "type": "submission_pool" + }, + "transfers_as_destination": { + "jsonApi": "hasMany", + "type": "transfer" + }, "wells": { "jsonApi": "hasMany", "type": "well" @@ -502,6 +574,23 @@ const resources = [ "options": { } }, + { + "resource": "qc_file", + "attributes": { + "content_type": "", + "contents": "", + "created_at": "", + "filename": "", + "size": "", + "uuid": "", + "labware": { + "jsonApi": "hasOne", + "type": "labware" + } + }, + "options": { + } + }, { "resource": "qc_result", "attributes": { @@ -815,6 +904,18 @@ const resources = [ "options": { } }, + { + "resource": "submission_pool", + "attributes": { + "plates_in_submission": "", + "tag_layout_templates": { + "jsonApi": "hasMany", + "type": "tag_layout_template" + } + }, + "options": { + } + }, { "resource": "submission_template", "attributes": { @@ -887,11 +988,13 @@ const resources = [ "resource": "tag_layout", "attributes": { "direction": "", + "enforce_uniqueness": "", "initial_tag": "", "plate_uuid": "", "substitutions": "", "tag_group_uuid": "", "tag2_group_uuid": "", + "tag_layout_template_uuid": "", "tags_per_well": "", "user_uuid": "", "uuid": "", @@ -919,8 +1022,8 @@ const resources = [ { "resource": "tag", "attributes": { - "oligo": "", "map_id": "", + "oligo": "", "tag_group": { "jsonApi": "hasOne", "type": "tag_group" @@ -964,10 +1067,6 @@ const resources = [ "uuid": "", "state": "", "volume": "", - "target_asset": { - "jsonApi": "hasOne", - "type": "receptacle" - }, "source_asset": { "jsonApi": "hasOne", "type": "receptacle" @@ -975,6 +1074,10 @@ const resources = [ "submission": { "jsonApi": "hasOne", "type": "submission" + }, + "target_asset": { + "jsonApi": "hasOne", + "type": "receptacle" } }, "options": { @@ -999,6 +1102,14 @@ const resources = [ "transfer_type": "", "user_uuid": "", "uuid": "", + "destination": { + "jsonApi": "hasOne", + "type": "labware" + }, + "source": { + "jsonApi": "hasOne", + "type": "labware" + }, "user": { "jsonApi": "hasOne", "type": "user" @@ -1056,19 +1167,15 @@ const resources = [ { "resource": "tube_rack", "attributes": { - "uuid": "", "created_at": "", - "updated_at": "", "labware_barcode": "", - "size": "", - "number_of_rows": "", - "number_of_columns": "", "name": "", + "number_of_columns": "", + "number_of_rows": "", + "size": "", "tube_locations": "", - "racked_tubes": { - "jsonApi": "hasMany", - "type": "racked_tube" - }, + "updated_at": "", + "uuid": "", "comments": { "jsonApi": "hasMany", "type": "comment" @@ -1076,6 +1183,10 @@ const resources = [ "purpose": { "jsonApi": "hasOne", "type": "purpose" + }, + "racked_tubes": { + "jsonApi": "hasMany", + "type": "racked_tube" } }, "options": { @@ -1090,6 +1201,7 @@ const resources = [ "state": "", "created_at": "", "updated_at": "", + "sibling_tubes": "", "purpose": { "jsonApi": "hasOne", "type": "purpose" @@ -1114,6 +1226,10 @@ const resources = [ "jsonApi": "hasMany", "type": "comment" }, + "qc_files": { + "jsonApi": "hasMany", + "type": "qc_file" + }, "receptacles": { "jsonApi": "hasMany" }, @@ -1149,13 +1265,13 @@ const resources = [ "jsonApi": "hasMany", "type": "aliquot" }, - "transfer_requests_as_target": { - "jsonApi": "hasMany", - "type": "transfer_request" - }, "receptacle": { "jsonApi": "hasOne", "type": "receptacle" + }, + "transfer_requests_as_target": { + "jsonApi": "hasMany", + "type": "transfer_request" } }, "options": { @@ -1271,11 +1387,11 @@ const resources = [ { "resource": "work_order", "attributes": { + "at_risk": "", + "options": "", "order_type": "", "quantity": "", "state": "", - "options": "", - "at_risk": "", "study": { "jsonApi": "hasOne", "type": "study" From 5adfe3ba4f0456082e29b9c11c5555003fabe6d5 Mon Sep 17 00:00:00 2001 From: Stuart McHattie Date: Wed, 27 Nov 2024 15:45:24 +0000 Subject: [PATCH 3/4] Update tests to expect tag layout creations via API v2 --- spec/features/creating_a_plate_spec.rb | 1 - spec/features/creating_a_tag_plate_spec.rb | 46 +++++++++++-------- .../custom_tagged_plate_spec.rb | 1 - .../labware_creators/merged_plate_spec.rb | 1 - .../labware_creators/multi_plate_pool_spec.rb | 1 - ...ial_stamped_plate_without_dilution_spec.rb | 1 - .../plate_with_template_spec.rb | 1 - .../quadrant_split_plate_spec.rb | 1 - .../quadrant_stamp_primer_panel_spec.rb | 1 - ...d_plate_adding_randomised_controls_spec.rb | 1 - .../stamped_plate_compressed_spec.rb | 1 - .../labware_creators/stamped_plate_spec.rb | 1 - .../labware_creators/tagged_plate_spec.rb | 23 ++++++---- ...well_filtered_tagged_plate_creator_spec.rb | 37 +++++++-------- spec/support/api_url_helper.rb | 4 ++ spec/support/shared_tagging_examples.rb | 23 ---------- 16 files changed, 64 insertions(+), 80 deletions(-) delete mode 100644 spec/support/shared_tagging_examples.rb diff --git a/spec/features/creating_a_plate_spec.rb b/spec/features/creating_a_plate_spec.rb index 138d14c90..7baef83f3 100644 --- a/spec/features/creating_a_plate_spec.rb +++ b/spec/features/creating_a_plate_spec.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require 'rails_helper' -require_relative '../support/shared_tagging_examples' RSpec.feature 'Creating a plate', js: true, tag_plate: true do has_a_working_api diff --git a/spec/features/creating_a_tag_plate_spec.rb b/spec/features/creating_a_tag_plate_spec.rb index 544cf9ac6..fc2889b37 100644 --- a/spec/features/creating_a_tag_plate_spec.rb +++ b/spec/features/creating_a_tag_plate_spec.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require 'rails_helper' -require_relative '../support/shared_tagging_examples' RSpec.feature 'Creating a tag plate', js: true, tag_plate: true do has_a_working_api @@ -26,42 +25,52 @@ let(:tag_plate_qcable_uuid) { 'tag-plate-qcable' } let(:tag_plate_uuid) { 'tag-plate-uuid' } let(:tag_plate_qcable) { json :tag_plate_qcable, uuid: tag_plate_qcable_uuid, lot_uuid: 'lot-uuid' } + let(:tag_template_uuid) { 'tag-layout-template-0' } let(:transfer_template_uuid) { 'custom-pooling' } let(:expected_transfers) { WellHelpers.stamp_hash(96) } - let(:transfers_attributes) do + let(:enforce_uniqueness) { true } + + let(:plate_conversions_attributes) do [ { - arguments: { - user_uuid: user_uuid, - source_uuid: parent_plate.uuid, - destination_uuid: tag_plate_uuid, - transfer_template_uuid: transfer_template_uuid, - transfers: expected_transfers - } + parent_uuid: parent_plate.uuid, + purpose_uuid: child_purpose_uuid, + target_uuid: tag_plate_uuid, + user_uuid: user_uuid } ] end - let(:plate_conversions_attributes) do + let(:tag_layouts_attributes) do [ { - parent_uuid: parent_plate.uuid, - purpose_uuid: child_purpose_uuid, - target_uuid: tag_plate_uuid, + enforce_uniqueness: enforce_uniqueness, + plate_uuid: tag_plate_uuid, + tag_layout_template_uuid: tag_template_uuid, user_uuid: user_uuid } ] end - let(:tag_template_uuid) { 'tag-layout-template-0' } + let(:transfers_attributes) do + [ + { + arguments: { + user_uuid: user_uuid, + source_uuid: parent_plate.uuid, + destination_uuid: tag_plate_uuid, + transfer_template_uuid: transfer_template_uuid, + transfers: expected_transfers + } + } + ] + end let(:help_text) { 'This plate does not appear to be part of a larger pool. Dual indexing is optional.' } let(:tag_lot_number) { 'tag_lot_number' } let(:enforce_same_template_within_pool) { false } - include_context 'a tag plate creator' - # Setup stubs background do # Set-up the plate config @@ -96,6 +105,7 @@ let(:help_text) { "Click 'Create plate'" } before do + expect_tag_layout_creation expect_transfer_creation stub_v2_plate(create(:v2_plate, uuid: tag_plate_uuid, purpose_uuid: 'stock-plate-purpose-uuid')) @@ -177,7 +187,7 @@ let(:template_factory) { :v2_dual_index_tag_layout_template } context 'when nothing has been done' do - #let(:submission_pools) { json(:dual_submission_pool_collection) } + let(:enforce_uniqueness) { false } let(:submission_pools) { create_list(:v2_submission_pool, 1) } let(:help_text) { 'This plate is part of a larger pool and must be indexed with UDI plates.' } it_behaves_like 'it supports the plate' @@ -207,7 +217,7 @@ # set purposes config to enforce_same_template_within_pool let(:enforce_same_template_within_pool) { true } - # this is used in shared_tagging_examples when stubbing the tag_layout_creation_request + # Used for the expectations on tag layout creations above. let(:enforce_uniqueness) { false } # don't use dual_submission_pool_collection - we only want 1 source plate in our submission diff --git a/spec/models/labware_creators/custom_tagged_plate_spec.rb b/spec/models/labware_creators/custom_tagged_plate_spec.rb index efcfcf7a7..84e8f5476 100644 --- a/spec/models/labware_creators/custom_tagged_plate_spec.rb +++ b/spec/models/labware_creators/custom_tagged_plate_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # TaggingForm creates a plate and applies the given tag templates diff --git a/spec/models/labware_creators/merged_plate_spec.rb b/spec/models/labware_creators/merged_plate_spec.rb index 975efa238..d116858a8 100644 --- a/spec/models/labware_creators/merged_plate_spec.rb +++ b/spec/models/labware_creators/merged_plate_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # Uses a custom transfer template to transfer material into the new plate diff --git a/spec/models/labware_creators/multi_plate_pool_spec.rb b/spec/models/labware_creators/multi_plate_pool_spec.rb index 639013a4a..613674b18 100644 --- a/spec/models/labware_creators/multi_plate_pool_spec.rb +++ b/spec/models/labware_creators/multi_plate_pool_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # Presents the user with a form allowing them to scan in up to four plates diff --git a/spec/models/labware_creators/partial_stamped_plate_without_dilution_spec.rb b/spec/models/labware_creators/partial_stamped_plate_without_dilution_spec.rb index 9997545be..9f9385b2c 100644 --- a/spec/models/labware_creators/partial_stamped_plate_without_dilution_spec.rb +++ b/spec/models/labware_creators/partial_stamped_plate_without_dilution_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # Uses a custom transfer template to transfer material into the new plate diff --git a/spec/models/labware_creators/plate_with_template_spec.rb b/spec/models/labware_creators/plate_with_template_spec.rb index 84d7a9b17..170f42e66 100644 --- a/spec/models/labware_creators/plate_with_template_spec.rb +++ b/spec/models/labware_creators/plate_with_template_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # TaggingForm creates a plate and applies the given tag templates diff --git a/spec/models/labware_creators/quadrant_split_plate_spec.rb b/spec/models/labware_creators/quadrant_split_plate_spec.rb index decd5ed32..499a7943a 100644 --- a/spec/models/labware_creators/quadrant_split_plate_spec.rb +++ b/spec/models/labware_creators/quadrant_split_plate_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # Splits one 384 well plate into 4x96 well plates diff --git a/spec/models/labware_creators/quadrant_stamp_primer_panel_spec.rb b/spec/models/labware_creators/quadrant_stamp_primer_panel_spec.rb index 674de4168..e8dc6bea7 100644 --- a/spec/models/labware_creators/quadrant_stamp_primer_panel_spec.rb +++ b/spec/models/labware_creators/quadrant_stamp_primer_panel_spec.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require 'spec_helper' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # Up to four 96 well plates are transferred onto a single 384 well plate. diff --git a/spec/models/labware_creators/stamped_plate_adding_randomised_controls_spec.rb b/spec/models/labware_creators/stamped_plate_adding_randomised_controls_spec.rb index bcc8095a2..30a5167af 100644 --- a/spec/models/labware_creators/stamped_plate_adding_randomised_controls_spec.rb +++ b/spec/models/labware_creators/stamped_plate_adding_randomised_controls_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # Uses a custom transfer template to transfer material into the new plate. diff --git a/spec/models/labware_creators/stamped_plate_compressed_spec.rb b/spec/models/labware_creators/stamped_plate_compressed_spec.rb index fd12e5f7f..8bc601ecd 100644 --- a/spec/models/labware_creators/stamped_plate_compressed_spec.rb +++ b/spec/models/labware_creators/stamped_plate_compressed_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' RSpec.describe LabwareCreators::StampedPlateCompressed do diff --git a/spec/models/labware_creators/stamped_plate_spec.rb b/spec/models/labware_creators/stamped_plate_spec.rb index 7e11ff279..b13a7914c 100644 --- a/spec/models/labware_creators/stamped_plate_spec.rb +++ b/spec/models/labware_creators/stamped_plate_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # Uses a custom transfer template to transfer material into the new plate diff --git a/spec/models/labware_creators/tagged_plate_spec.rb b/spec/models/labware_creators/tagged_plate_spec.rb index 1d55a853b..f9061824b 100644 --- a/spec/models/labware_creators/tagged_plate_spec.rb +++ b/spec/models/labware_creators/tagged_plate_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' require 'labware_creators/base' -require_relative '../../support/shared_tagging_examples' require_relative 'shared_examples' # TaggingForm creates a plate and applies the given tag templates @@ -160,6 +159,17 @@ ] end + let(:tag_layouts_attributes) do + [ + { + enforce_uniqueness: false, + plate_uuid: tag_plate_uuid, + tag_layout_template_uuid: tag_template_uuid, + user_uuid: user_uuid + } + ] + end + let(:transfers_attributes) do [ { @@ -174,10 +184,6 @@ ] end - include_context 'a tag plate creator' do - let(:enforce_uniqueness) { false } - end - context 'With a tag plate' do let(:form_attributes) do { @@ -202,16 +208,17 @@ it 'creates a tag plate' do expect_plate_conversion_creation expect_state_change_creation + expect_tag_layout_creation expect_transfer_creation expect(subject.save).to be true - expect(tag_layout_creation_request).to have_been_made.once end it 'has the correct child (and uuid)' do - expect_plate_conversion_creation - stub_api_v2_post('Transfer') + expect_plate_conversion_creation # We need the return value and this expectation mocks it for us. stub_api_v2_post('StateChange') + stub_api_v2_post('TagLayout') + stub_api_v2_post('Transfer') expect(subject.save).to be true expect(subject.child.uuid).to eq(tag_plate_uuid) diff --git a/spec/models/labware_creators/well_filtered_tagged_plate_creator_spec.rb b/spec/models/labware_creators/well_filtered_tagged_plate_creator_spec.rb index 90f6ba4a1..c0e1d52a2 100644 --- a/spec/models/labware_creators/well_filtered_tagged_plate_creator_spec.rb +++ b/spec/models/labware_creators/well_filtered_tagged_plate_creator_spec.rb @@ -171,32 +171,27 @@ before do # It will receive the child plate, which is an existing tag plate. allow(Sequencescape::Api::V2::Plate).to receive(:find_by).with(uuid: child_uuid).and_return(child) - - # It will create the tag layout. - tag_layout_template = double('TagLayoutTemplate') - allow(api).to receive_message_chain(:tag_layout_template, :find).with(tag_template_uuid).and_return( - tag_layout_template - ) - allow(tag_layout_template).to receive(:create!).with( - plate: tag_plate_uuid, - user: user_uuid, - enforce_uniqueness: false - ) - - # It will change the state of the tag plate to exhausted. - state_change_attributes = { - reason: 'Used in Library creation', - target_state: 'exhausted', - target_uuid: tag_plate_uuid, - user_uuid: user_uuid - } - allow(Sequencescape::Api::V2::StateChange).to receive(:create!).with(**state_change_attributes) end let(:plate_conversions_attributes) do [{ parent_uuid: parent_uuid, purpose_uuid: child_purpose_uuid, target_uuid: child_uuid, user_uuid: user_uuid }] end + let(:state_changes_attributes) do + [{ reason: 'Used in Library creation', target_state: 'exhausted', target_uuid: child_uuid, user_uuid: user_uuid }] + end + + let(:tag_layouts_attributes) do + [ + { + enforce_uniqueness: false, + plate_uuid: child_uuid, + tag_layout_template_uuid: tag_template_uuid, + user_uuid: user_uuid + } + ] + end + let(:transfer_requests_attributes) do [ { source_asset: wells[0].uuid, target_asset: child.wells[0].uuid, outer_request: new_requests[0].uuid }, @@ -209,6 +204,8 @@ it 'creates a tag plate with the right requests' do expect_plate_conversion_creation + expect_state_change_creation + expect_tag_layout_creation expect_transfer_request_collection_creation expect(subject.save).to be true diff --git a/spec/support/api_url_helper.rb b/spec/support/api_url_helper.rb index a9c3f69ba..8ee3fc744 100644 --- a/spec/support/api_url_helper.rb +++ b/spec/support/api_url_helper.rb @@ -149,6 +149,10 @@ def expect_state_change_creation expect_api_v2_posts('StateChange', state_changes_attributes) end + def expect_tag_layout_creation + expect_api_v2_posts('TagLayout', tag_layouts_attributes) + end + def expect_transfer_creation expect_api_v2_posts( 'Transfer', diff --git a/spec/support/shared_tagging_examples.rb b/spec/support/shared_tagging_examples.rb deleted file mode 100644 index 1a1ed49ae..000000000 --- a/spec/support/shared_tagging_examples.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -RSpec.shared_context 'a tag plate creator' do - let(:tag_layout_template) { json(:tag_layout_template, uuid: tag_template_uuid) } - let(:enforce_uniqueness) { true } - - let!(:tag_layout_creation_request) do - # TODO: {Y24-190} Drop this stub when we no longer need to use V1 in #create_labware! in tagged_plate.rb - stub_api_get(tag_template_uuid, body: tag_layout_template) - - stub_api_post( - tag_template_uuid, - payload: { - tag_layout: { - plate: tag_plate_uuid, - user: user_uuid, - enforce_uniqueness: enforce_uniqueness - } - }, - body: '{}' - ) - end -end From 8e763f9fd099e5ff5b4471c5160ffb4bb8deed89 Mon Sep 17 00:00:00 2001 From: Stuart McHattie Date: Wed, 27 Nov 2024 20:33:25 +0000 Subject: [PATCH 4/4] Change creation_transfers to transfers_as_destination --- app/views/labware/plates/_multi_pooled_plate.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/labware/plates/_multi_pooled_plate.html.erb b/app/views/labware/plates/_multi_pooled_plate.html.erb index bf4a2222b..6a0c63d5c 100644 --- a/app/views/labware/plates/_multi_pooled_plate.html.erb +++ b/app/views/labware/plates/_multi_pooled_plate.html.erb @@ -1,5 +1,5 @@

Source Plates

-<% presenter.labware.creation_transfers.each_with_index do |transfer,i| %> +<% presenter.labware.transfers_as_destination.each_with_index do |transfer,i| %>

<%= "#{@presenter.bed_prefix}#{i+1}: #{transfer.source.stock_plate.barcode.prefix}#{transfer.source.stock_plate.barcode.number} (#{transfer.source.barcode.prefix}#{transfer.source.barcode.number})" %>

<%= render partial: "pooled_plate", locals: {plate_presenter: presenter, walker: presenter.walk_source, transfers: transfer.transfers} %> <% end %>