From 6c81eb28029e9298b18b6b34c3b19c4f0a807f83 Mon Sep 17 00:00:00 2001 From: shashwata Date: Fri, 16 Feb 2024 13:21:28 +0600 Subject: [PATCH] update locators --- tests/pw/pages/selectors.ts | 4 ++-- tests/pw/tests/api/announcements.spec.ts | 1 - tests/pw/utils/schemas.ts | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/pw/pages/selectors.ts b/tests/pw/pages/selectors.ts index c94315c58c..f1ae0cddfa 100644 --- a/tests/pw/pages/selectors.ts +++ b/tests/pw/pages/selectors.ts @@ -7466,8 +7466,8 @@ export const selector = { cWooSelector: { wooCommerceSuccessMessage: '.woocommerce-message', - wooCommerceError: '.woocommerce .is-error', - wooCommerceInfo: '.woocommerce .is-info', + wooCommerceError: '.woocommerce-error', + wooCommerceInfo: '.woocommerce-info', wooCommerceNoriceBanner: 'div.wc-block-components-notice-banner', wooCommerceNoriceBannerContent: 'div.wc-block-components-notice-banner__content', }, diff --git a/tests/pw/tests/api/announcements.spec.ts b/tests/pw/tests/api/announcements.spec.ts index c247608c48..b418147d8b 100644 --- a/tests/pw/tests/api/announcements.spec.ts +++ b/tests/pw/tests/api/announcements.spec.ts @@ -31,7 +31,6 @@ test.describe('announcements api test', () => { const [response, responseBody] = await apiUtils.get(endPoints.getAllAnnouncements); expect(response.ok()).toBeTruthy(); expect(responseBody).toBeTruthy(); - console.log(responseBody); expect(responseBody).toMatchSchema(schemas.announcementsSchema.announcementsSchema); }); diff --git a/tests/pw/utils/schemas.ts b/tests/pw/utils/schemas.ts index 853fda373f..ad4733e94a 100644 --- a/tests/pw/utils/schemas.ts +++ b/tests/pw/utils/schemas.ts @@ -652,6 +652,7 @@ export const schemas = { }), }), + m: z.coerce.date(), announcementsSchema: z.array( z.object({ id: z.number(), @@ -662,7 +663,7 @@ export const schemas = { status: z.enum(['all', 'publish', 'pending', 'draft', 'future', 'trash']), read_status: z.enum(['read', 'unread', '']), date: z.coerce.date(), - date_gmt: z.coerce.date(), + date_gmt: z.coerce.date().or(z.string()), human_readable_date: z.string(), announcement_sellers: z.array( z.object({