Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orders spec update #8264

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions spec/system/admin/orders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,22 @@
end

context "select/unselect all orders" do
it "by clicking on the checkbox in the table header" do

before do
login_as_admin_and_visit spree.admin_orders_path
end

it "by clicking on the checkbox in the table header" do
# select all orders
page.find("#listing_orders thead th:first-child input[type=checkbox]").click
expect(page.find("#listing_orders tbody tr td:first-child input[type=checkbox]")).to be_checked
# enables print invoices button
expect(page).to have_button('Print Invoices', disabled: false)
# unselect all orders
page.find("#listing_orders thead th:first-child input[type=checkbox]").click
expect(page.find("#listing_orders tbody tr td:first-child input[type=checkbox]")).to_not be_checked
# disables print invoices button
expect(page).to have_button('Print Invoices', disabled: true)
end
end

Expand Down Expand Up @@ -179,6 +186,7 @@
fill_in "Email", with: user.email
fill_in "First name begins with", with: "J"
fill_in "Last name begins with", with: "D"
byebug
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this from the Git history before submitting a PR. The easiest way I find is to make a single commit that just removes the line, then do an interactive rebase and put the fixup commit directly under the commit with the mistake and mark it as "fixup". The two commits then get merged into one and it's like this line never happened. 😄

find('#q_completed_at_gteq').click
select_date_from_datepicker Time.zone.at(1.week.ago)
find('#q_completed_at_lteq').click
Expand Down