diff --git a/packages/web-app-files/src/views/PrivateLink.vue b/packages/web-app-files/src/views/PrivateLink.vue index 3049529bb0d..4462c0d20c0 100644 --- a/packages/web-app-files/src/views/PrivateLink.vue +++ b/packages/web-app-files/src/views/PrivateLink.vue @@ -4,7 +4,7 @@
diff --git a/packages/web-app-files/src/views/PublicLink.vue b/packages/web-app-files/src/views/PublicLink.vue index 01388c68d2e..c6bd6a47383 100644 --- a/packages/web-app-files/src/views/PublicLink.vue +++ b/packages/web-app-files/src/views/PublicLink.vue @@ -4,7 +4,7 @@
@@ -88,7 +88,7 @@ export default { return this.$gettext('Enter password for public link') } }, - mounted() { + created() { this.resolvePublicLink() }, methods: { diff --git a/packages/web-app-files/tests/unit/views/PrivateLink.spec.js b/packages/web-app-files/tests/unit/views/PrivateLink.spec.js index 6ae4c231df9..33e97a8ea53 100644 --- a/packages/web-app-files/tests/unit/views/PrivateLink.spec.js +++ b/packages/web-app-files/tests/unit/views/PrivateLink.spec.js @@ -22,7 +22,7 @@ const $route = { const selectors = { pageTitle: 'h1.oc-invisible-sr', loader: '.oc-card-body', - errorMessage: '.oc-link-resolve-error' + errorTitle: '.oc-link-resolve-error-title' } describe('PrivateLink view', () => { @@ -62,7 +62,7 @@ describe('PrivateLink view', () => { await new Promise((resolve) => { setTimeout(() => { - expect(wrapper.find(selectors.errorMessage)).toMatchSnapshot() + expect(wrapper.find(selectors.errorTitle)).toMatchSnapshot() resolve() }, 1) }) diff --git a/packages/web-app-files/tests/unit/views/PublicLink.spec.js b/packages/web-app-files/tests/unit/views/PublicLink.spec.js index f2a22500cab..55beca506ec 100644 --- a/packages/web-app-files/tests/unit/views/PublicLink.spec.js +++ b/packages/web-app-files/tests/unit/views/PublicLink.spec.js @@ -19,7 +19,7 @@ const selectors = { cardFooter: '.oc-card-footer', cardBody: '.oc-card-body', submitButton: '.oc-login-authorize-button', - errorMessage: '.oc-link-resolve-error', + errorTitle: '.oc-link-resolve-error-title', publicLinkPasswordRequired: 'form > .oc-card-title' } @@ -49,7 +49,7 @@ describe('PublicLink', () => { expect(loading).toMatchSnapshot() }) it('should not display the error message', () => { - expect(wrapper.find(selectors.errorMessage).exists()).toBeFalsy() + expect(wrapper.find(selectors.errorTitle).exists()).toBeFalsy() }) it('should not display the password required form', () => { expect(wrapper.find(selectors.publicLinkPasswordRequired).exists()).toBeFalsy() @@ -67,8 +67,8 @@ describe('PublicLink', () => { const wrapper = getWrapper({ loading: false }) await wrapper.setData({ errorMessage: 'some-error-message' }) - expect(wrapper.find(selectors.errorMessage).exists()).toBeTruthy() - expect(wrapper.find(selectors.errorMessage)).toMatchSnapshot() + expect(wrapper.find(selectors.errorTitle).exists()).toBeTruthy() + expect(wrapper.find(selectors.errorTitle)).toMatchSnapshot() }) describe('and when "passwordRequired" is set as true', () => { diff --git a/packages/web-app-files/tests/unit/views/__snapshots__/PrivateLink.spec.js.snap b/packages/web-app-files/tests/unit/views/__snapshots__/PrivateLink.spec.js.snap index 853061a51b0..0629dea6c24 100644 --- a/packages/web-app-files/tests/unit/views/__snapshots__/PrivateLink.spec.js.snap +++ b/packages/web-app-files/tests/unit/views/__snapshots__/PrivateLink.spec.js.snap @@ -23,7 +23,9 @@ exports[`PrivateLink view when the view is still loading should display the load `; exports[`PrivateLink view when there was an error should display the error message 1`] = ` -