Skip to content

Commit

Permalink
#1386 update playwright tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsimpson committed Aug 11, 2024
1 parent 65411ae commit 1602d48
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
8 changes: 3 additions & 5 deletions subscribie/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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');

});
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit 1602d48

Please sign in to comment.