Skip to content

Commit

Permalink
test: Move from CDP to BiDi
Browse files Browse the repository at this point in the history
See cockpit-project/cockpit#20832

Explicitly add a "glob" devDependency to follow suit with
cockpit-project/cockpit@680decc155a
It was previously used implicitly through a transient dependency of
something else, but our esbuild po-plugin uses it explicitly.

This causes some minor pixel test noise, adjust the references.
  • Loading branch information
martinpitt committed Aug 13, 2024
1 parent db60f61 commit 79a19d3
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ COCKPIT_REPO_FILES = \
$(NULL)

COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git
COCKPIT_REPO_COMMIT = b5a98be3e0601b45cd8a557cde1c80b896a903fb # 322 + 19 commits
COCKPIT_REPO_COMMIT = 8ede522e5066e680850dd2ae049e2e24f99c4230 # 322 + 30 commits

$(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP)
COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}'
Expand Down Expand Up @@ -127,12 +127,9 @@ devel-uninstall:
print-version:
@echo "$(VERSION)"

# required for running integration tests; commander and ws are deps of chrome-remote-interface
# required for running integration tests
TEST_NPMS = \
node_modules/chrome-remote-interface \
node_modules/commander \
node_modules/sizzle \
node_modules/ws \
$(NULL)

dist: $(TARFILE)
Expand Down
2 changes: 1 addition & 1 deletion node_modules
Submodule node_modules updated 432 files
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"devDependencies": {
"argparse": "2.0.1",
"buffer": "6.0.3",
"chrome-remote-interface": "0.33.2",
"esbuild": "0.23.0",
"esbuild-plugin-copy": "2.1.1",
"esbuild-plugin-replace": "1.4.0",
Expand All @@ -33,6 +32,7 @@
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "4.6.2",
"gettext-parser": "8.0.0",
"glob": "11.0.0",
"htmlparser": "1.7.7",
"ipaddr.js": "2.2.0",
"jed": "1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion test/browser/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [ -e .git ]; then
mv .git dot-git
else
# upstream tarballs ship test dependencies; print version for debugging
grep '"version"' node_modules/chrome-remote-interface/package.json
grep '"version"' node_modules/sizzle/package.json
fi

. /run/host/usr/lib/os-release
Expand Down
2 changes: 1 addition & 1 deletion test/check-machines-networks
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class TestMachinesNetworks(machineslib.VirtualMachinesCase):
b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Network)")

# HACK: Firefox 112 on RHEL 8 does not have `:has` yet, so for now use JavaScript to obtain the elements parent sibling.
b.inject_js("""
b.eval_js("""
ph_input_form_helper_text = function(id) {
return document.getElementById(id).parentElement.parentElement.querySelector(".pf-v5-c-helper-text__item.pf-m-error").textContent
Expand Down
4 changes: 2 additions & 2 deletions test/machineslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def stop_all():
self.allow_journal_messages(r".* couldn't get all properties of org.freedesktop.NetworkManager.Device at /org/freedesktop/NetworkManager/Devices/\d+: Timeout was reached")

# avoid error noise about resources getting cleaned up
self.addCleanup(lambda: not self.browser.cdp.valid or self.browser.logout())
self.addCleanup(lambda: not self.browser.valid or self.browser.logout())

# noVNC warns about this for non-TLS connections; for RHEL downstream testing
self.allow_browser_errors("noVNC requires a secure context")
Expand Down Expand Up @@ -505,7 +505,7 @@ def downloadVmsArtifacts(self):

def tearDown(self):
b = self.browser
if b.cdp.valid and b.is_present("#button.alert-link.more-button"):
if b.valid and b.is_present("#button.alert-link.more-button"):
b.click("button.alert-link.more-button")

if self.getError():
Expand Down

0 comments on commit 79a19d3

Please sign in to comment.