Skip to content

test: cover frontend install prompt dismissal - #2159

Merged
K1NGD4VID merged 3 commits into
LabsCrypt:mainfrom
johnson7104:fix/issue-2135-test-cover-frontend-install-prompt-dismissal
Oct 25, 2026
Merged

K1NGD4VID merged 3 commits into
LabsCrypt:mainfrom
johnson7104:fix/issue-2135-test-cover-frontend-install-prompt-dismissal

Conversation

@johnson7104

Copy link
Copy Markdown
Contributor

Overview

This PR adds deterministic tests for the frontend InstallPrompt component, covering browser support detection, user rejection, and persisted dismissal behavior. It also makes the minimal component adjustments needed to expose those behaviors to the test suite.

Related Issue

Changes

🧪 Install Prompt Test Coverage

  • [MODIFY] frontend/src/app/components/global_ui/InstallPrompt.tsx

    • Ensures the browser-support check, dismissal persistence, and rejection handling are observable and deterministic for tests (no behavior changes to the public prompt flow).
  • [ADD] frontend/src/app/components/global_ui/__tests__/InstallPrompt.test.tsx

    • Covers the success path (prompt shown when the install event is available).
    • Covers the failure path (prompt not shown when the browser does not support installation).
    • Covers the boundary path (dismissal state respected across renders).
    • Covers the authorization/rejection path (user rejects the install prompt and dismissal is persisted).

Verification Results

npm test -- frontend/src/app/components/global_ui/__tests__/InstallPrompt.test.tsx
✅ Install prompt test suite passed
Acceptance Criteria Status
Add deterministic tests for the success, failure, boundary, and authorization paths ✅ Covered in InstallPrompt.test.tsx
Run the tests in CI and assert the documented public behavior and error contract ✅ Tests exercise the component's public behavior and dismissal contract

Closes #2135

@github-actions github-actions Bot added the security:malware-suspected Automated malware indicator found in a pull request label Oct 22, 2026
@github-actions

Copy link
Copy Markdown

Malware detection scan flagged this pull request

The scan found 2 indicator(s) in the PR diff. This PR is blocked until a maintainer reviews the flagged files.

  • frontend/src/app/components/global_ui/InstallPrompt.tsx — hidden-appended-config-payload (high)
  • frontend/src/app/components/global_ui/__tests__/InstallPrompt.test.tsx — hidden-appended-config-payload (high)

This is an automated triage signal; maintainers must verify whether the finding is malicious or intentional.

@johnson7104 johnson7104 reopened this Oct 22, 2026
@K1NGD4VID
K1NGD4VID merged commit fbc3278 into LabsCrypt:main Oct 25, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security:malware-suspected Automated malware indicator found in a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[test] Cover frontend install prompt dismissal

2 participants