From 355aa8fbb2e7e7ff8a7b0c5f2aebdc76d3300946 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 6 Jul 2022 10:14:56 +0200 Subject: [PATCH] Introduce app top bar (#7217) Introduce app top bar --- .../enhancement-add-app-top-bar-component | 6 + packages/web-app-pdf-viewer/src/App.vue | 18 +-- packages/web-app-text-editor/src/App.vue | 114 +++++++++--------- packages/web-app-text-editor/src/AppBar.vue | 57 --------- packages/web-pkg/src/components/AppTopBar.vue | 37 ++++++ .../acceptance/pageObjects/textEditorPage.js | 16 ++- 6 files changed, 117 insertions(+), 131 deletions(-) create mode 100644 changelog/unreleased/enhancement-add-app-top-bar-component delete mode 100644 packages/web-app-text-editor/src/AppBar.vue create mode 100644 packages/web-pkg/src/components/AppTopBar.vue diff --git a/changelog/unreleased/enhancement-add-app-top-bar-component b/changelog/unreleased/enhancement-add-app-top-bar-component new file mode 100644 index 00000000000..7f5e0263cb6 --- /dev/null +++ b/changelog/unreleased/enhancement-add-app-top-bar-component @@ -0,0 +1,6 @@ +Enhancement: Add app top bar component + +We've added a app top bar component for consistency, +which will be used by the apps: preview, text-editor and pdf-viewer. + +https://github.com/owncloud/web/pull/7217 diff --git a/packages/web-app-pdf-viewer/src/App.vue b/packages/web-app-pdf-viewer/src/App.vue index 4fd303e62f9..831cd91b393 100644 --- a/packages/web-app-pdf-viewer/src/App.vue +++ b/packages/web-app-pdf-viewer/src/App.vue @@ -3,12 +3,7 @@
-
- - - - -
+ @@ -16,6 +11,7 @@ diff --git a/packages/web-pkg/src/components/AppTopBar.vue b/packages/web-pkg/src/components/AppTopBar.vue new file mode 100644 index 00000000000..7d747158332 --- /dev/null +++ b/packages/web-pkg/src/components/AppTopBar.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/tests/acceptance/pageObjects/textEditorPage.js b/tests/acceptance/pageObjects/textEditorPage.js index fb7488d089b..b4da1b1bd7a 100644 --- a/tests/acceptance/pageObjects/textEditorPage.js +++ b/tests/acceptance/pageObjects/textEditorPage.js @@ -29,8 +29,16 @@ module.exports = { }) return content }, - getFileName: function () { - return this.getInnerText('@fileName') + getFileName: async function () { + let fileName = '' + await this.waitForElementVisible('@fileName').getAttribute( + '@fileName', + 'data-test-resource-name', + (result) => { + fileName = result.value + } + ) + return fileName }, getContentFromEditor: function () { return this.getInputValue('@editorTextarea') @@ -84,10 +92,10 @@ module.exports = { selector: '#text-editor-controls-save' }, closeButton: { - selector: '#text-editor-controls-close' + selector: '#app-top-bar-close' }, fileName: { - selector: '#text-editor-file-path' + selector: '.oc-resource-name' }, previewPanel: { selector: '#text-editor-preview'