Created
July 19, 2018 09:02
-
-
Save somethvictory/1dfcc8c58ef536fa88fc78197952a415 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
RSpec.feature 'Dashboard', type: :feature, js: true do | |
let!(:robot1) { FactoryBot.create(:robot, :qa_passed) } | |
let!(:robot2) { FactoryBot.create(:robot, :factory_second) } | |
let!(:robot3) { FactoryBot.create(:robot) } | |
let!(:robot4) { FactoryBot.create(:robot, :with_shipment) } | |
background { visit root_path } | |
scenario 'send shipment' do | |
expect(page).to have_content('Ready to ship') | |
within '.qa-passed' do | |
click_button 'Add to shipment' | |
end | |
within '.factory-second' do | |
click_button 'Add to shipment' | |
end | |
within '.shipping-list' do | |
click_button 'Send shipment' | |
end | |
expect(page).to have_content("Robots #{robot1.id}, #{robot2.id} is shipped successfully.") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment