Skip to content

Commit

Permalink
Fixing input plate tests - Part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dasunpubudumal committed Sep 23, 2024
1 parent 9524c18 commit db77c2c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
14 changes: 7 additions & 7 deletions features/api/tag_layout_templates.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Feature: Access tag layout templates through the API
And the UUID for the plate "Testing the API" is "11111111-2222-3333-4444-000000000002"
And all wells on the plate "Testing the API" have unique samples

Given a "Stock plate" plate called "Testing the tagging" exists
Given a "Stock plate" input plate called "Testing the tagging" exists
And the UUID for the plate "Testing the tagging" is "11111111-2222-3333-4444-000000000001"
And the wells for the plate "Testing the API" have been pooled in columns to the plate "Testing the tagging"

Expand Down Expand Up @@ -290,7 +290,7 @@ Feature: Access tag layout templates through the API
And the UUID for the plate "Testing the API" is "11111111-2222-3333-4444-000000000002"
And all wells on the plate "Testing the API" have unique samples

Given a "Stock plate" plate called "Testing the tagging" exists
Given a "Stock plate" input plate called "Testing the tagging" exists
And the UUID for the plate "Testing the tagging" is "11111111-2222-3333-4444-000000000001"
And the wells for the plate "Testing the API" have been pooled to the plate "Testing the tagging" according to the pooling strategy 96
And "F11-F12" of the plate "Testing the tagging" have been failed
Expand Down Expand Up @@ -460,7 +460,7 @@ Feature: Access tag layout templates through the API
And the UUID for the plate "Testing the API" is "11111111-2222-3333-4444-000000000002"
And all wells on the plate "Testing the API" have unique samples

Given a "Stock plate" plate called "Testing the tagging" exists
Given a "Stock plate" input plate called "Testing the tagging" exists
And the UUID for the plate "Testing the tagging" is "11111111-2222-3333-4444-000000000001"
And the wells for the plate "Testing the API" have been pooled in columns to the plate "Testing the tagging"

Expand Down Expand Up @@ -550,7 +550,7 @@ Feature: Access tag layout templates through the API
And the UUID for the plate "Testing the API" is "11111111-2222-3333-4444-000000000002"
And all wells on the plate "Testing the API" have unique samples

Given a "Stock plate" plate called "Testing the tagging" exists
Given a "Stock plate" input plate called "Testing the tagging" exists
And the UUID for the plate "Testing the tagging" is "11111111-2222-3333-4444-000000000001"
And the wells for the plate "Testing the API" have been pooled to the plate "Testing the tagging" according to the pooling strategy 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4

Expand Down Expand Up @@ -633,7 +633,7 @@ Feature: Access tag layout templates through the API
And the UUID for the plate "Testing the API" is "11111111-2222-3333-4444-000000000002"
And all wells on the plate "Testing the API" have unique samples

Given a "Stock plate" plate called "Testing the tagging" exists
Given a "Stock plate" input plate called "Testing the tagging" exists
And the UUID for the plate "Testing the tagging" is "11111111-2222-3333-4444-000000000001"
And the wells for the plate "Testing the API" have been pooled to the plate "Testing the tagging" according to the pooling strategy 8, 2, 10, 4, 8, 2, 10, 4, 8, 2, 10, 4, 8, 8, 8

Expand Down Expand Up @@ -706,7 +706,7 @@ Feature: Access tag layout templates through the API
And the UUID for the plate "Testing the API" is "11111111-2222-3333-4444-000000000002"
And all wells on the plate "Testing the API" have unique samples

Given a "Stock plate" plate called "Testing the tagging" exists
Given a "Stock plate" input plate called "Testing the tagging" exists
And the UUID for the plate "Testing the tagging" is "11111111-2222-3333-4444-000000000001"
And the wells for the plate "Testing the API" have been pooled to the plate "Testing the tagging" according to the pooling strategy 96

Expand Down Expand Up @@ -747,7 +747,7 @@ Feature: Access tag layout templates through the API
And all wells on the plate "Testing the API" have unique samples
And H12 on the plate "Testing the API" is empty

Given a "Stock plate" plate called "Testing the tagging" exists
Given a "Stock plate" input plate called "Testing the tagging" exists
And the UUID for the plate "Testing the tagging" is "11111111-2222-3333-4444-000000000001"
And the wells for the plate "Testing the API" have been pooled to the plate "Testing the tagging" according to the pooling strategy 95

Expand Down
12 changes: 12 additions & 0 deletions features/support/step_definitions/plate_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@
plate_purpose.create!(name: plate_name)
end

Given /^a "([^"]+)" input plate called "([^"]+)" exists$/ do |name, plate_name|
plate_purpose = PlatePurpose.find_by!(name: name)
# binding.pry
plate_purpose.create!(name: plate_name)

# Create requests for the wells of the plate
plate = Plate.find_by(name: plate_name)
plate.wells.each do |well|
FactoryBot.create(:customer_request, asset: well, sti_type: 'Request::LibraryCreation', state: 'pending')
end
end

Given(/^a plate called "([^"]*)" exists with purpose "([^"]*)"$/) do |name, purpose_name|
purpose = Purpose.find_by(name: purpose_name) || FactoryBot.create(:plate_purpose, name: purpose_name)
FactoryBot.create(:plate, name: name, purpose: purpose, well_count: 8)
Expand Down

0 comments on commit db77c2c

Please sign in to comment.