Skip to content

fix(browser): align test page with Jasmine 5 and remove missing asset refs - #69

Merged
GitToTheHub merged 5 commits into
apache:masterfrom
GitToTheHub:master
Jun 6, 2026
Merged

GitToTheHub merged 5 commits into
apache:masterfrom
GitToTheHub:master

Conversation

@GitToTheHub

@GitToTheHub GitToTheHub commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR updates browser test assets to match the current Jasmine runtime and reduce CI noise.

Changes

  • Load jasmine/boot0.js in www/assets/index.html so Jasmine 5 initializes the global interface expected by the test harness.
  • Remove stale Bootstrap CSS/JS references from www/assets/index.html that are not shipped in plugin assets and produced 404s.
  • Improve documentation for injecting csp-incl.js
    • Make clear, that this is only injected by cordova-mobile-spec and will produce a 404 when not hosted in cordova-mobile-spec.
    • Add link for csp-incl.js of cordova-mobile-spec

Motivation

Without bootstrapping, harness code calling window.jasmine.getEnv() may fail under Jasmine 5. Missing static references also clutter CI output and obscure actionable failures.

Validation

  • Browser tests execute and report successfully in plugin CI using this asset page.
  • Removed references are cosmetic/non-runtime dependencies and do not affect test execution.

Cross-PR Testing Note

For integration testing purposes, apache/cordova-paramedic#302 installs this PR via apache/cordova-plugin-test-framework#pull/69/head.

Downstream Validation

A dedicated downstream test PR is open in apache/cordova-plugin-network-information:

That PR consumes this change chain and demonstrates successful CI runs.

Generated-By: GPT-5.3-Codex

- Add jasmine/boot0.js script tag (required for Jasmine 5.x to initialize
  window.jasmine global and expose describe/it/expect etc.)
- Remove references to bootstrap CSS and JS files that were never included
  in the package assets (404 errors) and are purely cosmetic
@GitToTheHub

Copy link
Copy Markdown
Contributor Author

I tested the actions on apache/cordova-plugin-network-information#184 with this PR and it works now. Can this be merged?

@GitToTheHub

Copy link
Copy Markdown
Contributor Author

If no one has any objections I would merge it

@erisu

erisu commented Jun 5, 2026

Copy link
Copy Markdown
Member

I would suggest not to remove the csp-incl.js entry because it should be created and used by mobile-spec.

@GitToTheHub

Copy link
Copy Markdown
Contributor Author

Ok, I will also improve the documentation for it. I think this is the file which will be injected by cordova-mobile-spec: https://github.com/apache/cordova-mobile-spec/blob/master/www/csp-incl.js
Correct?

- `csp-incl.js` will be injected by `cordova-mobile-spec`: https://github.com/apache/cordova-mobile-spec/blob/master/www/csp-incl.js and should not be removed
- Make clear, that this is only injected by `cordova-mobile-spec` and will produce a 404 when not hosted in `cordova-mobile-spec`.
- Add link for `csp-incl.js` of `cordova-mobile-spec`
@GitToTheHub

Copy link
Copy Markdown
Contributor Author

I would suggest not to remove the csp-incl.js entry because it should be created and used by mobile-spec.

I added it back and improved the documentation

- Document what `boot0.js` is and why only this file is loaded and not additonally `boot1.js`
@GitToTheHub
GitToTheHub merged commit 5274cb4 into apache:master Jun 6, 2026
10 checks passed
GitToTheHub added a commit to GitToTheHub/cordova-paramedic that referenced this pull request Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants