Commit 2b2765f5 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa-allow-for-consolidated-edit-button-in-tests' into 'master'

Allow for consolidated edit button in E2Es

See merge request gitlab-org/gitlab!77216
parents 3b1b0dda 52ad2e11
...@@ -66,6 +66,7 @@ export default { ...@@ -66,6 +66,7 @@ export default {
:variant="variant" :variant="variant"
:category="category" :category="category"
split split
data-qa-selector="action_dropdown"
@click="handleClick(selectedAction, $event)" @click="handleClick(selectedAction, $event)"
> >
<template #button-content> <template #button-content>
...@@ -79,6 +80,7 @@ export default { ...@@ -79,6 +80,7 @@ export default {
:is-check-item="true" :is-check-item="true"
:is-checked="action.key === selectedAction.key" :is-checked="action.key === selectedAction.key"
:secondary-text="action.secondaryText" :secondary-text="action.secondaryText"
:data-qa-selector="`${action.key}_menu_item`"
:data-testid="`action_${action.key}`" :data-testid="`action_${action.key}`"
@click="handleItemClick(action)" @click="handleItemClick(action)"
> >
......
...@@ -23,8 +23,26 @@ module QA ...@@ -23,8 +23,26 @@ module QA
element :delete_file_button, "button_tag 'Delete file'" # rubocop:disable QA/ElementWithPattern element :delete_file_button, "button_tag 'Delete file'" # rubocop:disable QA/ElementWithPattern
end end
view 'app/assets/javascripts/vue_shared/components/web_ide_link.vue' do
element :edit_button
end
view 'app/assets/javascripts/vue_shared/components/actions_button.vue' do
element :action_dropdown
element :edit_menu_item, ':data-qa-selector="`${action.key}_menu_item`"' # rubocop:disable QA/ElementWithPattern
end
def click_edit def click_edit
click_on 'Edit' # TODO: remove this condition and else part once ff :consolidated_edit_button is enabled by default
if has_element?(:action_dropdown)
within_element(:action_dropdown) do
click_button(class: 'dropdown-toggle-split')
click_element(:edit_menu_item)
click_element(:edit_button)
end
else
click_on 'Edit'
end
end end
def click_delete def click_delete
......
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