mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 10:02:33 +08:00
DEV: Revert flaky specs fix attempts (#29472)
This commit is contained in:
parent
921e7b275b
commit
e5ac69fd65
|
@ -5,7 +5,6 @@ module PageObjects
|
||||||
class Base
|
class Base
|
||||||
include Capybara::DSL
|
include Capybara::DSL
|
||||||
include RSpec::Matchers
|
include RSpec::Matchers
|
||||||
include SystemHelpers
|
|
||||||
|
|
||||||
BODY_SELECTOR = ""
|
BODY_SELECTOR = ""
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,8 @@ module PageObjects
|
||||||
click("#login-link")
|
click("#login-link")
|
||||||
end
|
end
|
||||||
|
|
||||||
def click_create_account(expect_success: true)
|
def click_create_account
|
||||||
try_until_success(timeout: 5) do
|
click(".modal.create-account .btn-primary")
|
||||||
click(".modal.create-account .btn-primary")
|
|
||||||
if expect_success
|
|
||||||
expect(page).to have_css(".modal.create-account .btn-primary.is-loading")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_password_input?
|
def has_password_input?
|
||||||
|
|
|
@ -31,11 +31,8 @@ module PageObjects
|
||||||
click("#login-link")
|
click("#login-link")
|
||||||
end
|
end
|
||||||
|
|
||||||
def click_create_account(expect_success: true)
|
def click_create_account
|
||||||
try_until_success(timeout: 5) do
|
click(".signup-fullpage .btn-primary")
|
||||||
click(".signup-fullpage .btn-primary")
|
|
||||||
expect(page).to have_css(".signup-fullpage .btn-primary.is-loading") if expect_success
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_password_input?
|
def has_password_input?
|
||||||
|
|
|
@ -96,7 +96,7 @@ shared_examples "signup scenarios" do |signup_page_object, login_page_object|
|
||||||
.fill_code("pudding")
|
.fill_code("pudding")
|
||||||
expect(signup_form).to have_valid_fields
|
expect(signup_form).to have_valid_fields
|
||||||
|
|
||||||
signup_form.click_create_account(expect_success: false)
|
signup_form.click_create_account
|
||||||
expect(signup_form).to have_content(I18n.t("login.wrong_invite_code"))
|
expect(signup_form).to have_content(I18n.t("login.wrong_invite_code"))
|
||||||
expect(signup_form).to have_no_css(".account-created")
|
expect(signup_form).to have_no_css(".account-created")
|
||||||
end
|
end
|
||||||
|
@ -131,7 +131,7 @@ shared_examples "signup scenarios" do |signup_page_object, login_page_object|
|
||||||
.fill_email("johndoe@example.com")
|
.fill_email("johndoe@example.com")
|
||||||
.fill_username("john")
|
.fill_username("john")
|
||||||
.fill_password("supersecurepassword")
|
.fill_password("supersecurepassword")
|
||||||
.click_create_account(expect_success: false)
|
.click_create_account
|
||||||
expect(signup_form).to have_content(I18n.t("js.user_fields.required", name: "Occupation"))
|
expect(signup_form).to have_content(I18n.t("js.user_fields.required", name: "Occupation"))
|
||||||
expect(signup_form).to have_no_css(".account-created")
|
expect(signup_form).to have_no_css(".account-created")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user