Commit abd4c31
test: add a javascript unit test harness for the classic frontend [4.2] (#630)
Backport of #623. js/documents.js is byte-identical between this branch and
master, so it carries the same navigation and post message guards as the
master-side fix and had exactly the same problem: no automated coverage, and
no JavaScript job in CI.
Makefile and both files under tests/js/ are byte-identical to master's.
package.json and pnpm-lock.yaml are master's karma additions applied to this
branch's tree rather than copies of it, because the two trees have since
diverged: #629 bumped vue to 3.5.42 here while master is still on 3.5.40, and
#632 moved the pnpm settings into pnpm-workspace.yaml here while master's still
sit in package.json. The lockfile delta is 938 insertions and 3 deletions, the
same as the master-side change, and adds nothing but the karma tree - no package
is removed and no version moves.
The CI job is the one part that needed adapting. js-unit.yml has no
core-ref-php74 input and no case() on the php version, unlike php-codestyle.yml
and php-unit.yml above it, so the core checkout is selected by core-ref alone -
10.16 here, since an app declaring max-version="10" cannot be enabled on a
master core.
This is also the first job on this branch to install node dependencies, which is
what made the broken lockfile #632 repaired invisible here until now.
Verified against a real 10.16 core: 37 of 37 specs pass, and they still fail
with the expected wrong values when the scheme guard in _absoluteHttpUrl is
defeated. core/js/core.json is byte-identical between core master and 10.16 and
core 10.16 ships the same core/vendor symlink from its build postinstall, so the
karma config needed no path changes. core 10.16's specHelper.js lacks the
jasmine.pp shim master's carries for jasmine-sinon, which turns out not to
matter here: jasmine-sinon delegates to jasmine's own matchers for jasmine
spies, and these specs use no sinon spies.
Node dependencies are installed with pnpm 10, the version pnpm-lock.yaml is
resolved with. The unused npm and bower rules the target replaces were dead,
none of their variables were ever defined on this branch either.
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
Co-authored-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 90445fa commit abd4c31
6 files changed
Lines changed: 1418 additions & 20 deletions
File tree
- .github/workflows
- tests/js
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| 83 | + | |
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| |||
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 94 | + | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | 134 | | |
143 | 135 | | |
144 | 136 | | |
| |||
153 | 145 | | |
154 | 146 | | |
155 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
| 27 | + | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
| |||
0 commit comments