Commit ffb17a3b authored by Sanad Liaquat's avatar Sanad Liaquat

Use qa element with wait

parent 88189d31
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
= container_title = container_title
.form-group .form-group
.input-group .input-group
= text_field_tag 'created-personal-access-token', new_token_value, readonly: true, class: "form-control js-select-on-focus", 'aria-describedby' => "created-token-help-block" = text_field_tag 'created-personal-access-token', new_token_value, readonly: true, class: "qa-created-personal-access-token form-control js-select-on-focus", 'aria-describedby' => "created-token-help-block"
%span.input-group-append %span.input-group-append
= clipboard_button(text: new_token_value, title: clipboard_button_title, placement: "left", class: "input-group-text btn-default btn-clipboard") = clipboard_button(text: new_token_value, title: clipboard_button_title, placement: "left", class: "input-group-text btn-default btn-clipboard")
%span#created-token-help-block.form-text.text-muted.text-danger Make sure you save it - you won't be able to access it again. %span#created-token-help-block.form-text.text-muted.text-danger Make sure you save it - you won't be able to access it again.
......
...@@ -9,9 +9,8 @@ module QA ...@@ -9,9 +9,8 @@ module QA
end end
view 'app/views/shared/_personal_access_tokens_created_container.html.haml' do view 'app/views/shared/_personal_access_tokens_created_container.html.haml' do
element :create_token_field, "text_field_tag 'created-personal-access-token'" # rubocop:disable QA/ElementWithPattern element :created_personal_access_token
end end
view 'app/views/shared/_personal_access_tokens_table.html.haml' do view 'app/views/shared/_personal_access_tokens_table.html.haml' do
element :revoke_button element :revoke_button
end end
...@@ -29,7 +28,7 @@ module QA ...@@ -29,7 +28,7 @@ module QA
end end
def created_access_token def created_access_token
page.find('#created-personal-access-token').value find_element(:created_personal_access_token, wait: 30).value
end end
def has_token_row_for_name?(token_name) def has_token_row_for_name?(token_name)
......
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