From 812ecf93c8c57ddb8318a58bda924a6af12a9e51 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Sat, 25 Nov 2023 22:18:05 +0500 Subject: [PATCH] web: fix tag tests --- apps/web/__e2e__/models/editor.model.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/__e2e__/models/editor.model.ts b/apps/web/__e2e__/models/editor.model.ts index 80b8873ccc..c98c06f29c 100644 --- a/apps/web/__e2e__/models/editor.model.ts +++ b/apps/web/__e2e__/models/editor.model.ts @@ -171,7 +171,7 @@ export class EditorModel { await this.tagInput.fill(tag); await this.tagInput.press("Enter"); await this.tags - .locator(":scope", { hasText: new RegExp(`^${tag}$`) }) + .locator("span", { hasText: new RegExp(`^${tag}$`) }) .waitFor(); } } @@ -181,7 +181,7 @@ export class EditorModel { const count = await this.tags.count(); for (let i = 0; i < count; ++i) { const item = this.tags.nth(i); - const tag = await item.textContent(); + const tag = await item.locator("span").textContent(); if (tag) tags.push(tag); } return tags;