Explicitly use rack driver in notifications spec

The filter "Mark as viewed" doesn't work properly, so here's a case
where the test would fail with JavaScript not because the test is wrong,
but due to a bug.

For now we're keeping the test as it was, but eventually we'll have to
fix the bug.
This commit is contained in:
Javi Martín
2021-03-27 00:28:28 +01:00
parent 6a509a7437
commit 5f0c422eb3
2 changed files with 5 additions and 1 deletions

View File

@@ -60,6 +60,10 @@ RSpec.configure do |config|
driven_by :headless_chrome driven_by :headless_chrome
end end
config.before(:each, type: :system, no_js: true) do
driven_by :rack_test
end
config.before(:each, type: :system) do config.before(:each, type: :system) do
Bullet.start_request Bullet.start_request
allow(InvisibleCaptcha).to receive(:timestamp_threshold).and_return(0) allow(InvisibleCaptcha).to receive(:timestamp_threshold).and_return(0)

View File

@@ -75,7 +75,7 @@ describe "Moderate proposal notifications" do
expect(author.reload).to be_hidden expect(author.reload).to be_hidden
end end
scenario "Ignore the proposal" do scenario "Ignore the proposal", :no_js do
click_button "Mark as viewed" click_button "Mark as viewed"
expect(proposal_notification.reload).to be_ignored expect(proposal_notification.reload).to be_ignored