From efed6ed83026e74188e5eb1ed3af091284533d77 Mon Sep 17 00:00:00 2001 From: Anukriti Singh Date: Thu, 23 Nov 2023 17:26:14 +0530 Subject: [PATCH] [MNT-23433] close button added for e2e --- .../context-submenus-ext.json | 17 +++++++++++++++++ .../document-presets-ext.json | 17 +++++++++++++++++ .../extensibility-configs/header-ext.json | 17 +++++++++++++++++ .../extensibility-configs/info-drawer-ext.json | 17 +++++++++++++++++ .../info-drawer-no-tabs-ext.json | 17 +++++++++++++++++ .../extensibility-configs/metadata-ext.json | 17 +++++++++++++++++ .../extensibility-configs/viewer-ext.json | 17 +++++++++++++++++ .../src/components/viewer/viewer.ts | 2 +- 8 files changed, 120 insertions(+), 1 deletion(-) diff --git a/e2e/protractor/resources/extensibility-configs/context-submenus-ext.json b/e2e/protractor/resources/extensibility-configs/context-submenus-ext.json index 336f324a71..d4a5839247 100644 --- a/e2e/protractor/resources/extensibility-configs/context-submenus-ext.json +++ b/e2e/protractor/resources/extensibility-configs/context-submenus-ext.json @@ -1058,6 +1058,23 @@ } } ] + }, + { + "id": "app.viewer.separator.1", + "type": "separator", + "order": 11000 + }, + { + "id": "app.viewer.close", + "order": 12000, + "title": "APP.ACTIONS.CLOSE", + "icon": "close", + "actions": { + "click": "CLOSE_PREVIEW" + }, + "rules": { + "visible": "canClosePreview" + } } ], "shared": { diff --git a/e2e/protractor/resources/extensibility-configs/document-presets-ext.json b/e2e/protractor/resources/extensibility-configs/document-presets-ext.json index 84229b582a..a0b0994c15 100644 --- a/e2e/protractor/resources/extensibility-configs/document-presets-ext.json +++ b/e2e/protractor/resources/extensibility-configs/document-presets-ext.json @@ -986,6 +986,23 @@ } } ] + }, + { + "id": "app.viewer.separator.1", + "type": "separator", + "order": 11000 + }, + { + "id": "app.viewer.close", + "order": 12000, + "title": "APP.ACTIONS.CLOSE", + "icon": "close", + "actions": { + "click": "CLOSE_PREVIEW" + }, + "rules": { + "visible": "canClosePreview" + } } ], "shared": { diff --git a/e2e/protractor/resources/extensibility-configs/header-ext.json b/e2e/protractor/resources/extensibility-configs/header-ext.json index 7d265f8289..a0f1fcade9 100644 --- a/e2e/protractor/resources/extensibility-configs/header-ext.json +++ b/e2e/protractor/resources/extensibility-configs/header-ext.json @@ -1013,6 +1013,23 @@ } } ] + }, + { + "id": "app.viewer.separator.1", + "type": "separator", + "order": 11000 + }, + { + "id": "app.viewer.close", + "order": 12000, + "title": "APP.ACTIONS.CLOSE", + "icon": "close", + "actions": { + "click": "CLOSE_PREVIEW" + }, + "rules": { + "visible": "canClosePreview" + } } ], "shared": { diff --git a/e2e/protractor/resources/extensibility-configs/info-drawer-ext.json b/e2e/protractor/resources/extensibility-configs/info-drawer-ext.json index 3339338772..4ef3fc8de4 100644 --- a/e2e/protractor/resources/extensibility-configs/info-drawer-ext.json +++ b/e2e/protractor/resources/extensibility-configs/info-drawer-ext.json @@ -986,6 +986,23 @@ } } ] + }, + { + "id": "app.viewer.separator.1", + "type": "separator", + "order": 11000 + }, + { + "id": "app.viewer.close", + "order": 12000, + "title": "APP.ACTIONS.CLOSE", + "icon": "close", + "actions": { + "click": "CLOSE_PREVIEW" + }, + "rules": { + "visible": "canClosePreview" + } } ], "shared": { diff --git a/e2e/protractor/resources/extensibility-configs/info-drawer-no-tabs-ext.json b/e2e/protractor/resources/extensibility-configs/info-drawer-no-tabs-ext.json index 531c134f54..79b600cf5b 100644 --- a/e2e/protractor/resources/extensibility-configs/info-drawer-no-tabs-ext.json +++ b/e2e/protractor/resources/extensibility-configs/info-drawer-no-tabs-ext.json @@ -986,6 +986,23 @@ } } ] + }, + { + "id": "app.viewer.separator.1", + "type": "separator", + "order": 11000 + }, + { + "id": "app.viewer.close", + "order": 12000, + "title": "APP.ACTIONS.CLOSE", + "icon": "close", + "actions": { + "click": "CLOSE_PREVIEW" + }, + "rules": { + "visible": "canClosePreview" + } } ], "shared": { diff --git a/e2e/protractor/resources/extensibility-configs/metadata-ext.json b/e2e/protractor/resources/extensibility-configs/metadata-ext.json index 3fc4312a94..f4fc101034 100644 --- a/e2e/protractor/resources/extensibility-configs/metadata-ext.json +++ b/e2e/protractor/resources/extensibility-configs/metadata-ext.json @@ -986,6 +986,23 @@ } } ] + }, + { + "id": "app.viewer.separator.1", + "type": "separator", + "order": 11000 + }, + { + "id": "app.viewer.close", + "order": 12000, + "title": "APP.ACTIONS.CLOSE", + "icon": "close", + "actions": { + "click": "CLOSE_PREVIEW" + }, + "rules": { + "visible": "canClosePreview" + } } ], "shared": { diff --git a/e2e/protractor/resources/extensibility-configs/viewer-ext.json b/e2e/protractor/resources/extensibility-configs/viewer-ext.json index 141e1c8c31..e981c93d01 100644 --- a/e2e/protractor/resources/extensibility-configs/viewer-ext.json +++ b/e2e/protractor/resources/extensibility-configs/viewer-ext.json @@ -1012,6 +1012,23 @@ } } ] + }, + { + "id": "app.viewer.separator.1", + "type": "separator", + "order": 11000 + }, + { + "id": "app.viewer.close", + "order": 12000, + "title": "APP.ACTIONS.CLOSE", + "icon": "close", + "actions": { + "click": "CLOSE_PREVIEW" + }, + "rules": { + "visible": "canClosePreview" + } } ], "shared": { diff --git a/projects/aca-testing-shared/src/components/viewer/viewer.ts b/projects/aca-testing-shared/src/components/viewer/viewer.ts index 4701916e40..84bd82525a 100755 --- a/projects/aca-testing-shared/src/components/viewer/viewer.ts +++ b/projects/aca-testing-shared/src/components/viewer/viewer.ts @@ -103,7 +103,7 @@ export class Viewer extends Component { } async clickCloseButton(): Promise { - const closeButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-back"]')); + const closeButton: ElementFinder = element(by.css('button[title="Close"]')); await BrowserActions.click(closeButton); } }