Skip to content

Commit 0ef78b9

Browse files
committed
chore(tests): convert PHP view forms to self-contained JS files
1 parent 1584113 commit 0ef78b9

File tree

94 files changed

+1326
-1573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1326
-1573
lines changed

docs/plugins.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
permalink: plugins
3-
sidebarDepth:
4-
sidebar: auto
5-
title: Plugins
6-
---
7-
81
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
92

103
## analyze
@@ -815,6 +808,10 @@ Enable it manually on each run via `-p` option:
815808
816809
npx codeceptjs run -p pauseOnFail
817810
811+
## reportData
812+
813+
TypeScript: Explicitly type reportData arrays as any\[] to avoid 'never' errors
814+
818815
## retryFailedStep
819816
820817
Retries each failed step in a test.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* accessibilityForm.js
3+
* Converted from Accessibility HTML to pure JavaScript.
4+
* Runs as a standalone Node.js server for CodeceptJS testing.
5+
*/
6+
7+
const http = require('http')
8+
9+
const html = `<!doctype html>
10+
<html>
11+
<head>
12+
<title>Accessibility</title>
13+
</head>
14+
<body>
15+
<form action="/form/complex" method="POST">
16+
<div id="myBillingId">Billing</div>
17+
18+
<div>
19+
<div id="myNameId">Name</div>
20+
<input type="text" name="my-form-name" aria-labelledby="myBillingId myNameId" />
21+
</div>
22+
23+
<div>
24+
<div id="myAddressId">Address</div>
25+
<input type="text" aria-label="My Address" name="my-form-address" aria-labelledby="myBillingId myAddressId" />
26+
</div>
27+
28+
<div id="myPhoneId">Phone</div>
29+
<input type="text" name="my-form-phone" aria-labelledby="myPhoneId" />
30+
<input type="submit" value="Submit" />
31+
</form>
32+
33+
<div>
34+
<div aria-label="get info" onclick="window.location.href='/info'">&raquo;</div>
35+
</div>
36+
</body>
37+
</html>`
38+
39+
// Run local server
40+
http
41+
.createServer((req, res) => {
42+
res.writeHead(200, { 'Content-Type': 'text/html' })
43+
res.end(html)
44+
})
45+
.listen(8100, () => {
46+
console.log('✅ Accessibility form running at http://127.0.0.1:8100')
47+
})
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* agreeCheckbox.js
3+
* Converted from HTML to pure JavaScript.
4+
* This version runs a simple Node.js server serving the checkbox form.
5+
*/
6+
7+
const http = require('http')
8+
9+
const html = `<!DOCTYPE html>
10+
<html>
11+
<head>
12+
<title>Checkbox Form</title>
13+
</head>
14+
<body>
15+
<form action="/form/complex" method="POST">
16+
<label for="checkin">I Agree</label>
17+
<input type="checkbox" id="checkin" name="terms" value="agree"
18+
onclick="document.getElementById('notice').innerHTML = 'ticked'" />
19+
<input type="submit" value="Submit" />
20+
</form>
21+
<div id="notice"></div>
22+
</body>
23+
</html>`
24+
25+
// Start local web server
26+
http
27+
.createServer((req, res) => {
28+
res.writeHead(200, { 'Content-Type': 'text/html' })
29+
res.end(html)
30+
})
31+
.listen(8100, () => {
32+
console.log('✅ Checkbox form running at http://127.0.0.1:8100')
33+
})

test/data/app/view/form/aria.php

Lines changed: 0 additions & 136 deletions
This file was deleted.

test/data/app/view/form/bug1467.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

test/data/app/view/form/bug1535.php

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/data/app/view/form/bug1585.php

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/data/app/view/form/bug1598.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/data/app/view/form/bug1637.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

test/data/app/view/form/button.php

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)