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

DEV: Capture logs for all tests in spec/system/assign_topic_spec.rb #542

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Changes from all commits
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: 8 additions & 4 deletions spec/system/assign_topic_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Assign | Assigning topics", type: :system, js: true do
describe "Assign | Assigning topics", type: :system, capture_log: true do
let(:topic_page) { PageObjects::Pages::Topic.new }
let(:assign_modal) { PageObjects::Modals::Assign.new }
fab!(:staff_user) { Fabricate(:user, groups: [Group[:staff]]) }
Expand All @@ -10,6 +10,10 @@

before do
SiteSetting.assign_enabled = true

# The system tests in this file are flaky and auth token related so turning this on
SiteSetting.verbose_auth_token_logging = true
Comment on lines +14 to +15
Copy link
Contributor

Choose a reason for hiding this comment

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

😿

Lol would be funny if you turn it on and it stops flaking.


sign_in(admin)
end

Expand All @@ -34,7 +38,7 @@
context "when assigns are not public" do
before { SiteSetting.assigns_public = false }

it "assigned small action post has 'private-assign' in class attribute", capture_log: true do
it "assigned small action post has 'private-assign' in class attribute" do
visit "/t/#{topic.id}"

topic_page.click_assign_topic
Expand Down Expand Up @@ -73,7 +77,7 @@
expect(page).to have_no_css("#topic .assigned-to")
end

it "can assign the previous assignee", capture_log: true do
it "can assign the previous assignee" do
visit "/t/#{topic.id}"

topic_page.click_assign_topic
Expand Down Expand Up @@ -103,7 +107,7 @@
context "when reassign_on_open is set to true" do
before { SiteSetting.reassign_on_open = true }

it "reassigns the topic on open", capture_log: true do
it "reassigns the topic on open" do
visit "/t/#{topic.id}"

topic_page.click_assign_topic
Expand Down