Commit c9171836 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Just add a new class to locate the expand button

parent 45d0be83
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.settings-header .settings-header
%h4 %h4
Deploy Keys Deploy Keys
%button.btn.js-settings-toggle %button.btn.js-settings-toggle.qa-expand-deploy-keys
= expanded ? 'Collapse' : 'Expand' = expanded ? 'Collapse' : 'Expand'
%p %p
Deploy keys allow read-only or read-write (if enabled) access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one. Deploy keys allow read-only or read-write (if enabled) access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one.
......
...@@ -5,11 +5,7 @@ module QA ...@@ -5,11 +5,7 @@ module QA
class Repository < Page::Base class Repository < Page::Base
def expand(title) def expand(title)
page.within('#content-body') do page.within('#content-body') do
find( find('.qa-expand-deploy-keys').click
:xpath,
"//button[contains(text(), 'Expand')]" +
"[../h4[contains(text(), '#{title}')]]"
).click
end end
end end
end end
......
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