mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 09:42:36 +02:00
theoretical fix for occasional missing field in tests
This commit is contained in:
parent
f00214758c
commit
69b636d477
1 changed files with 7 additions and 0 deletions
|
@ -7,8 +7,15 @@ end
|
||||||
describe 'signup' do
|
describe 'signup' do
|
||||||
include Capybara::DSL
|
include Capybara::DSL
|
||||||
|
|
||||||
|
def wait_for_ajax
|
||||||
|
Timeout.timeout(Capybara.default_wait_time) do
|
||||||
|
loop until page.evaluate_script('jQuery.active').zero?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def fill_in_valid
|
def fill_in_valid
|
||||||
@site = Fabricate.attributes_for(:site)
|
@site = Fabricate.attributes_for(:site)
|
||||||
|
wait_for_ajax
|
||||||
fill_in 'username', with: @site[:username]
|
fill_in 'username', with: @site[:username]
|
||||||
fill_in 'password', with: @site[:password]
|
fill_in 'password', with: @site[:password]
|
||||||
fill_in 'email', with: @site[:email]
|
fill_in 'email', with: @site[:email]
|
||||||
|
|
Loading…
Add table
Reference in a new issue