diff --git a/.github/workflows/demo-videos.yml b/.github/workflows/demo-videos.yml index 740b5c0c1..9239ac06a 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 010520843..c4f92fffd 100644 --- a/.github/workflows/pr-demo-deploy.yml +++ b/.github/workflows/pr-demo-deploy.yml @@ -117,6 +117,7 @@ jobs: RESET_PASSWORD_IMAP_SEARCH_SUBJECT: ${{ secrets.RESET_PASSWORD_IMAP_SEARCH_SUBJECT }} IMAP_SEARCH_UNSEEN: "1" 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 diff --git a/.github/workflows/remove-inactive-pr-previews.py b/.github/workflows/remove-inactive-pr-previews.py index 600407737..1790be7dc 100644 --- a/.github/workflows/remove-inactive-pr-previews.py +++ b/.github/workflows/remove-inactive-pr-previews.py @@ -37,7 +37,9 @@ head_ref = pull_request["head"]["ref"] find_hyphen = head_ref.rfind("-") head_ref = head_ref[:60].lower() - container_name = head_ref[:find_hyphen] + head_ref[find_hyphen + 1 :] + # 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}" ) diff --git a/subscribie/blueprints/checkout/__init__.py b/subscribie/blueprints/checkout/__init__.py index dc8af5b54..05fa830b3 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..1155966b4 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"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: msg["reply-to"] = setting.reply_to_email_address 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 new file mode 100644 index 000000000..50ba84073 --- /dev/null +++ b/tests/browser-automated-tests-playwright/e2e/1226_shop_owner_new_subscriber_email.spec.js @@ -0,0 +1,57 @@ +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 @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 + await page.fill('[name=email]', SUBSCRIBER_EMAIL_USER); + await page.fill('[name=password]', 'password'); + await page.click("text=Save"); + 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', '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'); + 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'); + + await new Promise(r => setTimeout(r, 10000)); + checkNewSubscriberEmail.checkNewSubscriberEmail(); + console.log("checking new subscriber email template"); + await new Promise(r => setTimeout(r, 10000)); + const subscriber_name = checkNewSubscriberEmail.subscriber_name; + expect(subscriber_name === "John Smith"); + +}); 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'); -}); diff --git a/tests/browser-automated-tests-playwright/e2e/checkNewSubscriberEmail.js b/tests/browser-automated-tests-playwright/e2e/checkNewSubscriberEmail.js new file mode 100644 index 000000000..3f59b0323 --- /dev/null +++ b/tests/browser-automated-tests-playwright/e2e/checkNewSubscriberEmail.js @@ -0,0 +1,69 @@ +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!')) { + 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"); + 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/run-playwright-tests.py b/tests/browser-automated-tests-playwright/run-playwright-tests.py index 705fc3b38..c270cf1db 100644 --- a/tests/browser-automated-tests-playwright/run-playwright-tests.py +++ b/tests/browser-automated-tests-playwright/run-playwright-tests.py @@ -28,6 +28,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", diff --git a/tests/browser-automated-tests-playwright/worker2.spec.js b/tests/browser-automated-tests-playwright/worker2.spec.js index d6fb2653b..0d06e6b04 100644 --- a/tests/browser-automated-tests-playwright/worker2.spec.js +++ b/tests/browser-automated-tests-playwright/worker2.spec.js @@ -22,12 +22,12 @@ 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'); + 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 b263367e0..e07f78c99 100644 --- a/tests/browser-automated-tests-playwright/worker3.spec.js +++ b/tests/browser-automated-tests-playwright/worker3.spec.js @@ -25,8 +25,10 @@ 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 new_subscriber_email = require('./tests/1226_shop_owner_new_subscriber_email.js'); +<<<<<<< HEAD +======= const ordering_plan_with_VAT = require('./tests/463_subscriber_ordering_plan_with_VAT'); const subscriber_magic_login = require('./tests/623_subscriber_magic_login'); @@ -38,4 +40,4 @@ test.beforeEach(async ({ page }) => { 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'); -*/ \ No newline at end of file +*/