From d8e3e25f06a4f15c3118af6b8afbac2b44c2d456 Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Tue, 1 Nov 2022 21:39:02 +0530 Subject: [PATCH] Add `preconfirm optin` option to bulk list management UI. Closes #935. --- frontend/cypress/e2e/subscribers.cy.js | 7 ++++++- frontend/src/views/SubscriberBulkList.vue | 15 ++++++++++++++- frontend/src/views/Subscribers.vue | 6 +++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/frontend/cypress/e2e/subscribers.cy.js b/frontend/cypress/e2e/subscribers.cy.js index 63c6bd5..63a8717 100644 --- a/frontend/cypress/e2e/subscribers.cy.js +++ b/frontend/cypress/e2e/subscribers.cy.js @@ -74,7 +74,7 @@ describe('Subscribers', () => { it('Does bulk subscriber list add and remove', () => { const cases = [ // radio: action to perform, rows: table rows to select and perform on: [expected statuses of those rows after thea action] - { radio: 'check-list-add', lists: [0, 1], rows: { 0: ['unconfirmed', 'unconfirmed'] } }, + { radio: 'check-list-add', lists: [0, 1], rows: { 0: ['confirmed', 'confirmed'] } }, { radio: 'check-list-unsubscribe', lists: [0, 1], rows: { 0: ['unsubscribed', 'unsubscribed'], 1: ['unsubscribed'] } }, { radio: 'check-list-remove', lists: [0, 1], rows: { 1: [] } }, { radio: 'check-list-add', lists: [0, 1], rows: { 0: ['unsubscribed', 'unsubscribed'], 1: ['unconfirmed', 'unconfirmed'] } }, @@ -101,6 +101,11 @@ describe('Subscribers', () => { // Select the radio option in the modal. cy.get(`[data-cy=${c.radio}] .check`).click(); + // For the first test, check the optin preconfirm box. + if (n === 0) { + cy.get('[data-cy=preconfirm]').click(); + } + // Save. cy.get('.modal button.is-primary').click(); diff --git a/frontend/src/views/SubscriberBulkList.vue b/frontend/src/views/SubscriberBulkList.vue index cbdf579..6008336 100644 --- a/frontend/src/views/SubscriberBulkList.vue +++ b/frontend/src/views/SubscriberBulkList.vue @@ -32,6 +32,14 @@ :selected="form.lists" :all="lists.results" > + + + + {{ $t('subscribers.preconfirm') }} + + +