Spec Cleanup: Stub Elasticsearch for js: true Specs that Dont Need it (#8453)
This commit is contained in:
parent
06bb041a6e
commit
3f12b62910
5 changed files with 8 additions and 8 deletions
|
|
@ -17,7 +17,7 @@ RSpec.describe "User visits a homepage", type: :system do
|
|||
expect(page).to have_selector(".crayons-story--featured", visible: :visible)
|
||||
end
|
||||
|
||||
it "shows the main article readable date", js: true, elasticsearch: "FeedContent" do
|
||||
it "shows the main article readable date", js: true, stub_elasticsearch: true do
|
||||
expect(page).to have_selector(".crayons-story--featured time", text: "Mar 4")
|
||||
end
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ RSpec.describe "User visits a homepage", type: :system do
|
|||
expect(page).to have_text(article2.title)
|
||||
end
|
||||
|
||||
it "shows all articles dates", js: true, elasticsearch: "FeedContent" do
|
||||
it "shows all articles dates", js: true, stub_elasticsearch: true do
|
||||
expect(page).to have_selector(".crayons-story time", text: "Mar 4", count: 2)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ RSpec.describe "Organization index", type: :system do
|
|||
context "when 2 articles" do
|
||||
before { visit "/#{organization.slug}" }
|
||||
|
||||
it "shows the header", js: true do
|
||||
it "shows the header", js: true, stub_elasticsearch: true do
|
||||
within("h1") { expect(page).to have_content(organization.name) }
|
||||
within("div.profile-details") do
|
||||
expect(page).to have_button("Follow")
|
||||
|
|
@ -36,7 +36,7 @@ RSpec.describe "Organization index", type: :system do
|
|||
end
|
||||
|
||||
context "when more articles" do
|
||||
it "visits ok", js: true, percy: true do
|
||||
it "visits ok", js: true, percy: true, stub_elasticsearch: true do
|
||||
create_list(:article, 3, organization: organization)
|
||||
visit "/#{organization.slug}"
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ RSpec.describe "Organization index", type: :system do
|
|||
user.follows.create(followable: organization)
|
||||
end
|
||||
|
||||
it "shows the correct button", js: true do
|
||||
it "shows the correct button", js: true, stub_elasticsearch: true do
|
||||
visit "/#{organization.slug}"
|
||||
|
||||
within(".profile-details") do
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe "Display Jobs Banner spec", type: :system, js: true do
|
||||
RSpec.describe "Display Jobs Banner spec", type: :system, js: true, stub_elasticsearch: true do
|
||||
before do
|
||||
allow(SiteConfig).to receive(:jobs_url).and_return("www.very_cool_jobs_website.com")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ RSpec.describe "User comments", type: :system do
|
|||
end
|
||||
end
|
||||
|
||||
it "shows user's comments", js: true, percy: true, elasticsearch: "FeedContent" do
|
||||
it "shows user's comments", js: true, percy: true, stub_elasticsearch: true do
|
||||
Percy.snapshot(page, name: "Comments: /:user_id/comments renders")
|
||||
|
||||
within("#substories div.index-comments") do
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ RSpec.describe "Using the editor", type: :system do
|
|||
end
|
||||
end
|
||||
|
||||
describe "using v2 editor", js: true do
|
||||
describe "using v2 editor", js: true, stub_elasticsearch: true do
|
||||
before { user.update(editor_version: "v2") }
|
||||
|
||||
it "fill out form with rich content and click publish" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue