diff --git a/.github/workflows/cucumber_tests.yml b/.github/workflows/cucumber_tests.yml deleted file mode 100644 index 2478acdeb1..0000000000 --- a/.github/workflows/cucumber_tests.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: Integration tests - -env: - TZ: Europe/London - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID || '9c624e5d90c5b319d678e06d66c7671f1661fda826436d475f9679b54be63e26' }} - KNAPSACK_PRO_TEST_SUITE_TOKEN_CUCUMBER: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_CUCUMBER }} - KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true - KNAPSACK_PRO_LOG_LEVEL: info - SKIP_AUTOMATIC_GEM_INSTALLATION: true # Disable the bundle install in bin/setup - -######## -## Warning! -## CodeCov's config in `codecov.yml` is expecting an exact number of builds to complete before it will run. -## See the config value with key `after_n_builds` in that file. -## If the number of build steps changes, it is important to update the count there to match. -######## - -on: - push: - branches: - - develop - - master - pull_request: - types: - # defaults - - opened - - synchronize - - reopened - # custom - - ready_for_review # required for Github-created PRs - -jobs: - cucumber_tests: - name: Cucumber tests - runs-on: ubuntu-latest - env: - RAILS_ENV: cucumber - BUNDLE_WITHOUT: "deployment profile development test" - services: - mysql: - # Use the Mysql docker image https://hub.docker.com/_/mysql - image: mysql:8.4 - ports: - - 3306 # Default port mappings - # Monitor the health of the container to mesaure when it is ready - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - env: - MYSQL_ROOT_PASSWORD: "" # Set root PW to nothing - MYSQL_ALLOW_EMPTY_PASSWORD: yes - - # Sets up the matrix for knapsack builds - strategy: - matrix: - ci_node_total: [2] - ci_node_index: [0, 1] - - steps: - - name: Checkout Repository - uses: sanger/.github/.github/actions/setup/checkout@master - - - name: Setup Ruby - uses: sanger/.github/.github/actions/setup/ruby@master - - - name: Setup Node - uses: sanger/.github/.github/actions/setup/node@master - - - name: Fix apt mirrors + networking - run: | - sudo sed -i 's|http://azure.archive.ubuntu.com|http://archive.ubuntu.com|g' /etc/apt/apt-mirrors.txt - echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4 - echo 'Acquire::Retries "1";' | sudo tee /etc/apt/apt.conf.d/80-retries - - - name: Setup stable Chrome - uses: sanger/.github/.github/actions/tests/setup-chrome@master - with: - chrome-version: 128 - install-chromedriver: true - install-dependencies: true - - # The runner image also ships Chromium. Selenium 4.52 picks it - # before the pinned Chrome on PATH, so remove it. - - name: Remove image-bundled Chromium - run: | - sudo rm -rf /usr/bin/chromium /usr/bin/chromium-browser \ - /usr/local/share/chromium - - - name: Setup environment - env: - DBPORT: ${{ job.services.mysql.ports[3306] }} - run: | - bin/setup --skip-server - bundle exec rake assets:precompile - - # Actually run our tests - - name: Run Cucumber tests - env: - KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }} - KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }} - DBPORT: ${{ job.services.mysql.ports[3306] }} - run: bin/knapsack_pro_cucumber - - - name: Upload capybara artifacts - uses: sanger/.github/.github/actions/tests/upload-artifact@master - if: ${{ failure() }} - with: - name: capybara-${{ github.job }}-${{ matrix.ci_node_index }} - path: tmp/capybara/ - retention-days: 5 - - - name: Upload coverage reports to Codecov - uses: sanger/.github/.github/actions/tests/codecov@master - with: - name: ${{ github.run_id }}_${{ github.job }}_${{ matrix.ci_node_index }}_${{ github.event_name }} - token: ${{ secrets.CODECOV_TOKEN }} - flags: ruby - disable-search: true - files: ${{ github.workspace }}/lcov.info diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9035e23aba..591532bce8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: # Directory to cache Rubocop processing. Support added in 0.9.0 but # preparing this in advance of upgrade as it is side effect free. RUBOCOP_CACHE_ROOT: ".rubocop-cache" - BUNDLE_WITHOUT: "cucumber deployment profile development default test" + BUNDLE_WITHOUT: "deployment profile development default test" steps: - name: Checkout Repository uses: sanger/.github/.github/actions/setup/checkout@master @@ -86,7 +86,7 @@ jobs: name: Yard junk runs-on: ubuntu-latest env: - BUNDLE_WITHOUT: "cucumber deployment profile development default test" + BUNDLE_WITHOUT: "deployment profile development default test" steps: - name: Checkout Repository uses: sanger/.github/.github/actions/setup/checkout@master diff --git a/.github/workflows/rake_tests.yml b/.github/workflows/rake_tests.yml index 56b72eaa93..fc724e2dea 100644 --- a/.github/workflows/rake_tests.yml +++ b/.github/workflows/rake_tests.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest env: RAILS_ENV: test - BUNDLE_WITHOUT: "cucumber deployment profile development" + BUNDLE_WITHOUT: "deployment profile development" services: mysql: # Use the Mysql docker image https://hub.docker.com/_/mysql diff --git a/.github/workflows/rspec_feature_tests.yml b/.github/workflows/rspec_feature_tests.yml index ba6e2c6ca0..d20d8c7154 100644 --- a/.github/workflows/rspec_feature_tests.yml +++ b/.github/workflows/rspec_feature_tests.yml @@ -35,7 +35,7 @@ jobs: runs-on: ubuntu-latest env: RAILS_ENV: test - BUNDLE_WITHOUT: "cucumber deployment profile development" + BUNDLE_WITHOUT: "deployment profile development" services: mysql: # Use the Mysql docker image https://hub.docker.com/_/mysql diff --git a/.github/workflows/rspec_unit_tests.yml b/.github/workflows/rspec_unit_tests.yml index b773618158..bebd9e5390 100644 --- a/.github/workflows/rspec_unit_tests.yml +++ b/.github/workflows/rspec_unit_tests.yml @@ -35,7 +35,7 @@ jobs: runs-on: ubuntu-latest env: RAILS_ENV: test - BUNDLE_WITHOUT: "cucumber deployment profile development" + BUNDLE_WITHOUT: "deployment profile development" services: mysql: # Use the Mysql docker image https://hub.docker.com/_/mysql diff --git a/.gitignore b/.gitignore index 37277d8c95..693f8639ba 100644 --- a/.gitignore +++ b/.gitignore @@ -82,7 +82,6 @@ lib/tasks/*.local.rake /public/vite /public/vite-dev /public/vite-test -/public/vite-cucumber # Vite uses dotenv and suggests to ignore local-only env files. See # https://vitejs.dev/guide/env-and-mode.html#env-files *.local diff --git a/.prettierignore b/.prettierignore index f1908d47d1..bffaa4571c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -25,7 +25,6 @@ /yarn-error.log app/sample_manifest_excel/doc/ capybara*.html -config/cucumber.yml config/database.yml coverage data/avro_schema_cache/* diff --git a/.rubocop.yml b/.rubocop.yml index 897b71ff87..a5b5550b99 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -22,7 +22,6 @@ plugins: - rubocop-rspec_rails - test-prof -# env.rb and cucumber.rake are generated by cucumber-rails AllCops: NewCops: enable Exclude: @@ -30,8 +29,6 @@ AllCops: - config/initializers/content_security_policy.rb - db/schema.rb - db/views_schema.rb - - features/support/env.rb - - lib/tasks/cucumber.rake - node_modules/**/* - tmp/**/* @@ -62,12 +59,6 @@ Layout/MultilineMethodCallIndentation: Layout/MultilineOperationIndentation: EnforcedStyle: indented -# Step definitions are defined with Given /regex/ do ... -# There is little ambiguity here, and brackets just break convention -Lint/AmbiguousRegexpLiteral: - Exclude: - - features/support/step_definitions/**/* - # Unused keyword arguments are good for maintaining API compatibility, and # applying an underscore before the keyword name breaks that API. Lint/UnusedMethodArgument: @@ -224,7 +215,6 @@ Rails/RedundantPresenceValidationOnBelongsTo: Rails/SkipsModelValidations: Exclude: - db/migrate/*.rb - - features/support/step_definitions/*.rb Rails/UniqueValidationWithoutIndex: Enabled: false @@ -234,7 +224,6 @@ Rails/UnknownEnv: - production - development - test - - cucumber - profile - staging diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 1c0a88d140..24c5196ccd 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -78,7 +78,6 @@ Layout/LeadingCommentSpace: # Configuration parameters: AllowedMethods, AllowedPatterns. Lint/AmbiguousBlockAssociation: Exclude: - - 'features/support/step_definitions/bulk_submission_steps.rb' - 'spec/features/sample_manifests/uploader_for_manifests_with_tag_sequences_spec.rb' - 'spec/features/studies/accession_all_samples_spec.rb' - 'spec/lib/sample_manifest_excel/worksheet_spec.rb' @@ -101,7 +100,6 @@ Lint/BooleanSymbol: # AllowedMethods: enums Lint/ConstantDefinitionInBlock: Exclude: - - 'features/support/timecop.rb' - 'lib/tasks/add_heron_product.rake' - 'lib/tasks/add_templates_and_printers_to_pmb.rake' - 'spec/lib/accession/accessionable_spec.rb' @@ -119,7 +117,6 @@ Lint/DuplicateBranch: - 'app/models/submission/submission_creator.rb' - 'app/models/submission_template.rb' - 'app/models/well.rb' - - 'features/support/step_definitions/order_steps.rb' - 'test/shoulda_macros/sanger_macros.rb' # Offense count: 8 @@ -153,12 +150,6 @@ Lint/EmptyBlock: - 'test/unit/data_release_test.rb' - 'test/unit/fragment_test.rb' -# Offense count: 1 -# Configuration parameters: AllowComments. -Lint/EmptyFile: - Exclude: - - 'features/support/step_definitions/25387227_transfer_requests_request_type.rb' - # Offense count: 2 Lint/IneffectiveAccessModifier: Exclude: @@ -224,22 +215,6 @@ Lint/UselessAssignment: - 'app/models/single_request_submission.rb' - 'app/models/user/authentication.rb' - 'app/models/uuid.rb' - - 'features/support/paths.rb' - - 'features/support/step_definitions/10071597_change_request_type_on_request_steps.rb' - - 'features/support/step_definitions/11438075_request_xml_exception_on_nil_study_steps.rb' - - 'features/support/step_definitions/20530077_weird_submission_link_behaviour.rb' - - 'features/support/step_definitions/3673146_tables_with_multiple_criteria_steps.rb' - - 'features/support/step_definitions/4759010_bug_on_reset_batches_steps.rb' - - 'features/support/step_definitions/5004860_change_decision_by_request_steps.rb' - - 'features/support/step_definitions/65192392_tag_qc_steps.rb' - - 'features/support/step_definitions/6679401_batch_request_recycling_broken_steps.rb' - - 'features/support/step_definitions/api_steps.rb' - - 'features/support/step_definitions/order_steps.rb' - - 'features/support/step_definitions/pipeline_steps.rb' - - 'features/support/step_definitions/samples_steps.rb' - - 'features/support/step_definitions/study_report_steps.rb' - - 'features/support/step_definitions/study_steps.rb' - - 'features/support/step_definitions/tube_steps.rb' - 'spec/models/study_spec.rb' - 'test/lib/label_printer/plate_creator_test.rb' - 'test/unit/tasks/plate_transfer_task_test.rb' @@ -366,14 +341,6 @@ Naming/AccessorMethodName: - 'lib/authenticated_system.rb' - 'lib/tasks/add_templates_and_printers_to_pmb.rake' -# Offense count: 1 -# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms. -# CheckDefinitionPathHierarchyRoots: lib, spec, test, src -# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS -Naming/FileName: - Exclude: - - 'features/support/step_definitions/641709_create_duplicate_SE_pipeline_with_no_controls_steps.rb' - # Offense count: 1 # Configuration parameters: ForbiddenDelimiters. # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$)) @@ -404,7 +371,6 @@ Naming/MethodParameterName: Exclude: - 'app/models/asset_shape.rb' - 'app/models/map.rb' - - 'features/support/step_definitions/api_steps.rb' - 'lib/informatics/lib/informatics/application.rb' - 'lib/informatics/lib/informatics/controller_helper.rb' - 'lib/oligo_enumerator.rb' @@ -501,8 +467,6 @@ Naming/VariableNumber: Performance/CollectionLiteralInLoop: Exclude: - 'db/seeds/3000_library_types_setup.rb' - - 'features/support/step_definitions/6040471_truncate_sample_name_barcode_steps.rb' - - 'features/support/step_definitions/sample_manifest_steps.rb' - 'spec/models/transfer_request_spec.rb' # Offense count: 9 @@ -513,8 +477,6 @@ Performance/MapMethodChain: - 'app/models/bait_library_layout.rb' - 'app/models/lane.rb' - 'app/models/submission/asset_submission_finder.rb' - - 'features/support/step_definitions/multiplexed_inbox_steps.rb' - - 'features/support/step_definitions/project_steps.rb' - 'lib/tasks/support/update_library_types.rake' - 'test/unit/tag_qc/qcable_statemachine_checks.rb' @@ -525,12 +487,6 @@ Performance/MethodObjectAsBlock: - 'app/models/cherrypick/task/pick_by_nano_grams.rb' - 'app/models/cherrypick/task/pick_by_nano_grams_per_micro_litre.rb' - 'app/models/request/statistics.rb' - - 'features/support/step_definitions/6679401_batch_request_recycling_broken_steps.rb' - - 'features/support/step_definitions/aliquot_steps.rb' - - 'features/support/step_definitions/bait_library_steps.rb' - - 'features/support/step_definitions/pulldown_steps.rb' - - 'features/support/step_definitions/tag_layout_steps.rb' - - 'features/support/step_definitions/transfer_steps.rb' - 'lib/tasks/report.rake' # Offense count: 2 @@ -1280,7 +1236,6 @@ Rails/CompactBlank: Exclude: - 'app/models/batch.rb' - 'app/models/bulk_submission.rb' - - 'features/support/step_definitions/delayed_job_steps.rb' - 'lib/event_factory.rb' - 'lib/sample_manifest_excel/upload/base.rb' @@ -1320,8 +1275,6 @@ Rails/FilePath: - 'config/initializers/failure_reasons.rb' - 'config/initializers/i18n.rb' - 'config/initializers/load_config.rb' - - 'features/support/step_definitions/49061511_qc_file_steps.rb' - - 'features/support/step_definitions/bulk_submission_steps.rb' - 'lib/tasks/sample_manifest_excel_tests.rake' - 'test/test_helper.rb' - 'test/unit/fluidigm_file_test.rb' @@ -1648,7 +1601,6 @@ Style/ExplicitBlockArgument: Exclude: - 'app/models/messenger_creator.rb' - 'app/models/submission/flexible_request_graph.rb' - - 'features/support/step_definitions/web_steps.rb' # Offense count: 5 # This cop supports safe autocorrection (--autocorrect). @@ -1658,8 +1610,6 @@ Style/FormatString: Exclude: - 'app/helpers/plates_helper.rb' - 'app/models/map.rb' - - 'features/support/step_definitions/4560014_refactoring_properties_descriptors_etc_to_table_columns_steps.rb' - - 'features/support/step_definitions/samples_steps.rb' # Offense count: 5 # This cop supports safe autocorrection (--autocorrect). @@ -1710,7 +1660,6 @@ Style/GuardClause: - 'app/models/sample_manifest.rb' - 'app/models/study.rb' - 'app/models/transfer/between_plate_and_tubes.rb' - - 'features/support/step_definitions/tag_layout_steps.rb' - 'lib/accession/sample.rb' - 'lib/accession/submission.rb' - 'lib/authenticated_system.rb' @@ -1751,7 +1700,6 @@ Style/HashEachMethods: Style/IdenticalConditionalBranches: Exclude: - 'app/controllers/studies/documents_controller.rb' - - 'features/support/step_definitions/api_steps.rb' # Offense count: 3 # This cop supports safe autocorrection (--autocorrect). @@ -1770,7 +1718,6 @@ Style/IfUnlessModifierOfIfUnless: - 'app/models/parsers/plate_reader_parser.rb' - 'app/models/robot/verification/base.rb' - 'app/uploaders/polymorphic_uploader.rb' - - 'features/support/step_definitions/display_submitted_at_inbox_pipeline_steps.rb' # Offense count: 2 # This cop supports unsafe autocorrection (--autocorrect-all). @@ -1887,7 +1834,6 @@ Style/NestedModifier: - 'app/models/parsers/plate_reader_parser.rb' - 'app/models/robot/verification/base.rb' - 'app/uploaders/polymorphic_uploader.rb' - - 'features/support/step_definitions/display_submitted_at_inbox_pipeline_steps.rb' # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). @@ -1910,7 +1856,6 @@ Style/Not: - 'app/models/submission/project_validation.rb' - 'app/models/user.rb' - 'app/views/batches/show.xml.builder' - - 'features/support/step_definitions/api_steps.rb' # Offense count: 30 # This cop supports unsafe autocorrection (--autocorrect-all). @@ -1961,7 +1906,6 @@ Style/OptionalBooleanParameter: - 'app/models/pipeline/inbox_extensions.rb' - 'app/models/presenters/grouped_pipeline_inbox_presenter.rb' - 'db/seeds/0001_workflows.rb' - - 'features/support/step_definitions/web_form_steps.rb' - 'lib/object_space_profile.rb' - 'lib/sample_manifest_excel/tags/example_data.rb' - 'spec/lib/sequencescape_excel/list_spec.rb' @@ -1996,10 +1940,6 @@ Style/ParallelAssignment: - 'app/models/transfer/between_plate_and_tubes.rb' - 'app/models/validation_state_guard.rb' - 'app/views/studies/show.xml.builder' - - 'features/support/paths.rb' - - 'features/support/step_definitions/4560014_refactoring_properties_descriptors_etc_to_table_columns_steps.rb' - - 'features/support/step_definitions/tag_layout_steps.rb' - - 'features/support/step_definitions/transfer_steps.rb' - 'test/unit/batch_test.rb' - 'test/unit/messaging/hash_generation_test.rb' - 'test/unit/tag_qc/qcable_statemachine_checks.rb' @@ -2016,8 +1956,6 @@ Style/ParenthesesAroundCondition: Style/PerlBackrefs: Exclude: - 'app/models/validation_state_guard.rb' - - 'features/support/paths.rb' - - 'features/support/step_definitions/tag_layout_steps.rb' - 'lib/validateable.rb' # Offense count: 4 @@ -2116,7 +2054,6 @@ Style/SoleNestedConditional: - 'app/models/order.rb' - 'app/models/parsers/plate_reader_parser.rb' - 'app/uploaders/polymorphic_uploader.rb' - - 'features/support/step_definitions/display_submitted_at_inbox_pipeline_steps.rb' # Offense count: 5 # This cop supports unsafe autocorrection (--autocorrect-all). @@ -2131,8 +2068,6 @@ Style/SpecialGlobalVars: # This cop supports safe autocorrection (--autocorrect). Style/StderrPuts: Exclude: - - 'features/support/step_definitions/api_steps.rb' - - 'features/support/step_definitions/tag_layout_steps.rb' - 'script/autospec' # Offense count: 5 diff --git a/.simplecov b/.simplecov index f067b5fa6b..345ebf36eb 100644 --- a/.simplecov +++ b/.simplecov @@ -27,7 +27,6 @@ SimpleCov.skip '/doc/' SimpleCov.skip '/log/' SimpleCov.skip '/public/' SimpleCov.skip '/script/' -SimpleCov.skip '/features/' SimpleCov.skip '/vendor/' SimpleCov.skip '/tmp/' diff --git a/Gemfile b/Gemfile index eb51df1dff..3e460d12fc 100644 --- a/Gemfile +++ b/Gemfile @@ -183,7 +183,7 @@ group :linting, :test do gem 'test-prof' end -group :development, :test, :cucumber do +group :development, :test do gem 'knapsack_pro' gem 'pry-byebug' gem 'pry-rails' @@ -208,14 +208,6 @@ group :test do gem 'rspec-github', require: false gem 'rspec-json_expectations', require: false - gem 'minitest' - gem 'minitest-mock' - gem 'minitest-profiler' - gem 'minitest-reporters' - gem 'rails-controller-testing' # It is needed to use #assigns(attribute) in controllers tests -end - -group :test, :cucumber do gem 'capybara' gem 'database_cleaner-active_record' gem 'database_cleaner-activerecord-seeded_deletion', @@ -223,8 +215,13 @@ group :test, :cucumber do gem 'factory_bot_rails', require: false gem 'jsonapi-resources-matchers', require: false gem 'launchy', require: false + gem 'minitest' + gem 'minitest-mock' + gem 'minitest-profiler' + gem 'minitest-reporters' gem 'mocha', require: false # avoids load order problems gem 'nokogiri', require: false + gem 'rails-controller-testing' # It is needed to use #assigns(attribute) in controllers tests gem 'rspec-rails', '~> 8.0.0', require: false gem 'selenium-webdriver', require: false gem 'shoulda-context' @@ -233,9 +230,6 @@ group :test, :cucumber do gem 'simplecov_json_formatter', require: false gem 'simplecov-lcov', require: false gem 'timecop', require: false - - gem 'cucumber_github_formatter' - gem 'cucumber-rails', require: false end group :deployment do diff --git a/Gemfile.lock b/Gemfile.lock index ee82afbde4..04211c32d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -184,36 +184,6 @@ GEM rexml crass (1.0.8) csv (3.3.7) - cucumber (11.1.1) - base64 (~> 0.2) - builder (~> 3.2) - cucumber-ci-environment (> 9, < 12) - cucumber-core (>= 16.2.0, < 17) - cucumber-cucumber-expressions (> 17, < 20) - cucumber-html-formatter (> 21, < 24) - diff-lcs (~> 1.5) - logger (~> 1.6) - mini_mime (~> 1.1) - multi_test (~> 1.1) - sys-uname (~> 1.5) - cucumber-ci-environment (11.0.0) - cucumber-core (16.2.0) - cucumber-gherkin (> 36, < 40) - cucumber-messages (> 31, < 33) - cucumber-tag-expressions (> 6, < 9) - cucumber-cucumber-expressions (19.0.1) - bigdecimal - cucumber-gherkin (39.1.0) - cucumber-messages (>= 31, < 33) - cucumber-html-formatter (23.1.0) - cucumber-messages (> 23, < 33) - cucumber-messages (32.3.1) - cucumber-rails (4.1.0) - capybara (>= 3.25, < 4) - cucumber (>= 7, < 12) - railties (>= 6.1, < 9) - cucumber-tag-expressions (8.1.0) - cucumber_github_formatter (0.1.0) daemons (1.4.1) database_cleaner-active_record (2.2.2) activerecord (>= 5.a) @@ -324,7 +294,6 @@ GEM net-smtp marcel (1.2.1) matrix (0.4.3) - memoist3 (1.0.0) method_source (1.1.0) mime-types (3.7.0) logger @@ -349,7 +318,6 @@ GEM ruby2_keywords (>= 0.0.5) msgpack (1.8.7) multi_json (1.17.0) - multi_test (1.1.0) multipart-post (2.4.1) mutex_m (0.3.0) mysql2 (0.5.7) @@ -625,9 +593,6 @@ GEM prettier_print rbs syntax_tree (>= 2.0.1) - sys-uname (1.5.1) - ffi (~> 1.1) - memoist3 (~> 1.0.0) syslog (0.4.0) logger temple (0.10.4) @@ -713,8 +678,6 @@ DEPENDENCIES concurrent-ruby configatron csv (~> 3.3) - cucumber-rails - cucumber_github_formatter daemons database_cleaner-active_record database_cleaner-activerecord-seeded_deletion! diff --git a/README.md b/README.md index 66d7c9b18a..159de6f504 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ [](https://codecov.io/github/sanger/sequencescape) [](https://sanger.github.io/sequencescape/) [](https://knapsackpro.com/dashboard/organizations/1976/projects/1324/test_suites/1880/builds?utm_campaign=organization-id-1976&utm_content=test-suite-id-1880&utm_medium=readme&utm_source=knapsack-pro-badge&utm_term=project-id-1324) -[](https://knapsackpro.com/dashboard/organizations/1976/projects/1324/test_suites/1881/builds?utm_campaign=organization-id-1976&utm_content=test-suite-id-1881&utm_medium=readme&utm_source=knapsack-pro-badge&utm_term=project-id-1324) Sequencescape is a cloud based and highly extensible LIMS system for use in labs with large numbers of samples. @@ -64,7 +63,7 @@ a organisation of 900 people. - [MySQL errors when installing](#mysql-errors-when-installing) - [MySQL errors after system updates](#mysql-errors-after-system-updates) - [Installing on Apple Silicon (M1)](#installing-on-apple-silicon-m1) - - [Cucumber / RSpec feature chromedriver issues](#cucumber--rspec-feature-chromedriver-issues) + - [RSpec feature chromedriver issues](#rspec-feature-chromedriver-issues) - [API V2 Authentication](#api-v2-authentication) - [Documentation](#documentation-1) - [Publishing AMQP Messages](#publishing-amqp-messages) @@ -297,7 +296,7 @@ These should not be committed to the github repo. ### Rails -Testing is done in one of three ways; using rspec, via rails tests or with cucumber. +Testing is done in one of two ways; using rspec or via rails tests. 1. To run the rspec tests (found in `rspec/` dir.): @@ -317,24 +316,6 @@ Testing is done in one of three ways; using rspec, via rails tests or with cucum bundle exec ruby -Itest test/lib/label_printer/print_job_test.rb ``` -1. To run cucumber tests (found in `features/` dir.) first ensure you have a `sequencescape_test_cuke` database configured by running: - - ```shell - RAILS_ENV=cucumber bundle exec rake db:setup - ``` - - then run cucumber itself: - - ```shell - bundle exec cucumber - ``` - - For a single file: - - ```shell - bundle exec cucumber features/create_plates.feature - ``` - #### Rspec feature tests with javascript Where feature tests require javascript, these must be specifically tagged with `:js` to enable the Capybara javascript driver. @@ -555,7 +536,7 @@ If installation issues are encountered with Docker on M1 processors, try the fix [[GitHub issue](https://github.com/evilmartians/terraforming-rails/issues/34#issuecomment-872021786)] -#### Cucumber / RSpec feature chromedriver issues +#### RSpec feature chromedriver issues If you encounter Selenium/Chromedriver issues locally it may be because the latest version of Chrome is yet to be supported by our testing libraries (Capybara). This may require a fix to the `Capybara.rb` file, e.g. new driver arguments. In the case the fix is not identifiable you made need to rely on a pinned version of Chrome in the CI to run these tests, see [Chromedriver issues](#chromedriver-issues) below for further instructions. @@ -596,11 +577,11 @@ This isn't necessary at this stage, but it seems wise to note the intended patte ### CI -The GH actions builds use the Knapsack-pro gem to reduce build time by parallelizing the RSpec and Cucumber tests. There is no need to regenerate the knapsack_rspec_report.json file, Knapsack Pro will dynamically allocate tests to ensure tests finish as close together as possible. +The GH actions builds use the Knapsack-pro gem to reduce build time by parallelizing the RSpec tests. There is no need to regenerate the knapsack_rspec_report.json file, Knapsack Pro will dynamically allocate tests to ensure tests finish as close together as possible. #### Chromedriver issues -If you encounter CI failures for cucumber and rspec feature tests it may be caused by our CI GitHub runner being on the latest version of Chrome while our testing libraries are yet to support it. To fix this, you can pin the version of Chrome in the CI to an older, known working version. This can be done in the `.github/workflows/ruby_test.yml` workflow under `Setup stable Chrome`. If this is required ensure you revert the change once the testing libraries are updated. +If you encounter CI failures for rspec feature tests it may be caused by our CI GitHub runner being on the latest version of Chrome while our testing libraries are yet to support it. To fix this, you can pin the version of Chrome in the CI to an older, known working version. This can be done in the `.github/workflows/ruby_test.yml` workflow under `Setup stable Chrome`. If this is required ensure you revert the change once the testing libraries are updated. ### ERD diff --git a/app/controllers/receptacles_controller.rb b/app/controllers/receptacles_controller.rb index 50e0180849..78df23e901 100644 --- a/app/controllers/receptacles_controller.rb +++ b/app/controllers/receptacles_controller.rb @@ -127,7 +127,6 @@ def new_request # In rare cases the user links in to the 'new request' page # with a specific study specified. In even rarer cases this may # conflict with the assets primary study. - # ./features/7711055_new_request_links_broken.feature:29 # This resolves the issue, but the code could do with a significant # refactor. I'm delaying this currently as we NEED to get SS434 completed. # 1. This should probably be RequestsController::new diff --git a/app/models/plate_barcode.rb b/app/models/plate_barcode.rb index ae78803b73..0c788068e3 100644 --- a/app/models/plate_barcode.rb +++ b/app/models/plate_barcode.rb @@ -136,15 +136,4 @@ def self.create_child_barcodes(parent_barcode, count = 1) child_barcodes end end - - if Rails.env.cucumber? - def self.create_barcode - barcode_record = fetch_response("#{site}/barcodes/#{prefix}/new") - if barcode_record[:format] == 'DN' - Barcode.build_sanger_code39(prefix: 'DN', number: barcode_record[:barcode]) - else - Barcode.build_sequencescape22(barcode_record) - end - end - end end diff --git a/app/models/pulldown/plate_purposes.rb b/app/models/pulldown/plate_purposes.rb index 64fc0e3d9b..fd667cfb4a 100644 --- a/app/models/pulldown/plate_purposes.rb +++ b/app/models/pulldown/plate_purposes.rb @@ -7,9 +7,8 @@ # This module was used to generate the purposes and their associations as part of # both the seeds and the original migration. # -# Removal of this code shouldn't affect production, but will disrupt seeds, -# and potentially a number of cucumber features. It will probably also require -# the corresponding search objects to be deprecated. +# Removal of this code shouldn't affect production, but will disrupt seeds. +# It will probably also require the corresponding search objects to be deprecated. # # @todo #2396 Remove module Pulldown::PlatePurposes diff --git a/app/models/uuid.rb b/app/models/uuid.rb index 7932f60b32..53312cb9bb 100644 --- a/app/models/uuid.rb +++ b/app/models/uuid.rb @@ -29,7 +29,7 @@ def self.included(base) # In the test environment we need to have a slightly different behaviour, as we can predefine # the UUID for a record to make things predictable. In production new records always have new # UUIDs. - if %w[test cucumber].include?(Rails.env) + if %w[test].include?(Rails.env) def ensure_uuid_created new_uuid = Uuid.store_for_tests && Uuid.store_for_tests.next_uuid_for(self.class.base_class) create_uuid_object!(resource: self, external_id: new_uuid) diff --git a/app/views/batches/cherrypick_worksheet.html.erb b/app/views/batches/cherrypick_worksheet.html.erb index b685623f34..35c713082a 100644 --- a/app/views/batches/cherrypick_worksheet.html.erb +++ b/app/views/batches/cherrypick_worksheet.html.erb @@ -8,7 +8,7 @@ <%= vite_javascript_tag "worksheet" %>