Commit 52ad2e11 authored by Anastasia McDonald's avatar Anastasia McDonald Committed by Sanad Liaquat

Allow for consolidated edit button in E2Es

parent 32dd97c8
......@@ -66,6 +66,7 @@ export default {
:variant="variant"
:category="category"
split
data-qa-selector="action_dropdown"
@click="handleClick(selectedAction, $event)"
>
<template #button-content>
......@@ -79,6 +80,7 @@ export default {
:is-check-item="true"
:is-checked="action.key === selectedAction.key"
:secondary-text="action.secondaryText"
:data-qa-selector="`${action.key}_menu_item`"
:data-testid="`action_${action.key}`"
@click="handleItemClick(action)"
>
......
......@@ -23,9 +23,27 @@ module QA
element :delete_file_button, "button_tag 'Delete file'" # rubocop:disable QA/ElementWithPattern
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
# 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
def click_delete
click_on '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