From 060f218002fb09a30533e9cd4072db23b9b02b38 Mon Sep 17 00:00:00 2001 From: C85297 <95289555+C85297@users.noreply.github.com> Date: Thu, 18 Jun 2026 13:36:14 +0100 Subject: [PATCH] Fix nightwatch tests with collapsed operation --- tests/browser/00_nightwatch.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/browser/00_nightwatch.js b/tests/browser/00_nightwatch.js index ac3fb08c..a0f093ee 100644 --- a/tests/browser/00_nightwatch.js +++ b/tests/browser/00_nightwatch.js @@ -60,10 +60,15 @@ module.exports = { }, "Operation popover descriptions render HTML safely": browser => { - const op = "//li[contains(@class, 'operation') and text()='Escape Smart Characters']"; + const favouritesCat = "//a[contains(@class, 'category-title') and contains(@data-target, '#catFavourites')]", + op = "//ul[@id='search-results']//li[contains(@class, 'operation') and contains(., 'Escape Smart Characters')]"; browser + .useCss() + .clearValue("#search") + .setValue("#search", "Escape Smart Characters") .useXpath() + .waitForElementVisible(op, 1000) .moveToElement(op, 10, 10) .useCss() .waitForElementVisible(".popover-body code:last-of-type", 1000) @@ -72,7 +77,11 @@ module.exports = { browser .useCss() .moveToElement("#operations .title", 1, 1) - .waitForElementNotPresent(".popover-body", 1000); + .waitForElementNotPresent(".popover-body", 1000) + .clearValue("#search") + .useXpath() + .getLocationInView(favouritesCat) + .click(favouritesCat); }, "Recipe can be run": browser => {