diff --git a/subscribie/models.py b/subscribie/models.py index 08e06eb3..9ea97ec4 100644 --- a/subscribie/models.py +++ b/subscribie/models.py @@ -422,8 +422,7 @@ def next_date(self): rrule.rrule( rrule.YEARLY, interval=1, - until=lambda: datetime.datetime.now(datetime.UTC) - + relativedelta(years=+1), + until=datetime.datetime.now(datetime.UTC) + relativedelta(years=+1), dtstart=pytz.utc.localize(self.created_at), ) )[-1] @@ -432,8 +431,7 @@ def next_date(self): rrule.rrule( rrule.WEEKLY, interval=1, - until=lambda: datetime.datetime.now(datetime.UTC) - + relativedelta(weeks=+1), + until=datetime.datetime.now(datetime.UTC) + relativedelta(weeks=+1), dtstart=pytz.utc.localize(self.created_at), ) )[-1] @@ -442,7 +440,7 @@ def next_date(self): rrule.rrule( rrule.MONTHLY, interval=1, - until=lambda: datetime.datetime.now(datetime.UTC) + until=datetime.datetime.now(datetime.UTC) + relativedelta(months=+1), dtstart=pytz.utc.localize(self.created_at), ) diff --git a/tests/browser-automated-tests-playwright/e2e/293-3_subscriber_order_plan_with_recurring_and_upfront_charge.spec.js b/tests/browser-automated-tests-playwright/e2e/293-3_subscriber_order_plan_with_recurring_and_upfront_charge.spec.js index dfbf81f1..206579ac 100644 --- a/tests/browser-automated-tests-playwright/e2e/293-3_subscriber_order_plan_with_recurring_and_upfront_charge.spec.js +++ b/tests/browser-automated-tests-playwright/e2e/293-3_subscriber_order_plan_with_recurring_and_upfront_charge.spec.js @@ -29,7 +29,7 @@ test.describe("order plan with recurring and upfront charge test:", () => { //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'); + const recuring_charge_content = await page.textContent('#ProductSummary-description'); expect(recuring_charge_content === "Then £5.99 per week"); // Pay with test card diff --git a/tests/browser-automated-tests-playwright/e2e/387_shop_owner_change_shop_colour.spec.js b/tests/browser-automated-tests-playwright/e2e/387_shop_owner_change_shop_colour.spec.js index c1d2fd26..99ca0899 100644 --- a/tests/browser-automated-tests-playwright/e2e/387_shop_owner_change_shop_colour.spec.js +++ b/tests/browser-automated-tests-playwright/e2e/387_shop_owner_change_shop_colour.spec.js @@ -17,7 +17,6 @@ test("@387@shop-owner@change_shop_colour @387_shop_owner_change_shop_colour", as await new Promise(x => setTimeout(x, 3000)); await page.fill('input[name="font"]', "000000"); await page.click('text="Save"'); - expect(await page.screenshot()).toMatchSnapshot('changing-shop-colour.png'); // check if its changed console.log("checking if shop style has changed"); @@ -26,6 +25,4 @@ test("@387@shop-owner@change_shop_colour @387_shop_owner_change_shop_colour", as //screenshot of the changed style shop; await page.goto('/'); - expect(await page.screenshot()).toMatchSnapshot('changed shop color.png'); - }); diff --git a/tests/browser-automated-tests-playwright/e2e/463_shop_owner_adding_vat.spec.js b/tests/browser-automated-tests-playwright/e2e/463_shop_owner_adding_vat.spec.js index 9591e3ba..fd2f3302 100644 --- a/tests/browser-automated-tests-playwright/e2e/463_shop_owner_adding_vat.spec.js +++ b/tests/browser-automated-tests-playwright/e2e/463_shop_owner_adding_vat.spec.js @@ -15,7 +15,6 @@ test("@463@shop-owner@adding VAT @463_shop_owner_adding_vat", async ({ page }) = await page.click('text="Yes. Charge VAT at 20%"'); await new Promise(x => setTimeout(x, 1000)); - expect(await page.screenshot()).toMatchSnapshot('adding-VAT.png'); await page.click('text="Save"'); await page.textContent('.alert-heading') === "Notification";