Skip to content

Commit 11181d0

Browse files
committed
test: Move from CDP to BiDi
See cockpit-project/cockpit#20832 Drop chrome-remote-interface NPM dependency. 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. Adjust the exception handling tests to not wait for RuntimeError, this is no longer raised.
1 parent 5fed39b commit 11181d0

File tree

4 files changed

+8
-18
lines changed

4 files changed

+8
-18
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,9 @@ install: $(DIST_TEST) po/LINGUAS
114114
cp webui-desktop $(DESTDIR)/usr/libexec/
115115
ln -sTfr $(DESTDIR)/usr/share/pixmaps/fedora-logo-sprite.svg $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME)/logo.svg
116116

117-
# required for running integration tests; commander and ws are deps of chrome-remote-interface
117+
# required for running integration tests;
118118
TEST_NPMS = \
119-
node_modules/chrome-remote-interface \
120-
node_modules/commander \
121119
node_modules/sizzle \
122-
node_modules/ws \
123120
$(NULL)
124121

125122
dist: $(TARFILE)
@@ -155,7 +152,7 @@ COCKPIT_REPO_FILES = \
155152
$(NULL)
156153

157154
COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git
158-
COCKPIT_REPO_COMMIT = 07fddba43934fb256ec8da03812f081eab3baa18 # 321 + 117 commits
155+
COCKPIT_REPO_COMMIT = 8ede522e5066e680850dd2ae049e2e24f99c4230 # 322 + 30 commits
159156

160157
$(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP)
161158
COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"stylelint:fix": "stylelint --fix 'src/**/*{.css,scss}'"
1515
},
1616
"devDependencies": {
17-
"chrome-remote-interface": "0.33.2",
1817
"esbuild": "0.23.0",
1918
"esbuild-plugin-copy": "2.1.1",
2019
"esbuild-plugin-replace": "1.4.0",
@@ -32,6 +31,7 @@
3231
"eslint-plugin-simple-import-sort": "^12.0.0",
3332
"eslint-plugin-sort-destructure-keys": "^2.0.0",
3433
"gettext-parser": "8.0.0",
34+
"glob": "11.0.0",
3535
"htmlparser": "1.7.7",
3636
"jed": "1.1.1",
3737
"qunit": "2.21.1",

test/check-basic

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# You should have received a copy of the GNU Lesser General Public License
1616
# along with this program; If not, see <http://www.gnu.org/licenses/>.
1717

18-
import time
19-
2018
from anacondalib import VirtInstallMachineCase
2119
from installer import Installer
2220
from language import Language
@@ -249,12 +247,8 @@ class TestBasic(VirtInstallMachineCase):
249247

250248
b.wait_not_present("#critical-error-bz-report-modal.pf-v5-c-modal-box")
251249

252-
with self.assertRaises(RuntimeError):
253-
b.eval_js("window.setTimeout(function() { myNonExistingFunction()}, 0);")
254-
# Some round trips, one of which should update the deferred exception
255-
for _ in range(0, 5):
256-
b.wait_in_text("#critical-error-bz-report-modal-details", "myNonExistingFunction is not defined")
257-
time.sleep(2)
250+
b.eval_js("window.setTimeout(function() { myNonExistingFunction()}, 0);")
251+
b.wait_in_text("#critical-error-bz-report-modal-details", "myNonExistingFunction is not defined")
258252

259253
b.wait_visible("a:contains('Report issue'):not([disabled])")
260254
b.assert_pixels(

test/check-storage-basic

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,9 @@ class TestStorage(VirtInstallMachineCase, StorageHelpers):
196196

197197
b.wait_not_present("#critical-error-bz-report-modal.pf-v5-c-modal-box")
198198

199-
with self.assertRaises(RuntimeError):
200-
b.eval_js("window.setTimeout(function() {throw new Error('Unexpected storage JS error')}, 0);")
201-
b.wait_in_text("#critical-error-bz-report-modal-details", "Unexpected storage JS error")
202-
b.wait_in_text("#critical-error-bz-report-modal header", "The installer cannot continue due to a critical error: Storage plugin failed")
199+
b.eval_js("window.setTimeout(function() {throw new Error('Unexpected storage JS error')}, 0);")
200+
b.wait_in_text("#critical-error-bz-report-modal-details", "Unexpected storage JS error")
201+
b.wait_in_text("#critical-error-bz-report-modal header", "The installer cannot continue due to a critical error: Storage plugin failed")
203202

204203
@nondestructive
205204
class TestMultipleDisks(VirtInstallMachineCase, StorageHelpers):

0 commit comments

Comments
 (0)