Skip to content

Commit

Permalink
As per review, visit page directly to save time
Browse files Browse the repository at this point in the history
We still visit the page as user would do once to make sure it is
working.
  • Loading branch information
rioug committed Sep 22, 2023
1 parent 03ce39d commit 19fc1fa
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@
end

it "generates the report" do
visit_sales_tax_totals_by_order
# Check we can access the report as user would do.
# For speed sake we'll use `visit_sales_tax_totals_by_order` helper for the rest of the spec
login_as admin
visit admin_reports_path
click_on "Sales Tax Totals By Order"

expect(page).to have_button("Go")
click_on "Go"
Expand Down Expand Up @@ -464,8 +468,10 @@

def visit_sales_tax_totals_by_order
login_as admin
visit admin_reports_path
click_on "Sales Tax Totals By Order"
visit admin_report_path(
report_type: :sales_tax,
report_subtype: :sales_tax_totals_by_order
)
end

def generate_report
Expand Down

0 comments on commit 19fc1fa

Please sign in to comment.