Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
echo "═══════════════════════════════════════════════════════════════════"

for bin in node yarn jq; do
command -v "$bin" &>/dev/null || { echo "[ERROR] Missing: $bin"; exit 1; }

Check warning on line 135 in run-e2e.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-plugin-export-overlays&issues=AZ_dyjk6RcrGVBac-FxM&open=AZ_dyjk6RcrGVBac-FxM&pullRequest=3209
done

corepack enable 2>/dev/null || true
Expand All @@ -141,7 +141,7 @@
if command -v oc &>/dev/null && oc whoami &>/dev/null 2>&1; then
echo "[INFO] Cluster: $(oc whoami --show-server) ($(oc whoami))"
elif [[ "${PLAYWRIGHT_ARGS[0]:-}" != "--list" ]]; then
echo "[ERROR] Not logged into a cluster. Login with 'oc login' first."

Check warning on line 144 in run-e2e.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-plugin-export-overlays&issues=AZ_dyjk6RcrGVBac-FxN&open=AZ_dyjk6RcrGVBac-FxN&pullRequest=3209
exit 1
fi

Expand All @@ -154,7 +154,7 @@
done

if [[ ${#ALL_WORKSPACES[@]} -eq 0 ]]; then
echo "[ERROR] No workspaces with E2E tests found."

Check warning on line 157 in run-e2e.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-plugin-export-overlays&issues=AZ_dyjk6RcrGVBac-FxO&open=AZ_dyjk6RcrGVBac-FxO&pullRequest=3209
exit 1
fi

Expand All @@ -165,7 +165,7 @@
if printf '%s\n' "${ALL_WORKSPACES[@]}" | grep -qx "$ws"; then
E2E_WORKSPACES+=("$ws")
else
echo "[ERROR] Workspace '$ws' not found or has no E2E tests."

Check warning on line 168 in run-e2e.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-plugin-export-overlays&issues=AZ_dyjk6RcrGVBac-FxP&open=AZ_dyjk6RcrGVBac-FxP&pullRequest=3209
echo "[INFO] Available: ${ALL_WORKSPACES[*]}"
exit 1
fi
Expand Down Expand Up @@ -204,7 +204,10 @@
}
EOF

cat > .yarnrc.yml <<< 'nodeLinker: node-modules'
cat > .yarnrc.yml <<EOF
nodeLinker: node-modules
npmMinimalAgeGate: 0
EOF
GENERATED_FILES+=("package.json" ".yarnrc.yml")

# Clean all node_modules and yarn.lock to ensure fresh resolution
Expand Down Expand Up @@ -339,8 +342,8 @@
Flaky: \(.stats.flaky // 0)
Skipped: \(.stats.skipped // 0)"' playwright-report/results.json 2>/dev/null
fi
echo " Status: $([ $TEST_EXIT_CODE -eq 0 ] && echo 'PASSED' || echo "FAILED ($TEST_EXIT_CODE)")"

Check failure on line 345 in run-e2e.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-plugin-export-overlays&issues=AZ_dyjk6RcrGVBac-FxQ&open=AZ_dyjk6RcrGVBac-FxQ&pullRequest=3209
echo " Report: playwright-report/index.html"
echo "═══════════════════════════════════════════════════════════════════"

Check warning on line 347 in run-e2e.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of using the literal '═══════════════════════════════════════════════════════════════════' 4 times.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-plugin-export-overlays&issues=AZ_dyjk6RcrGVBac-FxR&open=AZ_dyjk6RcrGVBac-FxR&pullRequest=3209

exit $TEST_EXIT_CODE
Loading