[REF] mail, *: tests: remove last occurences of jQuery in contains()

* = im_livechat, project_todo, test_mail, web

closes odoo/odoo#136425

Related: odoo/enterprise#47825
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Sébastien Theys
2023-09-27 07:28:08 +00:00
parent 1f7d650da5
commit aee3cb8929
12 changed files with 90 additions and 95 deletions
@@ -30,8 +30,10 @@ QUnit.test("Can invite a partner to a livechat channel", async () => {
const { openDiscuss } = await start();
openDiscuss(channelId);
await click("button[title='Add Users']");
await click(".o-discuss-ChannelInvitation-selectable:contains(James) input");
await click("button:contains(Invite):enabled");
await click("input", {
parent: [".o-discuss-ChannelInvitation-selectable", { text: "James" }],
});
await click("button:enabled", { text: "Invite" });
await contains(".o-discuss-ChannelInvitation", { count: 0 });
await click("button[title='Show Member List']");
await contains(".o-discuss-ChannelMember", { text: "James" });
@@ -107,8 +109,8 @@ QUnit.test("Partners invited most frequently by the current user come first", as
await openDiscuss();
await click(".o-mail-DiscussSidebarChannel", { text: "Visitor #1" });
await click("button[title='Add Users']");
await click(".o-discuss-ChannelInvitation-selectable:contains(John) input");
await click("button:contains(Invite):enabled");
await click("input", { parent: [".o-discuss-ChannelInvitation-selectable", { text: "John" }] });
await click("button:enabled", { text: "Invite" });
await click(".o-mail-DiscussSidebarChannel", { text: "Visitor #2" });
await click("button[title='Add Users']");
await contains(".o-discuss-ChannelInvitation-selectable", { count: 2 });
@@ -40,11 +40,9 @@ QUnit.test("add livechat in the sidebar on visitor sending first message", async
message_content: "new message",
})
);
await contains(".o-mail-DiscussSidebarCategory-livechat");
await contains(".o-mail-DiscussSidebarCategory-livechat + .o-mail-DiscussSidebarChannel");
await contains(
".o-mail-DiscussSidebarCategory-livechat + .o-mail-DiscussSidebarChannel:contains(Visitor (Belgium))"
);
await contains(".o-mail-DiscussSidebarCategory-livechat + .o-mail-DiscussSidebarChannel", {
text: "Visitor (Belgium)",
});
});
QUnit.test("invite button should be present on livechat", async () => {
@@ -68,7 +68,7 @@ QUnit.test("Feedback with rating and comment", async (assert) => {
assert.verifySteps(["/im_livechat/visitor_leave_session"]);
await click(`img[data-alt="${RATING.GOOD}"]`);
await insertText("textarea[placeholder='Explain your note']", "Good job!");
await click("button:contains(Send):enabled");
await click("button:enabled", { text: "Send" });
await contains("p", { text: "Thank you for your feedback" });
assert.verifySteps(["/im_livechat/feedback"]);
});
@@ -256,5 +256,5 @@ QUnit.test("tab on composer doesn't switch thread if no unread thread", async ()
await openDiscuss(channelIds[0]);
await focus(".o-mail-Composer-input");
triggerHotkey("Tab");
await contains(".o-mail-DiscussSidebarChannel.o-active:contains(Visitor 11)");
await contains(".o-mail-DiscussSidebarChannel.o-active", { text: "Visitor 11" });
});
@@ -24,10 +24,10 @@ QUnit.test('livechats should be in "chat" filter', async () => {
});
await start();
await click(".o_menu_systray i[aria-label='Messages']");
await contains(".o-mail-MessagingMenu button:contains(All).fw-bolder");
await contains(".o-mail-MessagingMenu button.fw-bolder", { text: "All" });
await contains(".o-mail-NotificationItem", { text: "Visitor 11" });
await click(".o-mail-MessagingMenu button", { text: "Chats" });
await contains(".o-mail-MessagingMenu button:contains(Chat).fw-bolder");
await contains(".o-mail-MessagingMenu button.fw-bolder", { text: "Chats" });
await contains(".o-mail-NotificationItem", { text: "Visitor 11" });
});
@@ -48,7 +48,7 @@ QUnit.test("Known user with country", async () => {
});
const { openDiscuss } = await start();
openDiscuss();
await contains(".o-mail-DiscussSidebarChannel:contains(Jean (Belgium))");
await contains(".o-mail-DiscussSidebarChannel", { text: "Jean (Belgium)" });
});
QUnit.test("Do not show channel when visitor is typing", async () => {
@@ -30,8 +30,10 @@ QUnit.test("Thread name unchanged when inviting new users", async () => {
await openDiscuss(channelId);
await contains(".o-mail-Discuss-threadName[title='Visitor #20']");
await click("button[title='Add Users']");
await click(".o-discuss-ChannelInvitation-selectable:contains(James) input");
await click("button:contains(Invite):enabled");
await click("input", {
parent: [".o-discuss-ChannelInvitation-selectable", { text: "James" }],
});
await click("button:enabled", { text: "Invite" });
await contains(".o-discuss-ChannelInvitation", { count: 0 });
await click("button[title='Show Member List']");
await contains(".o-discuss-ChannelMember", { text: "James" });
@@ -41,11 +41,11 @@ QUnit.test("simplest layout of a followed subtype", async () => {
await click(".o-mail-Followers-button");
await click("button[title='Edit subscription']");
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId}] label`,
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId}'] label`,
{ text: "TestSubtype" }
);
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId}] input[type='checkbox']:checked`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId}'] input[type='checkbox']:checked`
);
});
@@ -81,7 +81,7 @@ QUnit.test("simplest layout of a not followed subtype", async () => {
await click(".o-mail-Followers-button");
await click("button[title='Edit subscription']");
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId}] input[type='checkbox']:not(:checked)`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId}'] input[type='checkbox']:not(:checked)`
);
});
@@ -117,19 +117,19 @@ QUnit.test("toggle follower subtype checkbox", async () => {
await click(".o-mail-Followers-button");
await click("button[title='Edit subscription']");
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId}] input[type='checkbox']:not(:checked)`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId}'] input[type='checkbox']:not(:checked)`
);
await click(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId}] input[type='checkbox']`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId}'] input[type='checkbox']`
);
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId}] input[type='checkbox']:checked`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId}'] input[type='checkbox']:checked`
);
await click(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId}] input[type='checkbox']`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId}'] input[type='checkbox']`
);
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId}] input[type='checkbox']:not(:checked)`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId}'] input[type='checkbox']:not(:checked)`
);
});
@@ -161,22 +161,22 @@ QUnit.test("follower subtype apply", async () => {
await click("button[title='Edit subscription']");
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId1}] input[type='checkbox']:checked`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId1}'] input[type='checkbox']:checked`
);
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId2}] input[type='checkbox']:not(:checked)`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId2}'] input[type='checkbox']:not(:checked)`
);
await click(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId1}] input[type='checkbox']`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId1}'] input[type='checkbox']`
);
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId1}] input[type='checkbox']:not(:checked)`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId1}'] input[type='checkbox']:not(:checked)`
);
await click(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId2}] input[type='checkbox']`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId2}'] input[type='checkbox']`
);
await contains(
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id=${subtypeId2}] input[type='checkbox']:checked`
`.o-mail-FollowerSubtypeDialog-subtype[data-follower-subtype-id='${subtypeId2}'] input[type='checkbox']:checked`
);
await click(".modal-footer button", { text: "Apply" });
await contains(".o_notification", {
@@ -10,18 +10,18 @@ QUnit.test("create todo from activity menu without date", async function () {
await contains(".o_menu_systray i[aria-label='Activities']");
await contains(".o-mail-ActivityMenu-counter", { count: 0 });
await click(".o_menu_systray i[aria-label='Activities']");
await contains(
".o-mail-ActivityMenu:contains(Congratulations, you're done with your activities.)"
);
await contains(".o-mail-ActivityMenu", {
text: "Congratulations, you're done with your activities.",
});
await click(".btn", { text: "Add a To-do" });
await contains(".btn", { count: 0, text: "Add a To-do" });
await contains(".o-mail-ActivityMenu-show");
await insertText("input.o-mail-ActivityMenu-input", "New To-do");
await click(".btn", { text: "SAVE" });
await contains(
".o_notification:contains(Your to-do has been successfully added to your tasks and scheduled for completion.)"
);
await contains(".o_notification", {
text: "Your to-do has been successfully added to your tasks and scheduled for completion.",
});
// Need to reopen systray as it automatically closes when a todo is created
await click(".o_menu_systray i[aria-label='Activities']");
await contains(".o-mail-ActivityMenu-counter", { text: "1" });
@@ -36,10 +36,10 @@ QUnit.test("create todo from activity menu without date", async function () {
await insertText("input.o-mail-ActivityMenu-input", "New To-do");
await click(".btn", { text: "SAVE" });
// Need to reopen systray as it automatically closes when a todo is created
await contains(
".o_notification:contains(Your to-do has been successfully added to your tasks and scheduled for completion.)",
{ count: 2 }
);
await contains(".o_notification", {
count: 2,
text: "Your to-do has been successfully added to your tasks and scheduled for completion.",
});
await click(".o_menu_systray i[aria-label='Activities']");
await contains(".o-mail-ActivityMenu-counter", { text: "2" });
await contains(".btn", { text: "2 Today" });
@@ -66,9 +66,9 @@ QUnit.test("create to-do from activity menu with date", async function () {
}
);
await click(".btn", { text: "SAVE" });
await contains(
".o_notification:contains(Your to-do has been successfully added to your tasks and scheduled for completion.)"
);
await contains(".o_notification", {
text: "Your to-do has been successfully added to your tasks and scheduled for completion.",
});
// Need to reopen systray as it automatically closes when a todo is created
await click(".o_menu_systray i[aria-label='Activities']");
await contains(".o-mail-ActivityMenu-counter", { text: "1" });
@@ -20,9 +20,9 @@ QUnit.test("menu with no records", async () => {
},
});
await click(".o_menu_systray .dropdown-toggle:has(i[aria-label='Activities'])");
await contains(
".o-mail-ActivityMenu:contains(Congratulations, you're done with your activities.)"
);
await contains(".o-mail-ActivityMenu", {
text: "Congratulations, you're done with your activities.",
});
});
QUnit.test("do not show empty text when at least some future activities", async () => {
@@ -39,10 +39,10 @@ QUnit.test("do not show empty text when at least some future activities", async
]);
await start();
await click(".o_menu_systray .dropdown-toggle:has(i[aria-label='Activities'])");
await contains(
".o-mail-ActivityMenu:contains(Congratulations, you're done with your activities.)",
{ count: 0 }
);
await contains(".o-mail-ActivityMenu", {
count: 0,
text: "Congratulations, you're done with your activities.",
});
});
QUnit.test("activity menu widget: activity menu with 2 models", async (assert) => {
@@ -145,15 +145,15 @@ QUnit.test("activity menu widget: activity view icon", async (assert) => {
const { env } = await start();
await click(".o_menu_systray i[aria-label='Activities']");
await contains("button[title='Summary']", { count: 2 });
const first = $(".o-mail-ActivityGroup:contains('res.partner') button[title='Summary']");
const second = $(
".o-mail-ActivityGroup:contains('mail.test.activity') button[title='Summary']"
);
assert.ok(first);
assert.hasClass(first, "fa-clock-o");
assert.ok(second);
assert.hasClass(second, "fa-clock-o");
assert.strictEqual($(".dropdown-menu").parents(".show").length, 1);
await contains(".o-mail-ActivityGroup", {
text: "res.partner",
contains: ["button[title='Summary'].fa-clock-o"],
});
await contains(".o-mail-ActivityGroup", {
text: "mail.test.activity",
contains: ["button[title='Summary'].fa-clock-o"],
});
await contains(".show .dropdown-menu");
patchWithCleanup(env.services.action, {
doAction(action) {
if (action.name) {
@@ -165,14 +165,18 @@ QUnit.test("activity menu widget: activity view icon", async (assert) => {
}
},
});
await click(".o-mail-ActivityGroup:contains('mail.test.activity') button[title='Summary']");
await click("button[title='Summary']", {
parent: [".o-mail-ActivityGroup", { text: "mail.test.activity" }],
});
await contains(".dropdown-menu", { count: 0 });
await click(".o_menu_systray i[aria-label='Activities']");
await click(".o-mail-ActivityGroup:contains('res.partner') button[title='Summary']");
await click("button[title='Summary']", {
parent: [".o-mail-ActivityGroup", { text: "res.partner" }],
});
assert.verifySteps(["do_action:mail.test.activity", "do_action:res.partner"]);
});
QUnit.test("activity menu widget: close on messaging menu click", async (assert) => {
QUnit.test("activity menu widget: close on messaging menu click", async () => {
await start();
await click(".o_menu_systray i[aria-label='Activities']");
await contains(".o-mail-ActivityMenu");
@@ -59,7 +59,7 @@ QUnit.test("basic rendering of tracking value (float type)", async function () {
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking");
await contains(".o-mail-Message-trackingField");
await contains(".o-mail-Message-trackingField:contains('(Float)')");
await contains(".o-mail-Message-trackingField", { text: "(Float)" });
await contains(".o-mail-Message-trackingOld");
await contains(".o-mail-Message-trackingOld", { text: "12.30" });
await contains(".o-mail-Message-trackingSeparator");
@@ -75,7 +75,7 @@ QUnit.test("rendering of tracked field of type float: from non-0 to 0", async fu
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=float_field] input", "0", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('1.000.00(Float)')");
await contains(".o-mail-Message-tracking", { text: "1.000.00(Float)" });
});
QUnit.test("rendering of tracked field of type float: from 0 to non-0", async function () {
@@ -86,7 +86,7 @@ QUnit.test("rendering of tracked field of type float: from 0 to non-0", async fu
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=float_field] input", "1", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('0.001.00(Float)')");
await contains(".o-mail-Message-tracking", { text: "0.001.00(Float)" });
});
QUnit.test("rendering of tracked field of type integer: from non-0 to 0", async function () {
@@ -97,7 +97,7 @@ QUnit.test("rendering of tracked field of type integer: from non-0 to 0", async
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=integer_field] input", "0", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('10(Integer)')");
await contains(".o-mail-Message-tracking", { text: "10(Integer)" });
});
QUnit.test("rendering of tracked field of type integer: from 0 to non-0", async function () {
@@ -108,7 +108,7 @@ QUnit.test("rendering of tracked field of type integer: from 0 to non-0", async
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=integer_field] input", "1", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('01(Integer)')");
await contains(".o-mail-Message-tracking", { text: "01(Integer)" });
});
QUnit.test("rendering of tracked field of type monetary: from non-0 to 0", async function () {
@@ -119,7 +119,7 @@ QUnit.test("rendering of tracked field of type monetary: from non-0 to 0", async
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=monetary_field] input", "0", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('1.000.00(Monetary)')");
await contains(".o-mail-Message-tracking", { text: "1.000.00(Monetary)" });
});
QUnit.test("rendering of tracked field of type monetary: from 0 to non-0", async function () {
@@ -130,7 +130,7 @@ QUnit.test("rendering of tracked field of type monetary: from 0 to non-0", async
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=monetary_field] input", "1", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('0.001.00(Monetary)')");
await contains(".o-mail-Message-tracking", { text: "0.001.00(Monetary)" });
});
QUnit.test("rendering of tracked field of type boolean: from true to false", async function () {
@@ -141,7 +141,7 @@ QUnit.test("rendering of tracked field of type boolean: from true to false", asy
await this.start({ res_id: mailTestTrackAllId1 });
click(".o_field_boolean input").catch(() => {});
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('YesNo(Boolean)')");
await contains(".o-mail-Message-tracking", { text: "YesNo(Boolean)" });
});
QUnit.test("rendering of tracked field of type boolean: from false to true", async function () {
@@ -150,7 +150,7 @@ QUnit.test("rendering of tracked field of type boolean: from false to true", asy
await this.start({ res_id: mailTestTrackAllId1 });
click(".o_field_boolean input").catch(() => {});
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('NoYes(Boolean)')");
await contains(".o-mail-Message-tracking", { text: "NoYes(Boolean)" });
});
QUnit.test(
@@ -163,7 +163,7 @@ QUnit.test(
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=char_field] input", "", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('MarcNone(Char)')");
await contains(".o-mail-Message-tracking", { text: "MarcNone(Char)" });
}
);
@@ -177,7 +177,7 @@ QUnit.test(
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=char_field] input", "Marc", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('NoneMarc(Char)')");
await contains(".o-mail-Message-tracking", { text: "NoneMarc(Char)" });
}
);
@@ -195,7 +195,7 @@ QUnit.test(
["change"]
);
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('None12/14/2018(Date)')");
await contains(".o-mail-Message-tracking", { text: "None12/14/2018(Date)" });
}
);
@@ -213,7 +213,7 @@ QUnit.test(
["change"]
);
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('12/14/2018None(Date)')");
await contains(".o-mail-Message-tracking", { text: "12/14/2018None(Date)" });
}
);
@@ -232,7 +232,7 @@ QUnit.test(
["change"]
);
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('None12/14/2018 13:42:28(Datetime)')");
await contains(".o-mail-Message-tracking", { text: "None12/14/2018 13:42:28(Datetime)" });
const savedRecord = pyEnv
.getData()
["mail.test.track.all"].records.find(({ id }) => id === mailTestTrackAllId1);
@@ -255,7 +255,7 @@ QUnit.test(
["change"]
);
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('12/14/2018 16:42:28None(Datetime)')");
await contains(".o-mail-Message-tracking", { text: "12/14/2018 16:42:28None(Datetime)" });
}
);
@@ -267,7 +267,7 @@ QUnit.test("rendering of tracked field of type text: from some text to empty", a
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=text_field] textarea", "", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('MarcNone(Text)')");
await contains(".o-mail-Message-tracking", { text: "MarcNone(Text)" });
});
QUnit.test("rendering of tracked field of type text: from empty to some text", async function () {
@@ -278,7 +278,7 @@ QUnit.test("rendering of tracked field of type text: from empty to some text", a
await this.start({ res_id: mailTestTrackAllId1 });
await insertText("div[name=text_field] textarea", "Marc", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('NoneMarc(Text)')");
await contains(".o-mail-Message-tracking", { text: "NoneMarc(Text)" });
});
QUnit.test(
@@ -291,7 +291,7 @@ QUnit.test(
await this.start({ res_id: mailTestTrackAllId1 });
await editSelect(target, "div[name=selection_field] select", false);
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('firstNone(Selection)')");
await contains(".o-mail-Message-tracking", { text: "firstNone(Selection)" });
}
);
@@ -303,7 +303,7 @@ QUnit.test(
await this.start({ res_id: mailTestTrackAllId1 });
await editSelect(target, "div[name=selection_field] select", '"first"');
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('Nonefirst(Selection)')");
await contains(".o-mail-Message-tracking", { text: "Nonefirst(Selection)" });
}
);
@@ -318,7 +318,7 @@ QUnit.test(
await this.start({ res_id: mailTestTrackAllId1 });
await insertText(".o_field_many2one_selection input", "", { replace: true });
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('MarcNone(Many2one)')");
await contains(".o-mail-Message-tracking", { text: "MarcNone(Many2one)" });
}
);
@@ -331,6 +331,6 @@ QUnit.test(
await this.start({ res_id: mailTestTrackAllId1 });
await selectDropdownItem(target, "many2one_field_id", "Marc");
await click(".o_form_button_save");
await contains(".o-mail-Message-tracking:contains('NoneMarc(Many2one)')");
await contains(".o-mail-Message-tracking", { text: "NoneMarc(Many2one)" });
}
);
+1 -12
View File
@@ -527,18 +527,7 @@ class Contains {
if (!target) {
return;
}
/** @type HTMLElement[] */
let baseRes;
try {
baseRes = [...target.querySelectorAll(this.selector)];
} catch (error) {
if (error.message.includes("Failed to execute 'querySelectorAll'")) {
// keep jquery for backwards compatibility until all tests are converted
baseRes = [...$(target).find(this.selector)];
} else {
throw error;
}
}
const baseRes = [...target.querySelectorAll(this.selector)];
/** @type {Contains[]} */
this.childrenContains = [];
const res = baseRes.filter((el, currentIndex) => {