fix: playwright test

This commit is contained in:
DarkPhoenix2704
2024-05-02 04:08:36 +00:00
parent b4bde7336f
commit 82ec885222

View File

@@ -41,7 +41,14 @@ export class CalendarWeekDateTimePage extends BasePage {
await this.rootPage.waitForTimeout(500);
await this.rootPage.mouse.move(cord.x + cord.width / 2, cord.y + cord.height / 2);
await this.rootPage.mouse.up();
await this.waitForResponse({
uiAction: async () => {
await this.rootPage.mouse.up();
},
requestUrlPathToMatch: '/api/v1/db/data',
httpMethodsToMatch: ['PATCH'],
});
}
async selectHour({ hourIndex, dayIndex }: { dayIndex: number; hourIndex: number }) {
@@ -54,8 +61,8 @@ export class CalendarWeekDateTimePage extends BasePage {
hour.click({
force: true,
position: {
x: -1,
y: -1,
x: 1,
y: 1,
},
}),
requestUrlPathToMatch: '/api/v1/db/data/noco',