diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2019-01-29 23:56:34 +0300 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2019-01-30 00:18:04 +0300 |
commit | 38fcb11f97d02af83cdc5d245e78a3f0d1b146f5 (patch) | |
tree | dd60f30771b8dbc2c846468dd5604f7d701cd634 /app/views/shared | |
parent | fda30abdb2a88f360b20f99f3cefe0850d4e9f18 (diff) |
Fix flaky wiki create test
There's an svg on the page that allows you to create a wiki page.
The svg takes a fraction of a second to load after which the
"Create your first page" button shifts up a bit. This can cause
webdriver to miss the hit so we wait for the svg to load before
clicking the button.
Also update the elements used in the test to conform to our best
practice.
And replace `act` with `perform`
Finally, remove the `before` block and `login` method, making the
code slightly simpler.
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/empty_states/_wikis.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/empty_states/_wikis_layout.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/shared/empty_states/_wikis.html.haml b/app/views/shared/empty_states/_wikis.html.haml index df3308abe0d..73eedcc1dc9 100644 --- a/app/views/shared/empty_states/_wikis.html.haml +++ b/app/views/shared/empty_states/_wikis.html.haml @@ -2,7 +2,7 @@ - if can?(current_user, :create_wiki, @project) - create_path = project_wiki_path(@project, params[:id], { view: 'create' }) - - create_link = link_to s_('WikiEmpty|Create your first page'), create_path, class: 'btn btn-success', title: s_('WikiEmpty|Create your first page') + - create_link = link_to s_('WikiEmpty|Create your first page'), create_path, class: 'btn btn-success qa-create-first-page-link', title: s_('WikiEmpty|Create your first page') = render layout: layout_path, locals: { image_path: 'illustrations/wiki_login_empty.svg' } do %h4.text-left diff --git a/app/views/shared/empty_states/_wikis_layout.html.haml b/app/views/shared/empty_states/_wikis_layout.html.haml index a5f100e3469..d44017299b8 100644 --- a/app/views/shared/empty_states/_wikis_layout.html.haml +++ b/app/views/shared/empty_states/_wikis_layout.html.haml @@ -1,6 +1,6 @@ .row.empty-state .col-12 - .svg-content + .svg-content.qa-svg-content = image_tag image_path .col-12 .text-content.text-center |