Fix typo with vacuum peripherals, continue 1.3 testing
parent
39ebf11ad8
commit
ea400faf3e
|
@ -23,11 +23,11 @@ module Devices
|
|||
:plants,
|
||||
|
||||
# PERIPHERALS ============================
|
||||
:peripherals_vacuum,
|
||||
:peripherals_water,
|
||||
:peripherals_lighting,
|
||||
:peripherals_peripheral_4,
|
||||
:peripherals_peripheral_5,
|
||||
:peripherals_vacuum,
|
||||
:peripherals_water,
|
||||
|
||||
# PIN BINDINGS ===========================
|
||||
:pin_bindings_button_1,
|
||||
|
@ -81,11 +81,26 @@ module Devices
|
|||
PLANTS.map { |x| Points::Create.run!(x, device: device) }
|
||||
end
|
||||
|
||||
def peripherals_lighting; end
|
||||
def peripherals_peripheral_4; end
|
||||
def peripherals_peripheral_5; end
|
||||
def peripherals_vacuum; end
|
||||
def peripherals_water; end
|
||||
def peripherals_lighting
|
||||
add_peripheral(7, ToolNames::LIGHTING)
|
||||
end
|
||||
|
||||
def peripherals_peripheral_4
|
||||
add_peripheral(10, "Peripheral 4")
|
||||
end
|
||||
|
||||
def peripherals_peripheral_5
|
||||
add_peripheral(12, "Peripheral 5")
|
||||
end
|
||||
|
||||
def peripherals_vacuum
|
||||
add_peripheral(9, ToolNames::VACUUM)
|
||||
end
|
||||
|
||||
def peripherals_water
|
||||
add_peripheral(8, ToolNames::WATER)
|
||||
end
|
||||
|
||||
def pin_bindings_button_1; end
|
||||
def pin_bindings_button_2; end
|
||||
def sensors_soil_sensor; end
|
||||
|
|
|
@ -1,6 +1,19 @@
|
|||
module Devices
|
||||
module Seeders
|
||||
class GenesisOneThree < AbstractSeeder
|
||||
class GenesisOneThree < AbstractGenesis
|
||||
def peripherals_vacuum
|
||||
add_peripheral(9, ToolNames::VACUUM)
|
||||
end
|
||||
|
||||
def peripherals_water
|
||||
add_peripheral(8, ToolNames::WATER)
|
||||
end
|
||||
|
||||
def settings_firmware
|
||||
device
|
||||
.fbos_config
|
||||
.update_attributes!(firmware_hardware: FbosConfig::FARMDUINO)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
module Devices
|
||||
module Seeders
|
||||
class GenesisOneTwo < AbstractGenesis
|
||||
def peripherals_water
|
||||
def peripherals_vacuum
|
||||
add_peripheral(10, ToolNames::VACUUM)
|
||||
end
|
||||
|
||||
def peripherals_vacuum
|
||||
def peripherals_water
|
||||
add_peripheral(9, ToolNames::WATER)
|
||||
end
|
||||
|
||||
|
@ -14,6 +14,10 @@ module Devices
|
|||
.fbos_config
|
||||
.update_attributes!(firmware_hardware: FbosConfig::ARDUINO)
|
||||
end
|
||||
|
||||
def peripherals_lighting; end
|
||||
def peripherals_peripheral_4; end
|
||||
def peripherals_peripheral_5; end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -187,21 +187,21 @@ describe Api::DevicesController do
|
|||
expect(device.reload.plants.count).to eq(count)
|
||||
end
|
||||
|
||||
def start_tests
|
||||
def start_tests(product_line)
|
||||
sign_in user
|
||||
run_jobs_now { post :seed, params: { product_line: "genesis_1.2" } }
|
||||
run_jobs_now { post :seed, params: { product_line: product_line } }
|
||||
expect(response.status).to eq(200)
|
||||
device.reload
|
||||
end
|
||||
|
||||
it "seeds accounts with Genesis 1.2 data" do
|
||||
start_tests
|
||||
start_tests "genesis_1.2"
|
||||
|
||||
expect(peripherals_lighting?(device)).to_not be
|
||||
expect(peripherals_peripheral_4?(device)).to_not be
|
||||
expect(peripherals_peripheral_5?(device)).to_not be
|
||||
expect(peripherals_vacuum?(device).pin).to be(10)
|
||||
expect(peripherals_water?(device).pin).to be(9)
|
||||
expect(peripherals_vacuum?(device).pin).to eq(10)
|
||||
expect(peripherals_water?(device).pin).to eq(9)
|
||||
expect(pin_bindings_button_1?(device)).to_not be
|
||||
expect(pin_bindings_button_2?(device)).to_not be
|
||||
expect(plants?(device)).to be true
|
||||
|
@ -236,5 +236,48 @@ describe Api::DevicesController do
|
|||
expect(settings_default_map_size_x?(device)).to eq(3000)
|
||||
expect(settings_default_map_size_y?(device)).to eq(1500)
|
||||
end
|
||||
|
||||
it "seeds accounts with Genesis 1.3 data" do
|
||||
start_tests "genesis_1.3"
|
||||
|
||||
expect(peripherals_lighting?(device).pin).to eq(7)
|
||||
# expect(peripherals_peripheral_4?(device)).to_not be
|
||||
# expect(peripherals_peripheral_5?(device)).to_not be
|
||||
# expect(peripherals_vacuum?(device).pin).to be(10)
|
||||
# expect(peripherals_water?(device).pin).to be(9)
|
||||
# expect(pin_bindings_button_1?(device)).to_not be
|
||||
# expect(pin_bindings_button_2?(device)).to_not be
|
||||
# expect(plants?(device)).to be true
|
||||
# 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("FarmBot Genesis")
|
||||
# expect(settings_enable_encoders?(device)).to be(true)
|
||||
# expect(settings_firmware?(device)).to eq("arduino")
|
||||
# expect(tool_slots_slot_1?(device).name).to eq("Seeder")
|
||||
# expect(tool_slots_slot_2?(device).name).to eq("Seed Bin")
|
||||
# expect(tool_slots_slot_3?(device).name).to eq("Seed Tray")
|
||||
# expect(tool_slots_slot_4?(device).name).to eq("Watering Nozzle")
|
||||
# expect(tool_slots_slot_5?(device).name).to eq("Soil Sensor")
|
||||
# expect(tool_slots_slot_6?(device).name).to eq("Weeder")
|
||||
# expect(tools_seed_bin?(device)).to be
|
||||
# expect(tools_seed_tray?(device)).to be
|
||||
# expect(tools_seed_trough_1?(device)).to_not be
|
||||
# expect(tools_seed_trough_2?(device)).to_not be
|
||||
# expect(tools_seed_trough_3?(device)).to_not be
|
||||
# expect(tools_seeder?(device)).to be_kind_of(Tool)
|
||||
# expect(tools_soil_sensor?(device)).to be_kind_of(Tool)
|
||||
# expect(tools_watering_nozzle?(device)).to be_kind_of(Tool)
|
||||
# expect(tools_weeder?(device)).to be_kind_of(Tool)
|
||||
# expect(sequences_mount_tool?(device)).to be
|
||||
# expect(sequences_pickup_seed_genesis?(device)).to be
|
||||
# expect(sequences_pickup_seed_express?(device)).to_not be
|
||||
# expect(sequences_plant_seed?(device)).to be_kind_of(Sequence)
|
||||
# expect(sequences_take_photo_of_plant?(device)).to be_kind_of(Sequence)
|
||||
# expect(sequences_tool_error?(device)).to be_kind_of(Sequence)
|
||||
# expect(sequences_unmount_tool?(device)).to be_kind_of(Sequence)
|
||||
# expect(sequences_water_plant?(device)).to be_kind_of(Sequence)
|
||||
# expect(settings_default_map_size_x?(device)).to eq(3000)
|
||||
# expect(settings_default_map_size_y?(device)).to eq(1500)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue