@@ -18,8 +18,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
1818 const PageObjects = getPageObjects ( [ 'security' , 'common' ] ) ;
1919 const toasts = getService ( 'toasts' ) ;
2020
21- // Failing: See https://github.com/elastic/kibana/issues/91592
22- describe . skip ( 'Dashboard Edit Panel' , ( ) => {
21+ const PANEL_TITLE = 'Visualization PieChart' ;
22+
23+ describe ( 'Dashboard Edit Panel' , ( ) => {
2324 before ( async ( ) => {
2425 await esArchiver . load ( 'dashboard/drilldowns' ) ;
2526 await esArchiver . loadIfNeeded ( 'logstash_functional' ) ;
@@ -33,100 +34,68 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
3334 await esArchiver . unload ( 'dashboard/drilldowns' ) ;
3435 } ) ;
3536
36- // embeddable edit panel
37- it ( ' A11y test on dashboard edit panel menu options' , async ( ) => {
38- await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
37+ it ( 'can open menu' , async ( ) => {
38+ await dashboardPanelActions . openContextMenu ( ) ;
3939 await a11y . testAppSnapshot ( ) ;
4040 } ) ;
4141
42- // https://github.com/elastic/kibana/issues/77931
43- it . skip ( 'A11y test for edit visualization and save' , async ( ) => {
44- await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
45- await testSubjects . click ( 'embeddablePanelAction-editPanel' ) ;
46- await testSubjects . click ( 'visualizesaveAndReturnButton' ) ;
42+ it ( 'can clone panel' , async ( ) => {
43+ await dashboardPanelActions . clonePanelByTitle ( PANEL_TITLE ) ;
4744 await a11y . testAppSnapshot ( ) ;
45+ await toasts . dismissAllToasts ( ) ;
46+ await dashboardPanelActions . removePanelByTitle ( `${ PANEL_TITLE } (copy)` ) ;
4847 } ) ;
4948
50- // clone panel
51- it ( ' A11y test on dashboard embeddable clone panel' , async ( ) => {
52- await testSubjects . click ( 'embeddablePanelAction-clonePanel' ) ;
49+ it ( 'can customize panel' , async ( ) => {
50+ await dashboardPanelActions . customizePanel ( ) ;
5351 await a11y . testAppSnapshot ( ) ;
54- await toasts . dismissAllToasts ( ) ;
55- await dashboardPanelActions . removePanelByTitle ( 'Visualization PieChart (copy)' ) ;
5652 } ) ;
5753
58- // edit panel title
59- it ( ' A11y test on dashboard embeddable edit dashboard title' , async ( ) => {
60- await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
61- await testSubjects . click ( 'embeddablePanelAction-ACTION_CUSTOMIZE_PANEL' ) ;
62- await a11y . testAppSnapshot ( ) ;
63- await testSubjects . click ( 'customizePanelHideTitle' ) ;
54+ it ( 'can hide panel title' , async ( ) => {
55+ await dashboardPanelActions . clickHidePanelTitleToggle ( ) ;
6456 await a11y . testAppSnapshot ( ) ;
6557 await testSubjects . click ( 'saveNewTitleButton' ) ;
6658 } ) ;
6759
68- // create drilldown
69- it ( 'A11y test on dashboard embeddable open flyout and drilldown' , async ( ) => {
60+ it ( 'can drilldown' , async ( ) => {
7061 await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
7162 await testSubjects . click ( 'embeddablePanelAction-OPEN_FLYOUT_ADD_DRILLDOWN' ) ;
7263 await a11y . testAppSnapshot ( ) ;
7364 await testSubjects . click ( 'flyoutCloseButton' ) ;
7465 } ) ;
7566
76- // clicking on more button
77- it ( 'A11y test on dashboard embeddable more button' , async ( ) => {
78- await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
79- await testSubjects . click ( 'embeddablePanelMore-mainMenu' ) ;
67+ it ( 'can view more actions' , async ( ) => {
68+ await dashboardPanelActions . openContextMenuMorePanel ( ) ;
8069 await a11y . testAppSnapshot ( ) ;
8170 } ) ;
8271
83- // https://github.com/elastic/kibana/issues/77422
84- it . skip ( 'A11y test on dashboard embeddable custom time range' , async ( ) => {
85- await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
72+ it ( 'can create a custom time range' , async ( ) => {
73+ await dashboardPanelActions . openContextMenuMorePanel ( ) ;
8674 await testSubjects . click ( 'embeddablePanelAction-CUSTOM_TIME_RANGE' ) ;
8775 await a11y . testAppSnapshot ( ) ;
76+ await testSubjects . click ( 'addPerPanelTimeRangeButton' ) ;
8877 } ) ;
8978
90- // flow will change whenever the custom time range a11y issue gets fixed.
91- // Will need to click on gear icon and then click on more.
92-
93- // inspector panel
94- it ( 'A11y test on dashboard embeddable open inspector' , async ( ) => {
95- await testSubjects . click ( 'embeddablePanelAction-openInspector' ) ;
79+ it ( 'can open inspector' , async ( ) => {
80+ await dashboardPanelActions . openInspector ( ) ;
9681 await a11y . testAppSnapshot ( ) ;
9782 await testSubjects . click ( 'euiFlyoutCloseButton' ) ;
9883 } ) ;
9984
100- // fullscreen
101- it ( 'A11y test on dashboard embeddable fullscreen' , async ( ) => {
102- await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
103- await testSubjects . click ( 'embeddablePanelMore-mainMenu' ) ;
104- await testSubjects . click ( 'embeddablePanelAction-togglePanel' ) ;
105- await a11y . testAppSnapshot ( ) ;
106- } ) ;
107-
108- // minimize fullscreen panel
109- it ( 'A11y test on dashboard embeddable fullscreen minimize ' , async ( ) => {
110- await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
111- await testSubjects . click ( 'embeddablePanelMore-mainMenu' ) ;
112- await testSubjects . click ( 'embeddablePanelAction-togglePanel' ) ;
85+ it ( 'can go fullscreen' , async ( ) => {
86+ await dashboardPanelActions . clickExpandPanelToggle ( ) ;
11387 await a11y . testAppSnapshot ( ) ;
88+ await dashboardPanelActions . clickExpandPanelToggle ( ) ;
11489 } ) ;
11590
116- // replace panel
117- it ( 'A11y test on dashboard embeddable replace panel' , async ( ) => {
118- await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
119- await testSubjects . click ( 'embeddablePanelMore-mainMenu' ) ;
120- await testSubjects . click ( 'embeddablePanelAction-replacePanel' ) ;
91+ it ( 'can replace panel' , async ( ) => {
92+ await dashboardPanelActions . replacePanelByTitle ( ) ;
12193 await a11y . testAppSnapshot ( ) ;
12294 await testSubjects . click ( 'euiFlyoutCloseButton' ) ;
12395 } ) ;
12496
125- // delete from dashboard
126- it ( 'A11y test on dashboard embeddable delete panel' , async ( ) => {
127- await testSubjects . click ( 'embeddablePanelToggleMenuIcon' ) ;
128- await testSubjects . click ( 'embeddablePanelMore-mainMenu' ) ;
129- await testSubjects . click ( 'embeddablePanelAction-deletePanel' ) ;
97+ it ( 'can delete panel' , async ( ) => {
98+ await dashboardPanelActions . removePanel ( ) ;
13099 await a11y . testAppSnapshot ( ) ;
131100 } ) ;
132101 } ) ;
0 commit comments