-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Problem - The old integration test did not work and has been disabled ## Solution - Switch the test from Playwright to Puppeteer ## Testing - The [test run](https://github.com/openSUSE/agama/actions/runs/10053959779/job/27787662876) is green now - If the test fails the screenshot and the HTML page dump is included in the uploaded artifacts archive
- Loading branch information
Showing
3 changed files
with
41 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
#! /usr/bin/sh | ||
#! /usr/bin/bash | ||
|
||
# A helper script for running the Puppeteer integration tests. | ||
# | ||
# Usage: | ||
# agama-integration-tests [mochajs-options] <path-to-test> | ||
|
||
# exit on error, unset variables are an error | ||
set -eu | ||
|
||
MYDIR=$(realpath "$(dirname "$0")") | ||
|
||
# options passed to mocha.js: | ||
# --bail: stop at the first failure (otherwise the test would continue and very | ||
# likely fail at the next steps as well, this prevents from false alarms) | ||
# --slow: report tests as slow when they take more than 10 seconds, the default | ||
# is 75ms which is too small for Agama | ||
MOCHA_OPTIONS=(--bail --slow 10000) | ||
|
||
if [ -e "$MYDIR/../.git/" ]; then | ||
PUPPETEER_SKIP_DOWNLOAD=true npm install --omit=optional | ||
npx mocha --bail "$@" | ||
npm install --omit=optional | ||
npx mocha "${MOCHA_OPTIONS[@]}" "$@" | ||
else | ||
# set the default load path | ||
export NODE_PATH=/usr/share/agama/integration-tests/node_modules | ||
# run the CLI script directly, npm/npx might not be installed | ||
/usr/bin/env node /usr/share/agama/integration-tests/node_modules/mocha/bin/mocha.js --bail "$@" | ||
/usr/bin/env node /usr/share/agama/integration-tests/node_modules/mocha/bin/mocha.js "${MOCHA_OPTIONS[@]}" "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters