diff --git a/Gemfile.lock b/Gemfile.lock index 3f11d71e26..9ccbcc2abe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,7 +77,7 @@ GEM ast (2.4.2) base64 (0.2.0) bcrypt (3.1.20) - bigdecimal (3.1.7) + bigdecimal (3.1.8) builder (3.2.4) bunny (2.22.0) amq-protocol (~> 2.3, >= 2.3.1) @@ -104,7 +104,7 @@ GEM delayed_job_active_record (4.1.8) activerecord (>= 3.0, < 8.0) delayed_job (>= 3.0, < 5) - devise (4.9.3) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -170,12 +170,12 @@ GEM google-cloud-env (2.1.1) faraday (>= 1.0, < 3.a) google-cloud-errors (1.4.0) - google-cloud-storage (1.49.0) + google-cloud-storage (1.51.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-core (~> 0.13) google-apis-iamcredentials_v1 (~> 0.18) - google-apis-storage_v1 (~> 0.33) + google-apis-storage_v1 (~> 0.37) google-cloud-core (~> 1.6) googleauth (~> 1.9) mini_mime (~> 1.0) @@ -189,7 +189,7 @@ GEM hashdiff (1.1.0) hashie (4.1.0) httpclient (2.8.3) - i18n (1.14.4) + i18n (1.14.5) concurrent-ruby (~> 1.0) jsonapi-renderer (0.2.2) jwt (2.8.1) @@ -220,14 +220,14 @@ GEM net-pop net-smtp marcel (1.0.4) - method_source (1.0.0) + method_source (1.1.0) mini_mime (1.1.5) minitest (5.22.3) multi_json (1.15.0) - multipart-post (2.4.0) + multipart-post (2.4.1) mutations (0.9.1) activesupport - net-imap (0.4.10) + net-imap (0.4.11) date net-protocol net-pop (0.1.2) @@ -236,12 +236,12 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.1) - nokogiri (1.16.3-x86_64-linux) + nio4r (2.7.3) + nokogiri (1.16.4-x86_64-linux) racc (~> 1.4) orm_adapter (0.5.0) os (1.1.4) - parser (3.3.0.5) + parser (3.3.1.0) ast (~> 2.4.1) racc passenger (6.0.20) @@ -308,7 +308,7 @@ GEM declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) - request_store (1.6.0) + request_store (1.7.0) rack (>= 1.4) responders (3.1.1) actionpack (>= 5.2) @@ -325,7 +325,7 @@ GEM rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-rails (6.1.2) @@ -443,4 +443,4 @@ RUBY VERSION ruby 3.1.4p223 BUNDLED WITH - 2.5.7 + 2.5.10 diff --git a/app/mutations/devices/create.rb b/app/mutations/devices/create.rb index 6c3546d8ba..5ff81f7300 100644 --- a/app/mutations/devices/create.rb +++ b/app/mutations/devices/create.rb @@ -7,7 +7,6 @@ class Create < Mutations::Command optional do string :timezone string :name - string :webcam_url float :lat float :lng boolean :indoor diff --git a/app/mutations/devices/seeders/constants.rb b/app/mutations/devices/seeders/constants.rb index d1e7483b04..5830b5378f 100644 --- a/app/mutations/devices/seeders/constants.rb +++ b/app/mutations/devices/seeders/constants.rb @@ -28,11 +28,6 @@ module ToolNames SEED_TROUGH_2 = "Seed Trough 2" end - # Stub plants ============================== - PLANT_FIXTURE_PATH = - "app/mutations/devices/seeders/plant_fixtures.yml" - PLANTS = YAML.load(File.read(PLANT_FIXTURE_PATH)) - # Stub sequences =========================== SEQUENCE_FIXTURE_PATH = "app/mutations/devices/seeders/sequence_fixtures.yml" diff --git a/app/mutations/devices/seeders/demo_account_seeder.rb b/app/mutations/devices/seeders/demo_account_seeder.rb index bafecbd7da..d27a2ae354 100644 --- a/app/mutations/devices/seeders/demo_account_seeder.rb +++ b/app/mutations/devices/seeders/demo_account_seeder.rb @@ -25,8 +25,49 @@ def create_webcam_feed(product_line) device: device }) end - def plants - PLANTS.map { |x| Points::Create.run!(x, device: device) } + def plants(product_line) + spinach_row_count = product_line.include?("xl") ? 28 : 13 + spinach_col_count = product_line.include?("xl") ? 4 : 2 + (0..(spinach_row_count - 1)).map do |i| + (0..(spinach_col_count - 1)).map do |j| + Points::Create.run!(device: device, + pointer_type: "Plant", + name: "Spinach", + openfarm_slug: "spinach", + plant_stage: "planned", + x: 400 + i * 200, + y: 100 + j * 200 + (j > 1 ? 2100 : 0), + z: 0) + end + end + broccoli_row_count = product_line.include?("xl") ? 9 : 4 + broccoli_col_count = product_line.include?("xl") ? 3 : 1 + (0..(broccoli_row_count - 1)).map do |i| + (0..(broccoli_col_count - 1)).map do |j| + Points::Create.run!(device: device, + pointer_type: "Plant", + name: "Broccoli", + openfarm_slug: "broccoli", + plant_stage: "planned", + x: 600 + i * 600, + y: 700 + j * 600 + (j > 0 ? 300 : 0), + z: 0) + end + end + beet_row_count = product_line.include?("xl") ? 57 : 27 + beet_col_count = product_line.include?("xl") ? 2 : 2 + (0..(beet_row_count - 1)).map do |i| + (0..(beet_col_count - 1)).map do |j| + Points::Create.run!(device: device, + pointer_type: "Plant", + name: "Beet", + openfarm_slug: "beet", + plant_stage: "planned", + x: 200 + i * 100, + y: 1100 + j * 100 + (j > 1 ? 200 : 0), + z: 0) + end + end end def point_groups_spinach @@ -76,7 +117,7 @@ def point_groups_beet def misc(product_line) create_webcam_feed(product_line) - plants + plants(product_line) point_groups_spinach point_groups_broccoli point_groups_beet diff --git a/app/mutations/devices/seeders/plant_fixtures.yml b/app/mutations/devices/seeders/plant_fixtures.yml deleted file mode 100644 index 89cfe40b19..0000000000 --- a/app/mutations/devices/seeders/plant_fixtures.yml +++ /dev/null @@ -1,133 +0,0 @@ ---- -- meta: {} - pointer_type: Plant - name: Spinach - openfarm_slug: spinach - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 400.0 - y: 100.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Spinach - openfarm_slug: spinach - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 400.0 - y: 300.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Spinach - openfarm_slug: spinach - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 600.0 - y: 100.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Spinach - openfarm_slug: spinach - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 600.0 - y: 300.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Spinach - openfarm_slug: spinach - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 800.0 - y: 300.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Spinach - openfarm_slug: spinach - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 800.0 - y: 100.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Broccoli - openfarm_slug: broccoli - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 600.0 - y: 700.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Beets - openfarm_slug: beet - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 800.0 - y: 1100.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Beets - openfarm_slug: beet - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 600.0 - y: 1100.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Beets - openfarm_slug: beet - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 400.0 - y: 1100.0 - z: 0.0 -- meta: {} - pointer_type: Plant - name: Beets - openfarm_slug: beet - plant_stage: planned - planted_at: - pullout_direction: 0 - radius: 25.0 - depth: 0 - x: 200.0 - y: 1100.0 - z: 0.0 diff --git a/app/mutations/devices/unattended_upgrade.rb b/app/mutations/devices/unattended_upgrade.rb index 16441714f2..b378cc81b6 100644 --- a/app/mutations/devices/unattended_upgrade.rb +++ b/app/mutations/devices/unattended_upgrade.rb @@ -23,7 +23,7 @@ def eligible_devices(chan) .where("fbos_configs.os_auto_update" => true) .where(ota_hour_utc: [nil, Time.now.utc.hour]) .order("RANDOM()") - .limit(200) + .limit(50) end def latest_version(chan) diff --git a/app/mutations/images/generate_policy.rb b/app/mutations/images/generate_policy.rb index 797975de04..1f2892a867 100644 --- a/app/mutations/images/generate_policy.rb +++ b/app/mutations/images/generate_policy.rb @@ -23,7 +23,7 @@ def execute "GoogleAccessId" => post_object[:GoogleAccessId] || HMM, "file" => "REPLACE_THIS_WITH_A_BINARY_JPEG_FILE", }, - instructions: "Send a 'from-data' request to the URL provided." \ + instructions: "Send a 'form-data' request to the URL provided. " \ "Then POST the resulting URL as an 'attachment_url' " \ "(json) to api/images/.", } diff --git a/app/mutations/images/stub_policy.rb b/app/mutations/images/stub_policy.rb index af69bc2dcc..26dd4750fd 100644 --- a/app/mutations/images/stub_policy.rb +++ b/app/mutations/images/stub_policy.rb @@ -15,7 +15,7 @@ def execute "GoogleAccessId" => "N/A", "file" => "REPLACE_THIS_WITH_A_BINARY_JPEG_FILE", }, - instructions: "Send a 'from-data' request to the URL provided." \ + instructions: "Send a 'form-data' request to the URL provided." \ "Then POST the resulting URL as an 'attachment_url' " \ "(json) to api/images/.", } diff --git a/frontend/point_groups/criteria/__tests__/apply_test.ts b/frontend/point_groups/criteria/__tests__/apply_test.ts index f51288183a..7e1ee387f4 100644 --- a/frontend/point_groups/criteria/__tests__/apply_test.ts +++ b/frontend/point_groups/criteria/__tests__/apply_test.ts @@ -97,6 +97,18 @@ describe("selectPointsByCriteria()", () => { const result = selectPointsByCriteria(criteria, allPoints, now); expect(result).toEqual([matchingPoint]); }); + + it("doesn't match plant without planted date", () => { + const criteria = fakeCriteria(); + criteria.day = { days_ago: 1, op: "<" }; + const otherPoint = fakePlant(); + otherPoint.body.planted_at = undefined; + otherPoint.body.created_at = "2020-01-20T20:00:00.000Z"; + const allPoints = [otherPoint]; + const now = moment("2020-02-20T20:00:00.000Z"); + const result = selectPointsByCriteria(criteria, allPoints, now); + expect(result).toEqual([]); + }); }); describe("pointsSelectedByGroup()", () => { diff --git a/frontend/point_groups/criteria/apply.ts b/frontend/point_groups/criteria/apply.ts index 28abf12b83..46a6765e7c 100644 --- a/frontend/point_groups/criteria/apply.ts +++ b/frontend/point_groups/criteria/apply.ts @@ -31,16 +31,18 @@ const checkCriteria = .map(([key, value]) => isNumber(value) && compare[criteriaKey](get(point.body, key), value))); case "day": - const pointDate = moment(point.body.pointer_type == "Plant" - && point.body.planted_at + if (dayCriteriaEmpty(criteria.day)) { return true; } + const maybePointDate = point.body.pointer_type == "Plant" ? point.body.planted_at - : point.body.created_at); + : point.body.created_at; + if (!maybePointDate) { return false; } + const pointDate = moment(maybePointDate); const compareDate = moment(now) .subtract(criteria.day.days_ago, "days"); const matchesDays = criteria.day.op == "<" ? pointDate.isAfter(compareDate) : pointDate.isBefore(compareDate); - return matchesDays || dayCriteriaEmpty(criteria.day); + return matchesDays; } }; diff --git a/lib/tasks/fe.rake b/lib/tasks/fe.rake index e8752ce4e2..b145225813 100644 --- a/lib/tasks/fe.rake +++ b/lib/tasks/fe.rake @@ -12,6 +12,11 @@ EXCLUDE = [ reason: "dependency needs", version: "1.4.1", }, + { + packages: ["eslint"], + reason: "breaking changes in", + version: "9", + }, ] # Load package.json as JSON. diff --git a/lib/tasks/releases.rake b/lib/tasks/releases.rake index f23d115d58..4d377a7507 100644 --- a/lib/tasks/releases.rake +++ b/lib/tasks/releases.rake @@ -100,15 +100,19 @@ namespace :releases do end end - def self.post_summary + def self.post_summary(metadata) webhook_url = ENV["RELEASE_WEBHOOK_URL"] if webhook_url server = Release.first.image_url.split("/")[3].split("-")[1] + tag_name = metadata.fetch(:tag_name) title = "current releases: #{server}" - info = title + "\n```#{get_brief_release_info}```" + info = title + info += "\n```#{get_brief_release_info}```" + info += "\n\n<#{metadata.fetch(:html_url)}|#{tag_name}>" + info += "\n#{metadata.fetch(:body)}" payload = { "mrkdwn": true, - "text": title, + "text": title + " (new: #{tag_name})", "blocks": [ { "type": "section", @@ -149,6 +153,6 @@ namespace :releases do release.destroy! end ReleaseTask.print_all_existing_releases - ReleaseTask.post_summary + ReleaseTask.post_summary(json) end end diff --git a/package.json b/package.json index 64c4faf917..ecdaf9607a 100644 --- a/package.json +++ b/package.json @@ -33,69 +33,69 @@ "@parcel/watcher": "2.1.0" }, "dependencies": { - "@blueprintjs/core": "5.10.1", - "@blueprintjs/select": "5.1.3", + "@blueprintjs/core": "5.10.2", + "@blueprintjs/select": "5.1.4", "@monaco-editor/react": "4.6.0", "@parcel/transformer-sass": "2.12.0", "@parcel/transformer-typescript-tsc": "2.12.0", - "@react-three/drei": "9.105.1", - "@react-three/fiber": "8.16.1", - "@types/lodash": "4.17.0", - "@types/markdown-it": "13.0.7", - "@types/node": "20.12.4", + "@react-three/drei": "9.105.6", + "@react-three/fiber": "8.16.5", + "@types/lodash": "4.17.1", + "@types/markdown-it": "14.1.1", + "@types/node": "20.12.11", "@types/promise-timeout": "1.3.3", - "@types/react": "18.2.74", + "@types/react": "18.3.1", "@types/react-color": "3.0.12", - "@types/react-dom": "18.2.24", - "@types/three": "0.163.0", + "@types/react-dom": "18.3.0", + "@types/three": "0.164.0", "@types/ws": "8.5.10", "axios": "1.6.8", "bowser": "2.11.0", "browser-speech": "1.1.1", "events": "3.3.0", "farmbot": "15.8.8", - "i18next": "23.10.1", + "i18next": "23.11.4", "lodash": "4.17.21", "markdown-it": "14.1.0", "markdown-it-emoji": "3.0.0", "moment": "2.30.1", - "monaco-editor": "0.47.0", - "mqtt": "5.5.0", - "npm": "10.5.1", + "monaco-editor": "0.48.0", + "mqtt": "5.5.5", + "npm": "10.7.0", "parcel": "2.12.0", "process": "0.11.10", "promise-timeout": "1.3.0", "punycode": "1.4.1", "querystring-es3": "0.2.1", - "react": "18.2.0", + "react": "18.3.1", "react-color": "2.19.3", - "react-dom": "18.2.0", - "react-redux": "9.1.0", + "react-dom": "18.3.1", + "react-redux": "9.1.2", "redux": "5.0.1", "redux-immutable-state-invariant": "2.1.0", "redux-thunk": "3.1.0", "takeme": "0.12.0", - "three": "0.163.0", - "typescript": "5.4.4", + "three": "0.164.1", + "typescript": "5.4.5", "url": "0.11.3", "xterm": "5.3.0" }, "devDependencies": { "@types/enzyme": "3.10.12", "@types/jest": "29.5.12", - "@types/readable-stream": "4.0.11", - "@typescript-eslint/eslint-plugin": "7.5.0", - "@typescript-eslint/parser": "7.5.0", + "@types/readable-stream": "4.0.12", + "@typescript-eslint/eslint-plugin": "7.8.0", + "@typescript-eslint/parser": "7.8.0", "@wojtekmaj/enzyme-adapter-react-17": "0.8.0", "enzyme": "3.11.0", "eslint": "8.57.0", "eslint-plugin-eslint-comments": "3.2.0", "eslint-plugin-import": "2.29.1", - "eslint-plugin-jest": "27.9.0", + "eslint-plugin-jest": "28.5.0", "eslint-plugin-no-null": "1.0.2", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.34.1", - "eslint-plugin-react-hooks": "4.6.0", + "eslint-plugin-react-hooks": "4.6.2", "jest": "29.7.0", "jest-canvas-mock": "2.5.2", "jest-cli": "29.7.0", @@ -103,11 +103,11 @@ "jest-junit": "16.0.0", "jest-skipped-reporter": "0.0.5", "jshint": "2.13.6", - "madge": "6.1.0", + "madge": "7.0.0", "raf": "3.4.1", "react-addons-test-utils": "15.6.2", - "react-test-renderer": "18.2.0", - "sass": "1.74.1", + "react-test-renderer": "18.3.1", + "sass": "1.77.0", "sass-lint": "1.13.1", "ts-jest": "29.1.2", "tslint": "6.1.3" diff --git a/spec/controllers/api/devices/devices_controller_seed_spec.rb b/spec/controllers/api/devices/devices_controller_seed_spec.rb index 90914b07d5..1bfba2f869 100644 --- a/spec/controllers/api/devices/devices_controller_seed_spec.rb +++ b/spec/controllers/api/devices/devices_controller_seed_spec.rb @@ -45,8 +45,8 @@ def pin_bindings_button_2?(device) device.pin_bindings.find_by(pin_num: 22) end - def plants?(device) - device.plants.count == 11 + def plant_count?(device) + device.plants.count end def sensors_soil_sensor?(device) @@ -320,7 +320,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device)).to_not be expect(pin_bindings_button_2?(device)).to_not be - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device)).to be_kind_of(Sensor) expect(sensors_tool_verification?(device)).to be_kind_of(Sensor) expect(settings_device_name?(device)).to eq(Names::GENESIS) @@ -393,7 +393,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device)).to_not be expect(pin_bindings_button_2?(device)).to_not be - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device).pin).to eq(59) expect(sensors_tool_verification?(device).pin).to eq(63) expect(settings_device_name?(device)).to eq(Names::GENESIS) @@ -466,7 +466,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device).pin).to eq(59) expect(sensors_tool_verification?(device).pin).to eq(63) expect(settings_device_name?(device)).to eq(Names::GENESIS) @@ -539,7 +539,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device).pin).to eq(59) expect(sensors_tool_verification?(device).pin).to eq(63) expect(settings_device_name?(device)).to eq(Names::GENESIS) @@ -614,7 +614,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device).pin).to eq(3) expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device).pin).to eq(59) expect(sensors_tool_verification?(device).pin).to eq(63) expect(settings_device_name?(device)).to eq(Names::GENESIS) @@ -690,7 +690,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device).pin).to eq(3) expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device).pin).to eq(59) expect(sensors_tool_verification?(device).pin).to eq(63) expect(settings_device_name?(device)).to eq(Names::GENESIS) @@ -765,7 +765,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device).pin).to eq(59) expect(sensors_tool_verification?(device).pin).to eq(63) expect(settings_device_name?(device)).to eq(Names::GENESIS_XL) @@ -838,7 +838,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device).pin).to eq(59) expect(sensors_tool_verification?(device).pin).to eq(63) expect(settings_device_name?(device)).to eq(Names::GENESIS_XL) @@ -913,7 +913,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device).pin).to eq(3) expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device).pin).to eq(59) expect(sensors_tool_verification?(device).pin).to eq(63) expect(settings_device_name?(device)).to eq(Names::GENESIS_XL) @@ -988,7 +988,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device).pin).to eq(3) expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device).pin).to eq(59) expect(sensors_tool_verification?(device).pin).to eq(63) expect(settings_device_name?(device)).to eq(Names::GENESIS_XL) @@ -1064,7 +1064,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device)).to_not be expect(sensors_tool_verification?(device)).to_not be expect(settings_device_name?(device)).to eq(Names::EXPRESS) @@ -1133,7 +1133,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device)).to_not be expect(sensors_tool_verification?(device)).to_not be expect(settings_device_name?(device)).to eq(Names::EXPRESS) @@ -1202,7 +1202,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device)).to_not be expect(sensors_tool_verification?(device)).to_not be expect(settings_device_name?(device)).to eq(Names::EXPRESS) @@ -1271,7 +1271,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device)).to_not be expect(sensors_tool_verification?(device)).to_not be expect(settings_device_name?(device)).to eq(Names::EXPRESS_XL) @@ -1340,7 +1340,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device)).to_not be expect(sensors_tool_verification?(device)).to_not be expect(settings_device_name?(device)).to eq(Names::EXPRESS_XL) @@ -1409,7 +1409,7 @@ def check_slot_pairing(slot, expected_name) expect(peripherals_rotary_tool_reverse?(device)).to_not be expect(pin_bindings_button_1?(device).special_action).to eq("emergency_lock") expect(pin_bindings_button_2?(device).special_action).to eq("emergency_unlock") - expect(plants?(device)).to be false + expect(plant_count?(device)).to eq(0) expect(sensors_soil_sensor?(device)).to_not be expect(sensors_tool_verification?(device)).to_not be expect(settings_device_name?(device)).to eq(Names::EXPRESS_XL) @@ -1469,7 +1469,16 @@ def check_slot_pairing(slot, expected_name) it "seeds accounts with demo account data" do start_tests "genesis_1.7", true, true - expect(plants?(device)).to be true + expect(plant_count?(device)).to eq(84) + expect(point_groups_spinach?(device)).to be_kind_of(PointGroup) + expect(point_groups_broccoli?(device)).to be_kind_of(PointGroup) + expect(point_groups_beet?(device)).to be_kind_of(PointGroup) + end + + it "seeds accounts with demo account data: XL" do + start_tests "genesis_xl_1.7", true, true + + expect(plant_count?(device)).to eq(253) expect(point_groups_spinach?(device)).to be_kind_of(PointGroup) expect(point_groups_broccoli?(device)).to be_kind_of(PointGroup) expect(point_groups_beet?(device)).to be_kind_of(PointGroup)