ep_spellcheck 0.0.91 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,6 +15,11 @@ jobs:
|
|
|
15
15
|
uses: actions/checkout@v6
|
|
16
16
|
with:
|
|
17
17
|
repository: ether/etherpad-lite
|
|
18
|
+
path: etherpad-lite
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
|
+
name: Install Node.js
|
|
21
|
+
with:
|
|
22
|
+
node-version: 22
|
|
18
23
|
- uses: pnpm/action-setup@v6
|
|
19
24
|
name: Install pnpm
|
|
20
25
|
with:
|
|
@@ -32,63 +37,36 @@ jobs:
|
|
|
32
37
|
restore-keys: |
|
|
33
38
|
${{ runner.os }}-pnpm-store-
|
|
34
39
|
-
|
|
35
|
-
name:
|
|
40
|
+
name: Checkout plugin repository
|
|
36
41
|
uses: actions/checkout@v6
|
|
37
42
|
with:
|
|
38
|
-
path:
|
|
39
|
-
-
|
|
40
|
-
name: export GIT_HASH to env
|
|
41
|
-
id: environment
|
|
42
|
-
run: |
|
|
43
|
-
cd ./node_modules/__tmp
|
|
44
|
-
echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
|
45
|
-
-
|
|
46
|
-
name: Determine plugin name
|
|
47
|
-
id: plugin_name
|
|
48
|
-
run: |
|
|
49
|
-
cd ./node_modules/__tmp
|
|
50
|
-
npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
|
|
51
|
-
-
|
|
52
|
-
name: Rename plugin directory
|
|
53
|
-
env:
|
|
54
|
-
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
|
|
55
|
-
run: |
|
|
56
|
-
mv ./node_modules/__tmp ./node_modules/"${PLUGIN_NAME}"
|
|
57
|
-
-
|
|
58
|
-
name: Install plugin dependencies
|
|
59
|
-
env:
|
|
60
|
-
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
|
|
61
|
-
run: |
|
|
62
|
-
cd ./node_modules/"${PLUGIN_NAME}"
|
|
63
|
-
pnpm i
|
|
64
|
-
# Etherpad core dependencies must be installed after installing the
|
|
65
|
-
# plugin's dependencies, otherwise npm will try to hoist common
|
|
66
|
-
# dependencies by removing them from src/node_modules and installing them
|
|
67
|
-
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
|
|
68
|
-
# to be buggy, because it sometimes removes dependencies from
|
|
69
|
-
# src/node_modules but fails to add them to the top-level node_modules.
|
|
70
|
-
# Even if npm correctly hoists the dependencies, the hoisting seems to
|
|
71
|
-
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
|
|
72
|
-
# rules.
|
|
43
|
+
path: plugin
|
|
73
44
|
-
|
|
74
45
|
name: Install Etherpad core dependencies
|
|
46
|
+
working-directory: ./etherpad-lite
|
|
75
47
|
run: bin/installDeps.sh
|
|
48
|
+
- name: Install plugin
|
|
49
|
+
working-directory: ./etherpad-lite
|
|
50
|
+
run: |
|
|
51
|
+
pnpm run plugins i --path ../../plugin
|
|
76
52
|
- name: Create settings.json
|
|
53
|
+
working-directory: ./etherpad-lite
|
|
77
54
|
run: cp ./src/tests/settings.json settings.json
|
|
78
55
|
- name: Run the frontend tests
|
|
56
|
+
working-directory: ./etherpad-lite
|
|
79
57
|
shell: bash
|
|
80
58
|
run: |
|
|
81
59
|
pnpm run dev &
|
|
82
60
|
connected=false
|
|
83
61
|
can_connect() {
|
|
84
|
-
|
|
85
|
-
|
|
62
|
+
curl -sSfo /dev/null http://localhost:9001/ || return 1
|
|
63
|
+
connected=true
|
|
86
64
|
}
|
|
87
65
|
now() { date +%s; }
|
|
88
66
|
start=$(now)
|
|
89
|
-
while [ $(($(now) - $start)) -le
|
|
90
|
-
|
|
67
|
+
while [ $(($(now) - $start)) -le 30 ] && ! can_connect; do
|
|
68
|
+
sleep 1
|
|
91
69
|
done
|
|
92
70
|
cd src
|
|
93
|
-
pnpm exec playwright install chromium
|
|
71
|
+
pnpm exec playwright install chromium --with-deps
|
|
94
72
|
pnpm run test-ui --project=chromium
|
package/package.json
CHANGED
|
@@ -8,11 +8,22 @@ test.beforeEach(async ({page}) => {
|
|
|
8
8
|
test.describe('ep_spellcheck', () => {
|
|
9
9
|
test('Spellcheck is on by default when not disabled', async ({page}) => {
|
|
10
10
|
// ep_spellcheck flips the spellcheck attribute on the inner editor
|
|
11
|
-
// body.
|
|
11
|
+
// body. Under Firefox the nested ace_inner iframe can be late to
|
|
12
|
+
// attach; wait for it before dereferencing, and read the attribute
|
|
13
|
+
// through the iframe element directly so a delayed body element
|
|
14
|
+
// doesn't keep us in a 90s test timeout.
|
|
15
|
+
await expect.poll(
|
|
16
|
+
async () => page.frame('ace_inner') != null,
|
|
17
|
+
{timeout: 10_000})
|
|
18
|
+
.toBe(true);
|
|
12
19
|
const innerFrame = page.frame('ace_inner')!;
|
|
13
20
|
await expect.poll(
|
|
14
|
-
async () =>
|
|
15
|
-
|
|
21
|
+
async () => {
|
|
22
|
+
const body = innerFrame.locator('body');
|
|
23
|
+
if (await body.count() === 0) return null;
|
|
24
|
+
return body.getAttribute('spellcheck');
|
|
25
|
+
},
|
|
26
|
+
{timeout: 10_000})
|
|
16
27
|
.toBe('true');
|
|
17
28
|
});
|
|
18
29
|
});
|