From df4736f334471b76841d90b4c9b089bfa569d497 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 23 Aug 2023 22:09:54 -0400 Subject: [PATCH 01/17] #1226 changing the new subscribers email template sent to shop owners --- subscribie/blueprints/checkout/__init__.py | 5 +++-- subscribie/notifications.py | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/subscribie/blueprints/checkout/__init__.py b/subscribie/blueprints/checkout/__init__.py index e443aa2aa..e835edf29 100644 --- a/subscribie/blueprints/checkout/__init__.py +++ b/subscribie/blueprints/checkout/__init__.py @@ -678,8 +678,9 @@ def create_subscription( database.session.commit() except Exception as e: # noqa log.error("Could not set cancel_at: {e}") - - newSubscriberEmailNotification() + subscriber_name = subscription.person.full_name + subscriber_plan = subscription.plan.title + newSubscriberEmailNotification(subscriber_name, subscriber_plan) return subscription diff --git a/subscribie/notifications.py b/subscribie/notifications.py index e20731083..b23c17942 100644 --- a/subscribie/notifications.py +++ b/subscribie/notifications.py @@ -9,7 +9,9 @@ log = logging.getLogger(__name__) -def newSubscriberEmailNotification(*args, **kwargs): +def newSubscriberEmailNotification( + subscriber_name=None, subscriber_plan=None, **kwargs +): """As a shop owner all shop admins email notification when a new subscriber joins https://github.com/Subscribie/subscribie/issues/602 @@ -21,7 +23,9 @@ def newSubscriberEmailNotification(*args, **kwargs): msg["from"] = current_app.config["EMAIL_LOGIN_FROM"] shopadmins = User.query.all() # all shop admins msg["to"] = [user.email for user in shopadmins] # all shop admins - msg.set_content("you have a new subscriber!") + msg.set_content( + f"{subscriber_name} has subscribed to your {subscriber_plan} plan!" + ) setting = Setting.query.first() if setting.reply_to_email_address is not None: msg["reply-to"] = setting.reply_to_email_address From 6f660b6e5bc0bf0b8e693a83376123bd80a8672c Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 28 Aug 2023 19:25:35 -0400 Subject: [PATCH 02/17] adding new subscriber email template test --- subscribie/notifications.py | 2 +- .../1226_shop_owner_new_subscriber_email.js | 37 +++++++++++ .../tests/checkNewSubscriberEmail.js | 64 +++++++++++++++++++ .../worker3.spec.js | 2 + 4 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js create mode 100644 tests/browser-automated-tests-playwright/tests/checkNewSubscriberEmail.js diff --git a/subscribie/notifications.py b/subscribie/notifications.py index b23c17942..1155966b4 100644 --- a/subscribie/notifications.py +++ b/subscribie/notifications.py @@ -24,7 +24,7 @@ def newSubscriberEmailNotification( shopadmins = User.query.all() # all shop admins msg["to"] = [user.email for user in shopadmins] # all shop admins msg.set_content( - f"{subscriber_name} has subscribed to your {subscriber_plan} plan!" + f"You have a new subscriber! \n\n Plan Title: {subscriber_plan} \n Subscriber Name: {subscriber_name}" ) setting = Setting.query.first() if setting.reply_to_email_address is not None: diff --git a/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js b/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js new file mode 100644 index 000000000..eed22cc63 --- /dev/null +++ b/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js @@ -0,0 +1,37 @@ +const { test, expect } = require('@playwright/test'); +const checkNewSubscriberEmail= require('./checkNewSubscriberEmail.js'); +const SUBSCRIBER_EMAIL_USER = process.env.SUBSCRIBER_EMAIL_USER; + + +test('@1226@shop-owner@check new subscriber email', async ({ page }) => { + + // Adding admin email + await page.goto("/admin/add-shop-admin"); // Go to home before selecting product + await page.fill('[name=email]', SUBSCRIBER_EMAIL_USER); + await page.fill('[name=password]', 'password'); + await page.click("text=Save"); + + //checkout to plan + await page.goto("/"); // Go to home before selecting product + await page.click('[name="Free plan"]'); + + // Fill in order form + await page.fill('#given_name', 'John'); + await page.fill('#family_name', 'Smith'); + await page.fill('#email', "test@example.com"); + await page.fill('#mobile', '07123456789'); + await page.fill('#address_line_one', '123 Short Road'); + await page.fill('#city', 'London'); + await page.fill('#postcode', 'L01 T3U'); + expect(await page.screenshot()).toMatchSnapshot('new-customer-form.png'); + await page.click('text="Continue to Payment"'); + + const order_complete_content = await page.textContent('.title-1'); + expect(order_complete_content === "Order Complete!"); + expect(await page.screenshot()).toMatchSnapshot('recurring-order-complete.png'); + + await new Promise(r => setTimeout(r, 10000)); + checkNewSubscriberEmail.checkNewSubscriberEmail(); + console.log("checking new subscriber email template"); + +}); diff --git a/tests/browser-automated-tests-playwright/tests/checkNewSubscriberEmail.js b/tests/browser-automated-tests-playwright/tests/checkNewSubscriberEmail.js new file mode 100644 index 000000000..c2849afe1 --- /dev/null +++ b/tests/browser-automated-tests-playwright/tests/checkNewSubscriberEmail.js @@ -0,0 +1,64 @@ +const https = require('https'); + +function checkNewSubscriberEmail() { + console.log("executing checkNewSubscriberEmail"); + const SUBSCRIBER_EMAIL_HOST = process.env.SUBSCRIBER_EMAIL_HOST + const SUBSCRIBER_EMAIL_USER = process.env.SUBSCRIBER_EMAIL_USER + const SUBSCRIBER_EMAIL_PASSWORD = process.env.SUBSCRIBER_EMAIL_PASSWORD + const IMAP_SEARCH_UNSEEN = parseInt(process.env.IMAP_SEARCH_UNSEEN) + const NEW_SUBSCRIBER_IMAP_SEARCH_SUBJECT = process.env.NEW_SUBSCRIBER_IMAP_SEARCH_SUBJECT + // global env + const IMAP_SEARCH_SINCE_DATE = process.env.IMAP_SEARCH_SINCE_DATE + const EMAIL_SEARCH_API_HOST = process.env.EMAIL_SEARCH_API_HOST + + const data = JSON.stringify({ + email_host: SUBSCRIBER_EMAIL_HOST, + email_user: SUBSCRIBER_EMAIL_USER, + email_password: SUBSCRIBER_EMAIL_PASSWORD, + imap_search_subject: NEW_SUBSCRIBER_IMAP_SEARCH_SUBJECT, + imap_search_unseen: IMAP_SEARCH_UNSEEN, + imap_search_since_date: IMAP_SEARCH_SINCE_DATE + }) + + const options = { + hostname: EMAIL_SEARCH_API_HOST, + port: 443, + path: '/search-email', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + } + const req = https.request(options, res => { + console.log(`statusCode: ${res.statusCode}`) + if ( res.statusCode != 200 ) { + console.error("Non 200 statusCode received"); + process.exit(-5); + } + res.on('data', resp => { + process.stdout.write(resp) + const emails = JSON.parse(resp.toString()) + if ( emails.length == 0 ) { + console.error("Zero emails were returned."); + process.exit(5); + } + const lastEmail = emails[emails.length -1]['email_body'] + if ( lastEmail.includes('You have a new subscriber!')) { + return true + } else { + console.error("Could not find login text in email"); + process.exit(5); + } + }) + }) + + req.on('error', error => { + console.error(error) + }) + + req.write(data) + req.end() +} +exports.checkNewSubscriberEmail = checkNewSubscriberEmail; + diff --git a/tests/browser-automated-tests-playwright/worker3.spec.js b/tests/browser-automated-tests-playwright/worker3.spec.js index 767f2aacf..a84b0de6e 100644 --- a/tests/browser-automated-tests-playwright/worker3.spec.js +++ b/tests/browser-automated-tests-playwright/worker3.spec.js @@ -12,6 +12,8 @@ test.beforeEach(async ({ page }) => { }); const clear_DB = require('./tests/clear_db'); + const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); + const categories_creation = require('./tests/452_shop_owner_categories_creation'); const private_page_creation = require('./tests/334_shop_owner_private_page_creation'); From 9bd1e1541286bc827d6b65e71a1af4660f6dc048 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 28 Aug 2023 19:32:58 -0400 Subject: [PATCH 03/17] skipping black format --- .github/workflows/remove-inactive-pr-previews.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/remove-inactive-pr-previews.py b/.github/workflows/remove-inactive-pr-previews.py index a9f40dc33..1790be7dc 100644 --- a/.github/workflows/remove-inactive-pr-previews.py +++ b/.github/workflows/remove-inactive-pr-previews.py @@ -35,9 +35,11 @@ if age >= timedelta(days=3): head_ref = pull_request["head"]["ref"] - find_hyphen = head_ref.rfind('-') + find_hyphen = head_ref.rfind("-") head_ref = head_ref[:60].lower() + # fmt: off container_name = head_ref[:find_hyphen] + head_ref[find_hyphen + 1:] + # fmt: on print( f"Pull Request #{pull_request_number} has a commit older than 3 days. Head ref: {head_ref}" ) From df13f5b52c68bc52f6786288060ac4b59e2e8fc4 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 29 Aug 2023 14:03:45 -0400 Subject: [PATCH 04/17] filtering by subscriber name --- .../tests/1226_shop_owner_new_subscriber_email.js | 5 ++++- .../tests/checkNewSubscriberEmail.js | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js b/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js index eed22cc63..4ea4a744f 100644 --- a/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js +++ b/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js @@ -33,5 +33,8 @@ test('@1226@shop-owner@check new subscriber email', async ({ page }) => { await new Promise(r => setTimeout(r, 10000)); checkNewSubscriberEmail.checkNewSubscriberEmail(); console.log("checking new subscriber email template"); - + await new Promise(r => setTimeout(r, 5000)); + const subscriber_name = checkNewSubscriberEmail.subscriber_name; + expect(subscriber_name === "John Smith"); + }); diff --git a/tests/browser-automated-tests-playwright/tests/checkNewSubscriberEmail.js b/tests/browser-automated-tests-playwright/tests/checkNewSubscriberEmail.js index c2849afe1..3f59b0323 100644 --- a/tests/browser-automated-tests-playwright/tests/checkNewSubscriberEmail.js +++ b/tests/browser-automated-tests-playwright/tests/checkNewSubscriberEmail.js @@ -45,6 +45,11 @@ function checkNewSubscriberEmail() { } const lastEmail = emails[emails.length -1]['email_body'] if ( lastEmail.includes('You have a new subscriber!')) { + const jsonToString = JSON.stringify(lastEmail); + const regex = /Subscriber Name: (.*)(?:\\r)/gm; + const subscriber_name = regex.exec(jsonToString)[1]; + console.log(subscriber_name) + module.exports.subscriber_name = subscriber_name; return true } else { console.error("Could not find login text in email"); From df8ab4a3c9dd894d80f38103337756e66c3f1de2 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 29 Aug 2023 19:00:38 -0400 Subject: [PATCH 05/17] updating onboarding --- tests/browser-automated-tests-playwright/index.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/browser-automated-tests-playwright/index.spec.js b/tests/browser-automated-tests-playwright/index.spec.js index 74be8a137..4ca89cd4c 100644 --- a/tests/browser-automated-tests-playwright/index.spec.js +++ b/tests/browser-automated-tests-playwright/index.spec.js @@ -64,8 +64,8 @@ test.describe("Subscribie tests:", () => { } // Use SME verify with test code - const phone_content = await page.textContent('text="Enter the verification code we sent to your phone"'); - if (expect(phone_content === "Enter the verification code we sent to your phone")) { + const phone_content = await page.textContent('text="Enter the verification code we sent to your number ending in ••00"'); + if (expect(phone_content === "Enter the verification code we sent to your number ending in ••00")) { console.log("Clicking Use test code") await page.click('button:has-text("Use test code")'); //Use Test code for SMS } From 7797a97f4d18b1d6352ccbdea90c22b91d3423ee Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 31 Aug 2023 01:24:00 -0400 Subject: [PATCH 06/17] removing some tests --- .../browser-automated-tests-playwright/worker2.spec.js | 2 -- .../browser-automated-tests-playwright/worker3.spec.js | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/tests/browser-automated-tests-playwright/worker2.spec.js b/tests/browser-automated-tests-playwright/worker2.spec.js index 8455476f6..46563291d 100644 --- a/tests/browser-automated-tests-playwright/worker2.spec.js +++ b/tests/browser-automated-tests-playwright/worker2.spec.js @@ -19,8 +19,6 @@ test.beforeEach(async ({ page }) => { const share_private_plan_url = require('./tests/491_shop_owner_share_private_plan_url'); - const order_plan_with_choice_options_and_required_note = require('./tests/264_subscriber_order_plan_with_choice_options_and_required_note'); - const order_plan_with_cancel_at = require('./tests/516_subscriber_order_plan_with_cancel_at'); const order_plan_cooling_off = require('./tests/133_subscriber_order_plan_with_cooling_off'); diff --git a/tests/browser-automated-tests-playwright/worker3.spec.js b/tests/browser-automated-tests-playwright/worker3.spec.js index a84b0de6e..c82164921 100644 --- a/tests/browser-automated-tests-playwright/worker3.spec.js +++ b/tests/browser-automated-tests-playwright/worker3.spec.js @@ -12,8 +12,6 @@ test.beforeEach(async ({ page }) => { }); const clear_DB = require('./tests/clear_db'); - const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); - const categories_creation = require('./tests/452_shop_owner_categories_creation'); const private_page_creation = require('./tests/334_shop_owner_private_page_creation'); @@ -26,16 +24,8 @@ test.beforeEach(async ({ page }) => { const uploading_plan_picture = require('./tests/872_uploading_plan_picture.js'); - const adding_vat = require('./tests/463_shop_owner_adding_vat'); - - const ordering_plan_with_VAT = require('./tests/463_subscriber_ordering_plan_with_VAT'); - - const subscriber_magic_login = require('./tests/623_subscriber_magic_login'); - const shop_owner_terms_and_conditions_creation = require('./tests/1005_shop_owner_terms_and_conditions_creation.js'); const subscriber_order_free_plan = require('./tests/939_subscriber_order_free_plan_with_terms_and_conditions.js'); - const subscriber_terms_and_condition_check_test = require('./tests/1005_subscriber_terms_and_condition_check_test.js'); - const subscriber_change_card_details = require('./tests/993_subscriber_change_card_details.js'); From e92d8132336eef5a4d921040fff811848c097866 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 5 Sep 2023 23:34:05 -0400 Subject: [PATCH 07/17] adding tests --- tests/browser-automated-tests-playwright/worker2.spec.js | 2 ++ tests/browser-automated-tests-playwright/worker3.spec.js | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/browser-automated-tests-playwright/worker2.spec.js b/tests/browser-automated-tests-playwright/worker2.spec.js index 46563291d..abbac279d 100644 --- a/tests/browser-automated-tests-playwright/worker2.spec.js +++ b/tests/browser-automated-tests-playwright/worker2.spec.js @@ -23,6 +23,8 @@ test.beforeEach(async ({ page }) => { const order_plan_cooling_off = require('./tests/133_subscriber_order_plan_with_cooling_off'); + const order_plan_with_choice_options_and_required_note = require('./tests/264_subscriber_order_plan_with_choice_options_and_required_note'); + const enabling_donations = require('./tests/1065_shop_owner_enabling_donations'); const checkout_donations = require('./tests/1065_subscriber_checkout_donation'); diff --git a/tests/browser-automated-tests-playwright/worker3.spec.js b/tests/browser-automated-tests-playwright/worker3.spec.js index c82164921..8fea872e3 100644 --- a/tests/browser-automated-tests-playwright/worker3.spec.js +++ b/tests/browser-automated-tests-playwright/worker3.spec.js @@ -24,8 +24,7 @@ test.beforeEach(async ({ page }) => { const uploading_plan_picture = require('./tests/872_uploading_plan_picture.js'); - const shop_owner_terms_and_conditions_creation = require('./tests/1005_shop_owner_terms_and_conditions_creation.js'); - - const subscriber_order_free_plan = require('./tests/939_subscriber_order_free_plan_with_terms_and_conditions.js'); + const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); + const subscriber_magic_login = require('./tests/623_subscriber_magic_login'); From b25510865fc6324fe4fa9e4daf35d915e799f42c Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 5 Sep 2023 23:57:17 -0400 Subject: [PATCH 08/17] adding env variable for workflow --- .github/workflows/demo-videos.yml | 2 +- .github/workflows/pr-demo-deploy.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/demo-videos.yml b/.github/workflows/demo-videos.yml index 8faa60e32..9b4dcbf12 100644 --- a/.github/workflows/demo-videos.yml +++ b/.github/workflows/demo-videos.yml @@ -94,7 +94,7 @@ jobs: RESET_PASSWORD_IMAP_SEARCH_SUBJECT: ${{ secrets.RESET_PASSWORD_IMAP_SEARCH_SUBJECT }} IMAP_SEARCH_UNSEEN: "1" IMAP_SEARCH_SINCE_DATE: "01-Jun-2022" - + NEW_SUBSCRIBER_IMAP_SEARCH_SUBJECT: "new subscriber" run: | set -x cp tests/browser-automated-tests-playwright/.env.example tests/browser-automated-tests-playwright/.env diff --git a/.github/workflows/pr-demo-deploy.yml b/.github/workflows/pr-demo-deploy.yml index 0cc7f7232..78214160d 100644 --- a/.github/workflows/pr-demo-deploy.yml +++ b/.github/workflows/pr-demo-deploy.yml @@ -116,7 +116,8 @@ jobs: EMAIL_SEARCH_API_HOST: ${{ secrets.EMAIL_SEARCH_API_HOST }} RESET_PASSWORD_IMAP_SEARCH_SUBJECT: ${{ secrets.RESET_PASSWORD_IMAP_SEARCH_SUBJECT }} IMAP_SEARCH_UNSEEN: "1" - IMAP_SEARCH_SINCE_DATE: "01-Sep-2021" + IMAP_SEARCH_SINCE_DATE: "01-Sep-2022" + NEW_SUBSCRIBER_IMAP_SEARCH_SUBJECT: "new subscriber" run: | set -x cp tests/browser-automated-tests-playwright/.env.example tests/browser-automated-tests-playwright/.env From dd85da192f7a58f9feb4569c0c039a526a0eaadd Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 6 Sep 2023 00:15:39 -0400 Subject: [PATCH 09/17] changing test order --- tests/browser-automated-tests-playwright/worker3.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/browser-automated-tests-playwright/worker3.spec.js b/tests/browser-automated-tests-playwright/worker3.spec.js index 8fea872e3..905d3b1f1 100644 --- a/tests/browser-automated-tests-playwright/worker3.spec.js +++ b/tests/browser-automated-tests-playwright/worker3.spec.js @@ -13,6 +13,8 @@ test.beforeEach(async ({ page }) => { const clear_DB = require('./tests/clear_db'); const categories_creation = require('./tests/452_shop_owner_categories_creation'); + + const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); const private_page_creation = require('./tests/334_shop_owner_private_page_creation'); @@ -24,7 +26,5 @@ test.beforeEach(async ({ page }) => { const uploading_plan_picture = require('./tests/872_uploading_plan_picture.js'); - const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); - const subscriber_magic_login = require('./tests/623_subscriber_magic_login'); From d909837a2309ffb93dfb041d41552156cd1bd274 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 6 Sep 2023 00:48:33 -0400 Subject: [PATCH 10/17] testing --- tests/browser-automated-tests-playwright/worker3.spec.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/browser-automated-tests-playwright/worker3.spec.js b/tests/browser-automated-tests-playwright/worker3.spec.js index 905d3b1f1..6399f3644 100644 --- a/tests/browser-automated-tests-playwright/worker3.spec.js +++ b/tests/browser-automated-tests-playwright/worker3.spec.js @@ -14,8 +14,6 @@ test.beforeEach(async ({ page }) => { const categories_creation = require('./tests/452_shop_owner_categories_creation'); - const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); - const private_page_creation = require('./tests/334_shop_owner_private_page_creation'); const public_page_creation = require('./tests/121_shop_owner_public_page_creation'); @@ -26,5 +24,6 @@ test.beforeEach(async ({ page }) => { const uploading_plan_picture = require('./tests/872_uploading_plan_picture.js'); - const subscriber_magic_login = require('./tests/623_subscriber_magic_login'); + const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); + From 5823689b839f1ac9a344b5390554fc03401f89c6 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 7 Sep 2023 23:08:53 -0400 Subject: [PATCH 11/17] black formatting --- subscribie/blueprints/subscriber/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subscribie/blueprints/subscriber/__init__.py b/subscribie/blueprints/subscriber/__init__.py index 109b28366..dfc9ab695 100644 --- a/subscribie/blueprints/subscriber/__init__.py +++ b/subscribie/blueprints/subscriber/__init__.py @@ -96,7 +96,9 @@ def login(): if form.validate_on_submit(): email = form.data["email"].lower() password = form.data["password"] - subscriber = Person.query.filter(func.lower(Person.email) == email.lower()).first() # noqa: E501 + subscriber = Person.query.filter( + func.lower(Person.email) == email.lower() + ).first() # noqa: E501 if subscriber is None: shopowner = User.query.filter_by(email=email).first() From 6603efdd845825bced075b4a731500f109648cae Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 8 Sep 2023 00:19:56 -0400 Subject: [PATCH 12/17] waiting more time before checking email --- .../tests/1226_shop_owner_new_subscriber_email.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js b/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js index 4ea4a744f..a6c61a0c4 100644 --- a/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js +++ b/tests/browser-automated-tests-playwright/tests/1226_shop_owner_new_subscriber_email.js @@ -33,7 +33,7 @@ test('@1226@shop-owner@check new subscriber email', async ({ page }) => { await new Promise(r => setTimeout(r, 10000)); checkNewSubscriberEmail.checkNewSubscriberEmail(); console.log("checking new subscriber email template"); - await new Promise(r => setTimeout(r, 5000)); + await new Promise(r => setTimeout(r, 10000)); const subscriber_name = checkNewSubscriberEmail.subscriber_name; expect(subscriber_name === "John Smith"); From 1c2cf6437bc53fe9a718f82d82fe24decf3e51ca Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 8 Sep 2023 01:15:11 -0400 Subject: [PATCH 13/17] changing order of the plan and removing a flaky test --- tests/browser-automated-tests-playwright/index.spec.js | 1 - tests/browser-automated-tests-playwright/worker3.spec.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/browser-automated-tests-playwright/index.spec.js b/tests/browser-automated-tests-playwright/index.spec.js index 4ca89cd4c..968ee1d3b 100644 --- a/tests/browser-automated-tests-playwright/index.spec.js +++ b/tests/browser-automated-tests-playwright/index.spec.js @@ -165,7 +165,6 @@ test.describe("Subscribie tests:", () => { console.log("Announced to Stripe connect account"); }); - const order_plan_with_only_recurring_charge = require('./tests/293_subscriber_order_plan_with_only_recurring_charge'); const order_plan_with_only_upfront_charge = require('./tests/293_subscriber_order_plan_with_only_upfront_charge'); diff --git a/tests/browser-automated-tests-playwright/worker3.spec.js b/tests/browser-automated-tests-playwright/worker3.spec.js index 6399f3644..35ae2d3ac 100644 --- a/tests/browser-automated-tests-playwright/worker3.spec.js +++ b/tests/browser-automated-tests-playwright/worker3.spec.js @@ -13,6 +13,8 @@ test.beforeEach(async ({ page }) => { const clear_DB = require('./tests/clear_db'); const categories_creation = require('./tests/452_shop_owner_categories_creation'); + + const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); const private_page_creation = require('./tests/334_shop_owner_private_page_creation'); @@ -24,6 +26,5 @@ test.beforeEach(async ({ page }) => { const uploading_plan_picture = require('./tests/872_uploading_plan_picture.js'); - const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); From f52763d475b8b726e794a56c0b94fee37575460d Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 8 Sep 2023 01:33:58 -0400 Subject: [PATCH 14/17] removing email test --- tests/browser-automated-tests-playwright/worker3.spec.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/browser-automated-tests-playwright/worker3.spec.js b/tests/browser-automated-tests-playwright/worker3.spec.js index 35ae2d3ac..a586aed6a 100644 --- a/tests/browser-automated-tests-playwright/worker3.spec.js +++ b/tests/browser-automated-tests-playwright/worker3.spec.js @@ -14,8 +14,6 @@ test.beforeEach(async ({ page }) => { const categories_creation = require('./tests/452_shop_owner_categories_creation'); - const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); - const private_page_creation = require('./tests/334_shop_owner_private_page_creation'); const public_page_creation = require('./tests/121_shop_owner_public_page_creation'); From 0d41c7df0a35fcc86443c5c3ae987dd1d74aa675 Mon Sep 17 00:00:00 2001 From: Joel Date: Sat, 9 Sep 2023 00:03:21 -0400 Subject: [PATCH 15/17] adding the new subscirber email test back --- tests/browser-automated-tests-playwright/worker3.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/browser-automated-tests-playwright/worker3.spec.js b/tests/browser-automated-tests-playwright/worker3.spec.js index a586aed6a..ae459f46b 100644 --- a/tests/browser-automated-tests-playwright/worker3.spec.js +++ b/tests/browser-automated-tests-playwright/worker3.spec.js @@ -24,5 +24,5 @@ test.beforeEach(async ({ page }) => { const uploading_plan_picture = require('./tests/872_uploading_plan_picture.js'); - + const new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); From 042e9f3401de611932b63ad4f9398355ef33ffbb Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 22 Sep 2023 21:37:17 -0400 Subject: [PATCH 16/17] removing unused tests and fixing 1226 test --- ...6_shop_owner_new_subscriber_email.spec.js} | 33 ++++-- ...r_order_plan_with_only_recurring_charge.js | 89 --------------- ...ber_order_plan_with_only_upfront_charge.js | 71 ------------ ..._plan_with_recurring_and_upfront_charge.js | 108 ------------------ 4 files changed, 25 insertions(+), 276 deletions(-) rename tests/browser-automated-tests-playwright/e2e/{1226_shop_owner_new_subscriber_email.js => 1226_shop_owner_new_subscriber_email.spec.js} (53%) delete mode 100644 tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_only_recurring_charge.js delete mode 100644 tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_only_upfront_charge.js delete mode 100644 tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_recurring_and_upfront_charge.js diff --git a/tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.js b/tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.spec.js similarity index 53% rename from tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.js rename to tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.spec.js index a6c61a0c4..ef4d125ca 100644 --- a/tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.js +++ b/tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.spec.js @@ -1,31 +1,48 @@ const { test, expect } = require('@playwright/test'); const checkNewSubscriberEmail= require('./checkNewSubscriberEmail.js'); const SUBSCRIBER_EMAIL_USER = process.env.SUBSCRIBER_EMAIL_USER; - +const { admin_login } = require('./features/admin_login'); test('@1226@shop-owner@check new subscriber email', async ({ page }) => { - // Adding admin email + await admin_login(page); await page.goto("/admin/add-shop-admin"); // Go to home before selecting product await page.fill('[name=email]', SUBSCRIBER_EMAIL_USER); await page.fill('[name=password]', 'password'); await page.click("text=Save"); - - //checkout to plan + console.log("Ordering plan with only recurring charge..."); + // Buy item with subscription & upfront fee await page.goto("/"); // Go to home before selecting product - await page.click('[name="Free plan"]'); + await page.click('[name="Bath Soaps"]'); // Fill in order form await page.fill('#given_name', 'John'); await page.fill('#family_name', 'Smith'); - await page.fill('#email', "test@example.com"); + await page.fill('#email', 'hello@example.com'); await page.fill('#mobile', '07123456789'); await page.fill('#address_line_one', '123 Short Road'); await page.fill('#city', 'London'); await page.fill('#postcode', 'L01 T3U'); - expect(await page.screenshot()).toMatchSnapshot('new-customer-form.png'); - await page.click('text="Continue to Payment"'); + await page.click('.btn-primary-lg'); + // Begin stripe checkout + const order_summary_content = await page.textContent(".title-1"); + expect(order_summary_content === "Order Summary"); + await page.click('#checkout-button'); + + //Verify first payment is correct (recuring charge only) + const payment_content = await page.textContent('div.mr2.flex-item.width-fixed'); + expect(payment_content === "£10.99"); + const recuring_charge_content = await page.textContent('.Text-fontSize--16'); + expect(recuring_charge_content === "Subscribe to Bath Soaps"); + // Pay with test card + await page.fill('#cardNumber', '4242 4242 4242 4242'); + await page.fill('#cardExpiry', '04 / 24'); + await page.fill('#cardCvc', '123'); + await page.fill('#billingName', 'John Smith'); + await page.selectOption('select#billingCountry', 'GB'); + await page.fill('#billingPostalCode', 'LN1 7FH'); + await page.click('.SubmitButton'); const order_complete_content = await page.textContent('.title-1'); expect(order_complete_content === "Order Complete!"); expect(await page.screenshot()).toMatchSnapshot('recurring-order-complete.png'); diff --git a/tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_only_recurring_charge.js b/tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_only_recurring_charge.js deleted file mode 100644 index 951acb7dc..000000000 --- a/tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_only_recurring_charge.js +++ /dev/null @@ -1,89 +0,0 @@ -const { test, expect } = require('@playwright/test'); -const SUBSCRIBER_EMAIL_USER = process.env.SUBSCRIBER_EMAIL_USER; -test.describe("order plan with only recurring charge test:", () => { - test("@293@subscriber@Ordering recurring plan", async ({ page }) => { - console.log("Ordering plan with only recurring charge..."); - // Buy item with subscription & upfront fee - await page.goto("/"); // Go to home before selecting product - await page.click('[name="Bath Soaps"]'); - - // Fill in order form - await page.fill('#given_name', 'John'); - await page.fill('#family_name', 'Smith'); - await page.fill('#email', SUBSCRIBER_EMAIL_USER); - await page.fill('#mobile', '07123456789'); - await page.fill('#address_line_one', '123 Short Road'); - await page.fill('#city', 'London'); - await page.fill('#postcode', 'L01 T3U'); - expect(await page.screenshot()).toMatchSnapshot('recurring-new-customer-form.png'); - await page.click('.btn-primary-lg'); - // Begin stripe checkout - const order_summary_content = await page.textContent(".title-1"); - expect(order_summary_content === "Order Summary"); - expect(await page.screenshot()).toMatchSnapshot('recurring-pre-stripe-checkout.png'); - await page.click('#checkout-button'); - - //Verify first payment is correct (recuring charge only) - const payment_content = await page.textContent('div.mr2.flex-item.width-fixed'); - expect(payment_content === "£10.99"); - const recuring_charge_content = await page.textContent('.Text-fontSize--16'); - expect(recuring_charge_content === "Subscribe to Bath Soaps"); - - // Pay with test card - await page.fill('#cardNumber', '4242 4242 4242 4242'); - await page.fill('#cardExpiry', '04 / 24'); - await page.fill('#cardCvc', '123'); - await page.fill('#billingName', 'John Smith'); - await page.selectOption('select#billingCountry', 'GB'); - await page.fill('#billingPostalCode', 'LN1 7FH'); - expect(await page.screenshot()).toMatchSnapshot('recurring-stripe-checkout-filled.png'); - await page.click('.SubmitButton'); - - // Verify get to the thank you page order complete - await new Promise(x => setTimeout(x, 8000)); //8 secconds - const order_complete_content = await page.textContent('.title-1'); - expect(order_complete_content === "Order Complete!"); - expect(await page.screenshot()).toMatchSnapshot('recurring-order-complete.png'); - - // Go to My Subscribers page - // Crude wait before we check subscribers to allow webhooks time - await new Promise(x => setTimeout(x, 5000)); //5 secconds - await page.goto('/admin/subscribers') - expect(await page.screenshot()).toMatchSnapshot('recurring-view-subscribers.png'); - - // Click Refresh Subscription - await page.click('#refresh_subscriptions'); // this is the refresh subscription - await page.textContent('.alert-heading') === "Notification"; - // screeshot to the active subscriber - await page.goto('admin/dashboard'); - expect(await page.screenshot()).toMatchSnapshot('recurring-active-subscribers.png'); - // go back to subscriptions - await page.goto('/admin/subscribers') - - // Verify that subscriber is present in the list - const subscriber_email_content = await page.textContent('.subscriber-email'); - expect(subscriber_email_content === SUBSCRIBER_EMAIL_USER); - - // Verify that plan is attached to subscriber - const subscriber_plan_title_content = await page.textContent('.subscription-title'); - expect(subscriber_plan_title_content === 'Bath Soaps'); - - const content_subscriber_plan_interval_amount = await page.textContent('.subscribers-plan-interval_amount'); - expect(content_subscriber_plan_interval_amount === '£10.99'); - - const subscriber_plan_sell_price_content = await page.evaluate(() => document.querySelector('.subscribers-plan-sell-price').textContent.indexOf("(No up-front fee)")); - expect(subscriber_plan_sell_price_content > -1) - - // Go to upcoming payments and ensure plan is attached to upcoming invoice - await page.goto('/admin/upcoming-invoices'); - // Fetch Upcoming Invoices - await page.click('#fetch_upcoming_invoices'); - await new Promise(x => setTimeout(x, 10000)); //10 secconds - const content_upcoming_invoice_plan_price_interval = await page.textContent('.plan-price-interval'); - expect(content_upcoming_invoice_plan_price_interval === '£10.99'); - - const content_upcoming_invoice_plan_sell_price = await page.textContent('.upcoming-invoices-plan-no-sell_price'); - expect(content_upcoming_invoice_plan_sell_price === '(No up-front cost)'); - }); -}); - diff --git a/tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_only_upfront_charge.js b/tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_only_upfront_charge.js deleted file mode 100644 index efceb8a1e..000000000 --- a/tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_only_upfront_charge.js +++ /dev/null @@ -1,71 +0,0 @@ -const { test, expect } = require('@playwright/test'); -const SUBSCRIBER_EMAIL_USER = process.env.SUBSCRIBER_EMAIL_USER; - -test.describe("order plan with only upfront charge tests:", () => { - test("@293@subscriber@Ordering upfront plan", async ({ page }) => { - console.log("Ordering plan with only upfront charge..."); - // Buy item with subscription & upfront fee - await page.goto('/'); // Go to home before selecting product - await page.click('[name="One-Off Soaps"]'); - - // Fill in order form - await page.fill('#given_name', 'John'); - await page.fill('#family_name', 'Smith'); - await page.fill('#email', SUBSCRIBER_EMAIL_USER); - await page.fill('#mobile', '07123456789'); - await page.fill('#address_line_one', '123 Short Road'); - await page.fill('#city', 'London'); - await page.fill('#postcode', 'L01 T3U'); - expect(await page.screenshot()).toMatchSnapshot('upfront-new-customer-form.png'); - await page.click('text="Continue to Payment"'); - - // Begin stripe checkout - const order_summary_content = await page.textContent(".title-1"); - expect(order_summary_content === "Order Summary"); - expect(await page.screenshot()).toMatchSnapshot('upfront-pre-stripe-checkout.png'); - await page.click('#checkout-button'); - - //Verify first payment is correct (upfront charge + first recuring charge) - const first_payment_content = await page.textContent('#ProductSummary-totalAmount'); - expect(first_payment_content === "£5.66"); - const upfront_charge_content = await page.textContent('.Text-fontSize--16'); - expect(upfront_charge_content === "One-Off Soaps"); - - // Pay with test card - await page.fill('#cardNumber', '4242 4242 4242 4242'); - await page.fill('#cardExpiry', '04 / 24'); - await page.fill('#cardCvc', '123'); - await page.fill('#billingName', 'John Smith'); - await page.selectOption('select#billingCountry', 'GB'); - await page.fill('#billingPostalCode', 'LN1 7FH'); - expect(await page.screenshot()).toMatchSnapshot('upfront-stripe-checkout-filled.png'); - await page.click('.SubmitButton'); - - // Verify get to the thank you page order complete - const order_complete_content = await page.textContent('.title-1'); - expect(order_complete_content === "Order Complete!"); - expect(await page.screenshot()).toMatchSnapshot('upfront-order-complete.png'); - - // Go to My Subscribers page - // Crude wait before we check subscribers to allow webhooks time - await new Promise(x => setTimeout(x, 5000)); //5 seconds - await page.goto('/admin/subscribers') - expect(await page.screenshot()).toMatchSnapshot('upfront-view-subscribers.png'); - - // Click Refresh Subscription - await page.click('#refresh_subscriptions'); // this is the refresh subscription - await page.textContent('.alert-heading') === "Notification"; - // screeshot to the active subscriber - await page.goto('admin/dashboard'); - expect(await page.screenshot()).toMatchSnapshot('upfront-active-subscribers.png'); - // go back to subscriptions - await page.goto('/admin/subscribers') - // Verify that subscriber is present in the list - const subscriber_email_content = await page.textContent('.subscriber-email'); - expect(subscriber_email_content === SUBSCRIBER_EMAIL_USER); - - // Verify that plan is attached to subscriber - const subscriber_plan_title_content = await page.textContent('.subscription-title'); - expect(subscriber_plan_title_content === 'One-Off Soaps'); - }); -}); diff --git a/tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_recurring_and_upfront_charge.js b/tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_recurring_and_upfront_charge.js deleted file mode 100644 index b9a16335a..000000000 --- a/tests/browser-automated-tests-playwright/e2e/293_subscriber_order_plan_with_recurring_and_upfront_charge.js +++ /dev/null @@ -1,108 +0,0 @@ -const { test, expect } = require('@playwright/test'); -const SUBSCRIBER_EMAIL_USER = process.env.SUBSCRIBER_EMAIL_USER; -test.describe("order plan with recurring and upfront charge test:", () => { - test("@293@subscriber@Ordering recurring and upfront plan", async ({ page }) => { - console.log("Ordering Plan with subscription and upfront charge"); - // Buy item with subscription & upfront fee - await page.goto('/'); // Go to home before selecting product - await page.click('[name="Hair Gel"]'); - - // Fill in order form - await page.fill('#given_name', 'John'); - await page.fill('#family_name', 'Smith'); - await page.fill('#email', SUBSCRIBER_EMAIL_USER); - await page.fill('#mobile', '07123456789'); - await page.fill('#address_line_one', '123 Short Road'); - await page.fill('#city', 'London'); - await page.fill('#postcode', 'L01 T3U'); - expect(await page.screenshot()).toMatchSnapshot('recurring-and-upfront-new-customer-form.png'); - await page.click('.btn-primary-lg'); - // Begin stripe checkout - const order_summary_content = await page.textContent(".title-1"); - expect(order_summary_content === "Order Summary"); - expect(await page.screenshot()).toMatchSnapshot('recurring-and-upfront-pre-stripe-checkout.png'); - await page.click('#checkout-button'); - - //Verify first payment is correct (upfront charge + first recuring charge) - const first_payment_content = await page.textContent('#ProductSummary-totalAmount'); - expect(first_payment_content === "£5.99"); - const recuring_charge_content = await page.textContent('.ProductSummaryDescription'); - expect(recuring_charge_content === "Then £5.99 per week"); - - // Pay with test card - await page.fill('#cardNumber', '4242 4242 4242 4242'); - await page.fill('#cardExpiry', '04 / 24'); - await page.fill('#cardCvc', '123'); - await page.fill('#billingName', 'John Smith'); - await page.selectOption('select#billingCountry', 'GB'); - - await page.fill('#billingPostalCode', 'LN1 7FH'); - expect(await page.screenshot()).toMatchSnapshot('recurring-and-upfront-stripe-checkout-filled.png'); - await page.click('.SubmitButton'); - - // Verify get to the thank you page order complete - const order_complete_content = await page.textContent('.title-1'); - expect(order_complete_content === "Order Complete!"); - expect(await page.screenshot()).toMatchSnapshot('recurring-and-upfront-order-complete.png'); - - // Go to My Subscribers page - // Crude wait before we check subscribers to allow webhooks time - await new Promise(x => setTimeout(x, 5000)); //5 secconds - await page.goto('admin/subscribers') - expect(await page.screenshot()).toMatchSnapshot('recurring-and-upfront-view-subscribers.png'); - - // Click Refresh Subscription - await page.click('#refresh_subscriptions'); // this is the refresh subscription - await page.textContent('.alert-heading') === "Notification"; - // screeshot to the active subscriber - await page.goto('admin/dashboard'); - expect(await page.screenshot()).toMatchSnapshot('recurring-and-upfront-active-subscribers.png'); - //go back to subscriptions - await page.goto('admin/subscribers') - - // Verify that subscriber is present in the list - const subscriber_email_content = await page.textContent('.subscriber-email'); - expect(subscriber_email_content === SUBSCRIBER_EMAIL_USER); - - // Verify that plan is attached to subscriber - const subscriber_subscription_title_content = await page.textContent('.subscription-title'); - expect(subscriber_subscription_title_content === 'Hair Gel'); - - // Verify transaction is present in 'All transactions page' - await page.goto('admin/transactions') - expect(await page.screenshot()).toMatchSnapshot('view-transactions.png'); - const transaction_content = await page.textContent('.transaction-amount'); - expect (transaction_content == '£5.99'); - - // Verify subscriber is linked to the transaction: - const transaction_subscriber_content = await page.textContent('.transaction-subscriber'); - expect (transaction_subscriber_content === 'John smith'); - - // Verify paid invoice has been generated & marked "paid": - await page.goto('admin/invoices') - expect(await page.screenshot()).toMatchSnapshot('recurring-and-upfront-view-paid-invoices.png'); - const content_paid_invoice_status = await page.textContent('.invoice-status'); - expect(content_paid_invoice_status === 'paid') - - const content_paid_invoice_amount = await page.textContent('.invoice-amount-paid'); - expect(content_paid_invoice_amount === '£5.99') - - // Verify upcoming invoice has been generated for the subscription: - await page.goto('admin/upcoming-invoices') - // Fetch Upcoming Invoices - await page.click('#fetch_upcoming_invoices'); - await new Promise(x => setTimeout(x, 10000)); //10 secconds - expect(await page.screenshot()).toMatchSnapshot('recurring-and-upfront-view-upcoming-invoices.png'); - const content_upcoming_invoice_amount = await page.textContent('.upcoming-invoice-amount'); - expect(content_upcoming_invoice_amount === '£5.99') - - // Verify Plan is attached to upcoming invoice, and recuring price & upfront price are correct - const content_upcoming_invoice_plan_recuring_amount = await page.textContent('.plan-price-interval'); - expect(content_upcoming_invoice_plan_recuring_amount === '£5.99') - const content_upcoming_invoice_plan_upfront_amount = await page.textContent('.plan-sell-price'); - expect(content_upcoming_invoice_plan_upfront_amount === '£1.00') - }); - const transaction_filter_by_name_and_by_plan_title = require('./shop_owner_transaction_filter_by_name_and_by_plan_title.js'); - const subscriber_filter_by_name_and_by_plan_title = require('./905-subscriber-search-by-email-and-name.js'); - const pause_resume_and_cancel_subscriptions = require('./shop_owner_pause_resume_and_cancel_subscriptions.js'); -}); From a1191cfff35a253c160c3e8d3fc7bea6725e0f85 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 22 Sep 2023 21:39:31 -0400 Subject: [PATCH 17/17] adding 1226 test to the pipeline --- .../e2e/1226_shop_owner_new_subscriber_email.spec.js | 2 +- .../browser-automated-tests-playwright/run-playwright-tests.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.spec.js b/tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.spec.js index ef4d125ca..50ba84073 100644 --- a/tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.spec.js +++ b/tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.spec.js @@ -3,7 +3,7 @@ const checkNewSubscriberEmail= require('./checkNewSubscriberEmail.js'); const SUBSCRIBER_EMAIL_USER = process.env.SUBSCRIBER_EMAIL_USER; const { admin_login } = require('./features/admin_login'); -test('@1226@shop-owner@check new subscriber email', async ({ page }) => { +test('@1226@shop-owner@check new subscriber email @1226_shop-owner_check_new_subscriber_email', async ({ page }) => { await admin_login(page); await page.goto("/admin/add-shop-admin"); // Go to home before selecting product diff --git a/tests/browser-automated-tests-playwright/run-playwright-tests.py b/tests/browser-automated-tests-playwright/run-playwright-tests.py index 58818c94e..13b05b633 100644 --- a/tests/browser-automated-tests-playwright/run-playwright-tests.py +++ b/tests/browser-automated-tests-playwright/run-playwright-tests.py @@ -24,6 +24,7 @@ "@475_shop_owner_create_free_trial", "@1005_shop_owner_terms_and_conditions_creation", ], + "@1226_shop-owner_check_new_subscriber_email": [], "@264_subscriber_order_plan_with_choice_options_and_required_note": [ "@stripe_connect", "@264_shop_owner_create_plan_with_choice_options",