Skip to content

Commit 2788719

Browse files
committed
attempt to fix flickering spec
1 parent 0bf34c8 commit 2788719

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spec/features/users/create_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,6 @@
129129

130130
allow(User).to receive(:current).and_call_original
131131

132-
visit "/account/activate?token=#{token}"
133-
end
134-
135-
it "shows the login form prompting the user to login" do
136-
expect(page).to have_text "Please login as bob to activate your account."
137-
end
138-
139-
it "registers the user upon submission" do
140132
user = User.find_by login: "bob"
141133

142134
allow(User)
@@ -149,10 +141,18 @@
149141
allow(auth_source)
150142
.to(receive(:authenticate).with("bob", "dummy"))
151143
.and_return({ dn: "cn=bob,ou=users,dc=example,dc=com" })
144+
end
145+
146+
it "registers the user upon submission" do
147+
visit "/account/activate?token=#{token}"
148+
wait_for_reload
149+
150+
expect(page).to have_text "Please login as bob to activate your account."
152151

153152
fill_in "password", with: "dummy" # accepted by DummyAuthSource
154153
click_button "Sign in", type: "submit"
155-
wait_for_network_idle
154+
155+
wait_for_reload
156156

157157
# landed on the 'my page'
158158
expect(page).to have_text "Welcome to OpenProject, bobfirst boblast"

0 commit comments

Comments
 (0)