diff --git a/tests/browser-automated-tests-playwright/e2e/293-1_subscriber_order_plan_with_only_recurring_charge.spec.js b/tests/browser-automated-tests-playwright/e2e/293-1_subscriber_order_plan_with_only_recurring_charge.spec.js index 85a2fb6b..1aec47d6 100644 --- a/tests/browser-automated-tests-playwright/e2e/293-1_subscriber_order_plan_with_only_recurring_charge.spec.js +++ b/tests/browser-automated-tests-playwright/e2e/293-1_subscriber_order_plan_with_only_recurring_charge.spec.js @@ -5,9 +5,9 @@ const { set_test_name_cookie } = require('./features/set_test_name_cookie'); const SUBSCRIBER_EMAIL_USER = process.env.TEST_SUBSCRIBER_EMAIL_USER; test.describe("order plan with only recurring charge test:", () => { - test("@293-1@subscriber@Ordering recurring plan @293_shop_owner_order_recurring_plan", async ({ page }) => { + test("@293-1@subscriber@Ordering recurring plan @293_subscriber_order_recurring_plan", async ({ page }) => { await admin_login(page); - await set_test_name_cookie(page, "@293_shop_owner_order_recurring_plan") + await set_test_name_cookie(page, "@293_subscriber_order_recurring_plan") console.log("Ordering plan with only recurring charge..."); // Buy item with subscription & upfront fee diff --git a/tests/browser-automated-tests-playwright/e2e/293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge.spec.js b/tests/browser-automated-tests-playwright/e2e/293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge.spec.js index b5c767de..56bd9a70 100644 --- a/tests/browser-automated-tests-playwright/e2e/293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge.spec.js +++ b/tests/browser-automated-tests-playwright/e2e/293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge.spec.js @@ -5,9 +5,9 @@ const { fetch_upcomming_invoices } = require('./features/fetch_upcomming_invoice const SUBSCRIBER_EMAIL_USER = process.env.TEST_SUBSCRIBER_EMAIL_USER; test.describe("order plan with recurring and upfront charge test:", () => { - test("@293-3 @293-3_subscriber_order_plan_with_recurring_and_upfront_charge", async ({ page }) => { - console.log("@293-3_subscriber_order_plan_with_recurring_and_upfront_charge"); - await set_test_name_cookie(page, "@293-3_subscriber_order_plan_with_recurring_and_upfront_charge") + test("@293-3 @293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge", async ({ page }) => { + console.log("@293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge"); + await set_test_name_cookie(page, "@293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge") // Buy item with subscription & upfront fee await page.goto('/'); // Go to home before selecting product await page.click('[name="Hair Gel"]'); diff --git a/tests/browser-automated-tests-playwright/e2e/334_shop_owner_private_page_creation.spec.js b/tests/browser-automated-tests-playwright/e2e/334_shop_owner_private_page_creation.spec.js index 812d2396..73308470 100644 --- a/tests/browser-automated-tests-playwright/e2e/334_shop_owner_private_page_creation.spec.js +++ b/tests/browser-automated-tests-playwright/e2e/334_shop_owner_private_page_creation.spec.js @@ -7,7 +7,6 @@ test("@334@shop-owner@Creating Private Page @334-shop-owner-create-private-page" await admin_login(page); await set_test_name_cookie(page, "@334-shop-owner-create-private-page"); await page.goto('/page/privatetestpage'); - await new Promise(x => setTimeout(x, 5000)); console.log("Continuing with Private page creation"); await page.goto('/pages/add-page'); @@ -17,22 +16,18 @@ test("@334@shop-owner@Creating Private Page @334-shop-owner-create-private-page" const page_created = await page.content("#alert-heading"); expect(page_created === "Notification"); console.log("Page already created, now configuring to private"); - await new Promise(x => setTimeout(x, 3000)); await page.goto('/pages/private-pages'); const private_page_feature = await page.content("text='Update Private Pages'"); expect(private_page_feature === "Update Private Pages"); page.click("input[type=checkbox]"); - await new Promise(x => setTimeout(x, 2000)); page.click("text='Submit'"); - await new Promise(x => setTimeout(x, 2000)); const private_page_created = await page.content("#alert-heading"); expect(private_page_created === "Notification"); console.log("Private Page created"); await page.goto('/page/privatetestpage'); - await new Promise(x => setTimeout(x, 2000)); const visiting_private_page = await page.textContent("text='This is a Private Page'"); expect(visiting_private_page === "This is a Private Page"); console.log("Private Page succedded"); @@ -44,7 +39,6 @@ test("@334@shop-owner@Creating Private Page @334-shop-owner-create-private-page" console.log("Logged out"); await page.goto('/page/privatetestpage'); - await new Promise(x => setTimeout(x, 3000)); let private_page_content = await page.evaluate(() => document.body.textContent); if (private_page_content.indexOf("This is a Private Page") > -1) { console.log("ERROR: the page is not private") diff --git a/tests/browser-automated-tests-playwright/run-playwright-tests.py b/tests/browser-automated-tests-playwright/run-playwright-tests.py index 96da486a..6d9a58c0 100644 --- a/tests/browser-automated-tests-playwright/run-playwright-tests.py +++ b/tests/browser-automated-tests-playwright/run-playwright-tests.py @@ -24,19 +24,19 @@ "@475_subscriber_order_plan_with_free_trial", "@264_subscriber_order_plan_with_choice_options_and_required_note", "@133_subscriber_order_plan_with_cooling_off_period", - "@293_shop_owner_order_recurring_plan", + "@293_subscriber_order_recurring_plan", "@293-2_subscriber_order_plan_with_only_upfront_charge", - "@293-3_subscriber_order_plan_with_recurring_and_upfront_charge", + "@293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge", "@939_subscriber_order_free_plan_with_terms_and_conditions", ], - "@293-3_subscriber_order_plan_with_recurring_and_upfront_charge": [ + "@293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge": [ "@stripe_connect", - "@293_shop_owner_order_recurring_plan", + "@293_subscriber_order_recurring_plan", "@463_subscriber_order_plan_with_vat", "@475_subscriber_order_plan_with_free_trial", "@264_subscriber_order_plan_with_choice_options_and_required_note", "@133_subscriber_order_plan_with_cooling_off_period", - "@293_shop_owner_order_recurring_plan", + "@293_subscriber_order_recurring_plan", "@293-2_subscriber_order_plan_with_only_upfront_charge", "@939_subscriber_order_free_plan_with_terms_and_conditions", ], @@ -48,11 +48,11 @@ "@stripe_connect", "@475_shop_owner_create_free_trial", "@1005_shop_owner_terms_and_conditions_creation", - "@293_shop_owner_order_recurring_plan", + "@293_subscriber_order_recurring_plan", "@463_subscriber_order_plan_with_vat", "@264_subscriber_order_plan_with_choice_options_and_required_note", "@133_subscriber_order_plan_with_cooling_off_period", - "@293_shop_owner_order_recurring_plan", + "@293_subscriber_order_recurring_plan", "@293-2_subscriber_order_plan_with_only_upfront_charge", "@939_subscriber_order_free_plan_with_terms_and_conditions", ], @@ -64,7 +64,7 @@ "@stripe_connect", "@133_shop_owner_create_plan_with_cooling_off_period", ], - "@293_shop_owner_order_recurring_plan": [ + "@293_subscriber_order_recurring_plan": [ "@stripe_connect", ], "@293-2_subscriber_order_plan_with_only_upfront_charge": [ @@ -72,13 +72,13 @@ ], "@619_shop_owner_transaction_filter_by_name_and_by_plan_title": [ "@stripe_connect", - "@293-3_subscriber_order_plan_with_recurring_and_upfront_charge", + "@293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge", ], "@905-subscriber-search-by-email-and-name": [ - "@293-3_subscriber_order_plan_with_recurring_and_upfront_charge" + "@293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge" ], "@147_shop_owner_pause_resume_and_cancel_subscriptions": [ - "@293-3_subscriber_order_plan_with_recurring_and_upfront_charge" + "@293-3_subscriber_order_plan_with_weekly_recurring_and_upfront_charge" ], "@872_uploading_plan_picture": [], "@1005_shop_owner_terms_and_conditions_creation": [ @@ -142,8 +142,8 @@ def run_test(test_name: str): print(f"Running test {test_name}") output_path = "./test-videos/" + test_name[1:] result = subprocess.run( - # f"npx playwright test --grep {test_name} --headed --retries 0 --update-snapshots", - f"npx playwright test --update-snapshots --grep '{test_name}' --output '{output_path}'", + # f"npx playwright test --grep {test_name} --headed --retries 0 --update-snapshots", # noqa: E501 + f"npx playwright test --update-snapshots --grep '{test_name}' --output '{output_path}'", # noqa: E501 shell=True, ) if result.returncode != 0: