Skip to content

Commit

Permalink
Merge branch 'develop' into Y24-051-hide-pools-tab-if-not-relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsparkes committed Jan 28, 2025
2 parents d98cee7 + 75cf1c5 commit 52ee07e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
ARG CHIPSET=default
ARG RUBY_VERSION=3.3.6
ARG APPLE_PLATFORM=linux/amd64

# Use the correct base image depending on the architecture
# For Apple M1 Chip, run: docker build --build-arg CHIPSET=m1 .
FROM ruby:3.3.6-slim AS base_default
FROM --platform=linux/amd64 ruby:3.2.5-slim AS base_m1
FROM ruby:${RUBY_VERSION}-slim AS base_default
FROM --platform=${APPLE_PLATFORM} ruby:${RUBY_VERSION}-slim AS base_m1
FROM base_${CHIPSET} AS base

COPY .nvmrc /.nvmrc
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true
# Migrates the data related to invalid INSDC countries of origin to their current equivalent
# See DisableInvalidInsdcCountries migration for more details
class MigrateSampleMetadataForInvalidInsdcCountryOfOrigin < ActiveRecord::Migration[7.0]
def change
sample_metadata =
Sample::Metadata.where(country_of_origin: ['not applicable: control sample', 'not applicable: sample group'])

sample_metadata.each do |sm|
if sm.country_of_origin == 'not applicable: control sample'
sm.update!(country_of_origin: 'missing: control sample')
elsif sm.country_of_origin == 'not applicable: sample group'
sm.update!(country_of_origin: 'missing: sample group')
end
end
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2025_01_14_135342) do
ActiveRecord::Schema[7.0].define(version: 2025_01_23_105050) do
create_table "aliquot_indices", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t|
t.integer "aliquot_id", null: false
t.integer "lane_id", null: false
Expand Down
2 changes: 1 addition & 1 deletion features/support/capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

options.add_argument('--window-size=1600,3200')
options.add_preference('download.default_directory', DownloadHelpers::PATH.to_s)
options.add_argument('--headless=old')
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--disable-search-engine-choice-screen')
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
step('I follow "Select Plate Template"')
step('I select "testtemplate" from "Plate Template"')
step('I select "Infinium 670k" from "Output plate purpose"')
step('I fill in "nano_grams_per_micro_litre_volume_required" with "13"')
fill_in('nano_grams_per_micro_litre_volume_required', with: '13', fill_options: { clear: :backspace })
step('I fill in "nano_grams_per_micro_litre_concentration_required" with "50"')
fill_in('nano_grams_per_micro_litre_robot_minimum_picking_volume', with: minimum_robot_pick)
step('I press "Next step"')
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
options = Selenium::WebDriver::Chrome::Options.new

options.add_preference('download.default_directory', DownloadHelpers::PATH.to_s)
options.add_argument('--headless=old')
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--disable-search-engine-choice-screen')
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
Expand Down

0 comments on commit 52ee07e

Please sign in to comment.