From 2717fa0a3ec39d67f0536c6b60b81d62ba190275 Mon Sep 17 00:00:00 2001 From: Dat Date: Tue, 10 Nov 2026 10:24:27 +0100 Subject: [PATCH 1/4] Add explanation popup to "Pending review" chip on Dashboard Bug: T444114 --- .../Dashboard/Components/WikiDashboardListDialogContent.vue | 3 +++ .../Pages/Dashboard/Components/WikiDashboardListElement.vue | 1 + 2 files changed, 4 insertions(+) diff --git a/src/components/Pages/Dashboard/Components/WikiDashboardListDialogContent.vue b/src/components/Pages/Dashboard/Components/WikiDashboardListDialogContent.vue index 32cfedc5..c7ff7f77 100644 --- a/src/components/Pages/Dashboard/Components/WikiDashboardListDialogContent.vue +++ b/src/components/Pages/Dashboard/Components/WikiDashboardListDialogContent.vue @@ -4,6 +4,9 @@ Under our hosting policy, Wikibases are temporary by default. Unless submitted for review, your Wikibase {{ wikiDomain }} will be taken offline on {{ formattedActiveFromDate }}. If you want to keep it online, please submit it for review. + + Your Wikibase {{ wikiDomain }} is scheduled for re-evaluation under our hosting policy by {{ formattedActiveFromDate }}. You will be able to submit it for review 3 months before this date. + Date: Wed, 11 Nov 2026 16:03:05 +0100 Subject: [PATCH 2/4] Change dialog text --- .../Dashboard/Components/WikiDashboardListDialogContent.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Pages/Dashboard/Components/WikiDashboardListDialogContent.vue b/src/components/Pages/Dashboard/Components/WikiDashboardListDialogContent.vue index c7ff7f77..c82de7ea 100644 --- a/src/components/Pages/Dashboard/Components/WikiDashboardListDialogContent.vue +++ b/src/components/Pages/Dashboard/Components/WikiDashboardListDialogContent.vue @@ -2,10 +2,10 @@ Status information - Under our hosting policy, Wikibases are temporary by default. Unless submitted for review, your Wikibase {{ wikiDomain }} will be taken offline on {{ formattedActiveFromDate }}. If you want to keep it online, please submit it for review. + Under our hosting policy, Wikibases are temporary by default. Unless submitted for review, your Wikibase {{ wikiDomain }} will be taken offline on {{ formattedActiveFromDate }}. If you want to keep it online, please submit it for review. - Your Wikibase {{ wikiDomain }} is scheduled for re-evaluation under our hosting policy by {{ formattedActiveFromDate }}. You will be able to submit it for review 3 months before this date. + Your Wikibase {{ wikiDomain }} is expecting a review. Once it's reviewed, we'll let you know the outcome and what happens next. The Wikibase will stay online at least until the review is complete. From cae33882b86fdd94f4ea61db11d8faae80f94b8b Mon Sep 17 00:00:00 2001 From: Dat Date: Wed, 11 Nov 2026 16:28:57 +0100 Subject: [PATCH 3/4] test: cover dashboard status dialog content --- .../WikiDashboardListDialogContent.spec.js | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/unit/WikiDashboardListDialogContent.spec.js diff --git a/tests/unit/WikiDashboardListDialogContent.spec.js b/tests/unit/WikiDashboardListDialogContent.spec.js new file mode 100644 index 00000000..cbb21ef3 --- /dev/null +++ b/tests/unit/WikiDashboardListDialogContent.spec.js @@ -0,0 +1,37 @@ +import { shallowMount } from '@vue/test-utils' +import WikiDashboardListDialogContent from '@/components/Pages/Dashboard/Components/WikiDashboardListDialogContent.vue' +require('./boilerplate.js') + +describe('WikiDashboardListDialogContent.vue', () => { + const propsData = { + formattedActiveFromDate: '11 November 2026', + wikiDomain: 'mywayordatway.wikibase.cloud', + wikiId: 1, + } + + it('renders the expiry message when there is no pending review', () => { + const wrapper = shallowMount(WikiDashboardListDialogContent, { + propsData: { + ...propsData, + hasPendingReview: false, + }, + }) + + expect(wrapper.text()).toContain('will be taken offline on 11 November 2026') + expect(wrapper.text()).not.toContain('is expecting a review') + expect(wrapper.text()).toContain('mywayordatway.wikibase.cloud') + }) + + it('renders the pending review message when a review is pending', () => { + const wrapper = shallowMount(WikiDashboardListDialogContent, { + propsData: { + ...propsData, + hasPendingReview: true, + }, + }) + + expect(wrapper.text()).toContain('is expecting a review') + expect(wrapper.text()).not.toContain('will be taken offline') + expect(wrapper.text()).toContain('mywayordatway.wikibase.cloud') + }) +}) From 0f7d70fd163fbbb2d512efa04f545fd8befcedbc Mon Sep 17 00:00:00 2001 From: Dat Date: Wed, 11 Nov 2026 16:42:54 +0100 Subject: [PATCH 4/4] remove harcoded date --- tests/unit/WikiDashboardListDialogContent.spec.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/unit/WikiDashboardListDialogContent.spec.js b/tests/unit/WikiDashboardListDialogContent.spec.js index cbb21ef3..b43ccf9f 100644 --- a/tests/unit/WikiDashboardListDialogContent.spec.js +++ b/tests/unit/WikiDashboardListDialogContent.spec.js @@ -3,8 +3,16 @@ import WikiDashboardListDialogContent from '@/components/Pages/Dashboard/Compone require('./boilerplate.js') describe('WikiDashboardListDialogContent.vue', () => { + const today = new Date() + const suspensionDay = today.getDate() + 1 + const suspensionActiveFromDate = new Date() + suspensionActiveFromDate.setDate(suspensionDay) + const formattedActiveFromDate = suspensionActiveFromDate.toLocaleDateString( + 'en-GB', + { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' }, + ) const propsData = { - formattedActiveFromDate: '11 November 2026', + formattedActiveFromDate, wikiDomain: 'mywayordatway.wikibase.cloud', wikiId: 1, } @@ -17,7 +25,7 @@ describe('WikiDashboardListDialogContent.vue', () => { }, }) - expect(wrapper.text()).toContain('will be taken offline on 11 November 2026') + expect(wrapper.text()).toContain(`will be taken offline on ${formattedActiveFromDate}`) expect(wrapper.text()).not.toContain('is expecting a review') expect(wrapper.text()).toContain('mywayordatway.wikibase.cloud') })