Skip to content

Commit

Permalink
Do time travel when page is actually rendered. Ugh.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Jan 24, 2024
1 parent f455ee9 commit 72cb3e3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions spec/features/comment_to_authority_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@

describe "accessibility tests in new design", js: true do
before do
sign_in create(:confirmed_user, tailwind_theme: true, name: "Jane Ng")
visit(application_path(application))
# Note that we're ensuring that the application has a static first_date_scraped and we freeze the current
# time so that the page should always have the same text on it
Timecop.freeze(Date.new(2023, 6, 1)) do
sign_in create(:confirmed_user, tailwind_theme: true, name: "Jane Ng")
visit(application_path(application))
end
end

it "page passes most" do
Expand All @@ -58,11 +62,7 @@

# rubocop:disable RSpec/NoExpectationExample
it "renders a snapshot for a visual diff", js: true do
# Note that we're ensuring that the application has a static first_date_scraped and we freeze the current
# time so that the page should always have the same text on it
Timecop.freeze(Date.new(2023, 6, 1)) do
page.percy_snapshot("Application")
end
page.percy_snapshot("Application")
end
# rubocop:enable RSpec/NoExpectationExample
end
Expand Down

0 comments on commit 72cb3e3

Please sign in to comment.