Commit e57d2eed authored by Sanad Liaquat's avatar Sanad Liaquat

Stablize register user spec

parent 029d4eea
...@@ -98,6 +98,12 @@ module QA ...@@ -98,6 +98,12 @@ module QA
super super
end end
def exists?
api_get
rescue ResourceNotFoundError
false
end
def api_delete def api_delete
super super
......
...@@ -64,6 +64,7 @@ module QA ...@@ -64,6 +64,7 @@ module QA
Page::Profile::Accounts::Show.perform do |show| Page::Profile::Accounts::Show.perform do |show|
show.delete_account(user.password) show.delete_account(user.password)
end end
Support::Waiter.wait_until { !user.exists? }
end end
it 'allows recreating with same credentials', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347868' do it 'allows recreating with same credentials', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347868' do
...@@ -83,7 +84,7 @@ module QA ...@@ -83,7 +84,7 @@ module QA
end end
after do after do
@recreated_user.remove_via_api! @recreated_user&.remove_via_api!
end end
def admin_api_client def admin_api_client
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment