Skip to content

Commit

Permalink
[#58737] fix flaky watcher tab spec (#17162)
Browse files Browse the repository at this point in the history
* [#58737] fix flaky watcher tab spec

* fix typo
  • Loading branch information
EinLama authored Nov 12, 2024
1 parent 2467041 commit b662b64
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/features/work_packages/tabs/watcher_tab_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@
let(:work_package) { create(:work_package, project:) }
let(:tabs) { Components::WorkPackages::Tabs.new(work_package) }
let(:role) { create(:project_role, permissions:) }
let(:user) { create(:user, member_with_roles: { project => role }) }
let(:permissions) do
%i(view_work_packages
view_work_package_watchers
delete_work_package_watchers
add_work_package_watchers)
end

# Ensure users are eagerly created (and at top level). #58737 was caused by `other_user` not being there
# in time for some cases => flaky user auto completer specs
let!(:user) { create(:user, member_with_roles: { project => role }) }
let!(:other_user) { create(:user, firstname: "Other", member_with_roles: { project => role }) }

let(:watch_button) { find_by_id "watch-button" }
let(:watchers_tab) { find(".op-tab-row--link_selected", text: "WATCHERS") }

Expand Down Expand Up @@ -113,9 +117,7 @@ def expect_button_is_not_watching
it_behaves_like "watch and unwatch with button"
end

context "when auto completing users", skip: "Flaky test, see #58737" do
let!(:other_user) { create(:user, firstname: "Other", member_with_roles: { project => role }) }

context "when auto completing users" do
it "shows only the email address of the current user by default" do
autocomplete = find(".wp-watcher--autocomplete ng-select")
target_dropdown = search_autocomplete autocomplete,
Expand Down

0 comments on commit b662b64

Please sign in to comment.