Commit 47c4690e authored by Mark Lapierre's avatar Mark Lapierre

Wait for design tab to be active

The design management test tries to change the style of an element on
the design tab immediately after clicking the link to switch to the
tab. This change waits for the tab to become active after clicking it.
parent cfed1f7c
......@@ -5,13 +5,13 @@
= _('Discussion')
%span.badge.badge-pill.js-discussions-count
%li
= link_to '#designs-tab', class: 'js-issue-tabs', id: 'designs', role: 'tab', 'aria-controls': 'js-designs', 'aria-selected': 'false', data: { toggle: 'tab', target: '#designs-tab', qa_selector: 'designs_tab' } do
= link_to '#designs-tab', class: 'js-issue-tabs', id: 'designs', role: 'tab', 'aria-controls': 'js-designs', 'aria-selected': 'false', data: { toggle: 'tab', target: '#designs-tab', qa_selector: 'designs_tab_link' } do
= _('Designs')
%span.badge.badge-pill.js-designs-count
.tab-content
#discussion-tab.tab-pane.show.active{ role: 'tabpanel', 'aria-labelledby': 'discussion' }
= render_ce 'projects/issues/discussion'
#designs-tab.tab-pane{ role: 'tabpanel', 'aria-labelledby': 'designs' }
#designs-tab.tab-pane{ role: 'tabpanel', 'aria-labelledby': 'designs', data: { qa_selector: 'designs_tab_content'} }
#js-design-management{ data: { project_path: @project.full_path, issue_iid: @issue.iid, issue_path: project_issue_path(@project, @issue) } }
- else
= render_ce 'projects/issues/discussion'
......@@ -33,13 +33,15 @@ module QA
end
view 'ee/app/views/projects/issues/_discussion.html.haml' do
element :designs_tab
element :designs_tab_link
element :designs_tab_content
end
end
end
def click_designs_tab
click_element(:designs_tab)
click_element(:designs_tab_link)
active_element?(:designs_tab_content)
end
def click_remove_weight_link
......
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