ep_set_title_on_pad 0.6.40 → 0.6.42
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,7 @@ jobs:
|
|
|
15
15
|
uses: actions/checkout@v6
|
|
16
16
|
with:
|
|
17
17
|
repository: ether/etherpad-lite
|
|
18
|
+
path: etherpad-lite
|
|
18
19
|
- uses: pnpm/action-setup@v6
|
|
19
20
|
name: Install pnpm
|
|
20
21
|
with:
|
|
@@ -32,63 +33,36 @@ jobs:
|
|
|
32
33
|
restore-keys: |
|
|
33
34
|
${{ runner.os }}-pnpm-store-
|
|
34
35
|
-
|
|
35
|
-
name:
|
|
36
|
+
name: Checkout plugin repository
|
|
36
37
|
uses: actions/checkout@v6
|
|
37
38
|
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.
|
|
39
|
+
path: plugin
|
|
73
40
|
-
|
|
74
41
|
name: Install Etherpad core dependencies
|
|
42
|
+
working-directory: ./etherpad-lite
|
|
75
43
|
run: bin/installDeps.sh
|
|
44
|
+
- name: Install plugin
|
|
45
|
+
working-directory: ./etherpad-lite
|
|
46
|
+
run: |
|
|
47
|
+
pnpm run plugins i --path ../../plugin
|
|
76
48
|
- name: Create settings.json
|
|
49
|
+
working-directory: ./etherpad-lite
|
|
77
50
|
run: cp ./src/tests/settings.json settings.json
|
|
78
51
|
- name: Run the frontend tests
|
|
52
|
+
working-directory: ./etherpad-lite
|
|
79
53
|
shell: bash
|
|
80
54
|
run: |
|
|
81
55
|
pnpm run dev &
|
|
82
56
|
connected=false
|
|
83
57
|
can_connect() {
|
|
84
|
-
|
|
85
|
-
|
|
58
|
+
curl -sSfo /dev/null http://localhost:9001/ || return 1
|
|
59
|
+
connected=true
|
|
86
60
|
}
|
|
87
61
|
now() { date +%s; }
|
|
88
62
|
start=$(now)
|
|
89
|
-
while [ $(($(now) - $start)) -le
|
|
90
|
-
|
|
63
|
+
while [ $(($(now) - $start)) -le 30 ] && ! can_connect; do
|
|
64
|
+
sleep 1
|
|
91
65
|
done
|
|
92
66
|
cd src
|
|
93
|
-
pnpm exec playwright install chromium
|
|
67
|
+
pnpm exec playwright install chromium --with-deps
|
|
94
68
|
pnpm run test-ui --project=chromium
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ep_set_title_on_pad",
|
|
3
3
|
"description": "Set the title on a pad in Etherpad, also includes real time updates to the UI",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.42",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "johnyma22 (John McLear) <john@mclear.co.uk>",
|
|
7
7
|
"keywords": [
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {expect, test} from '@playwright/test';
|
|
2
|
+
import {goToNewPad} from 'ep_etherpad-lite/tests/frontend-new/helper/padHelper';
|
|
3
|
+
|
|
4
|
+
test.beforeEach(async ({page}) => {
|
|
5
|
+
await goToNewPad(page);
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
test.describe('Set Title On Pad', () => {
|
|
9
|
+
test('Updating pad title to "JohnMcLear" works', async ({page}) => {
|
|
10
|
+
await page.locator('#edit_title').click();
|
|
11
|
+
await page.locator('#input_title').fill('JohnMcLear');
|
|
12
|
+
await page.locator('#save_title').click();
|
|
13
|
+
|
|
14
|
+
await expect(page.locator('#pad_title > #title > h1 > a')).toHaveText('JohnMcLear');
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
describe('Set Title On Pad', function () {
|
|
4
|
-
// create a new pad before each test run
|
|
5
|
-
beforeEach(function (cb) {
|
|
6
|
-
helper.newPad(cb);
|
|
7
|
-
this.timeout(60000);
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
// Create Pad
|
|
11
|
-
// Check Default Pad Title is Untitled
|
|
12
|
-
// Set Pad title & Ensure it's right
|
|
13
|
-
// Re-open Pad and check Pad Title is stored.
|
|
14
|
-
|
|
15
|
-
it('Checked Default Pad Title is padId', async function () {
|
|
16
|
-
this.timeout(60000);
|
|
17
|
-
const chrome$ = helper.padChrome$;
|
|
18
|
-
chrome$('#edit_title').click();
|
|
19
|
-
chrome$('#input_title').val('JohnMcLear');
|
|
20
|
-
chrome$('#save_title').click();
|
|
21
|
-
await helper.waitForPromise(
|
|
22
|
-
() => chrome$('#pad_title > #title > h1 > a').text() === 'JohnMcLear');
|
|
23
|
-
expect(chrome$('#pad_title > #title > h1 > a').text()).to.be('JohnMcLear');
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('Check updating pad title to "JohnMcLear" works', async function () {
|
|
27
|
-
this.timeout(60000);
|
|
28
|
-
const chrome$ = helper.padChrome$;
|
|
29
|
-
chrome$('#edit_title').click();
|
|
30
|
-
chrome$('#input_title').val('JohnMcLear');
|
|
31
|
-
chrome$('#save_title').click();
|
|
32
|
-
|
|
33
|
-
await helper.waitForPromise(() => {
|
|
34
|
-
console.log(chrome$('#pad_title > #title > h1 > a').text());
|
|
35
|
-
return chrome$('#pad_title > #title > h1 > a').text() === 'JohnMcLear';
|
|
36
|
-
});
|
|
37
|
-
expect(chrome$('#pad_title > #title > h1 > a').text()).to.be('JohnMcLear');
|
|
38
|
-
});
|
|
39
|
-
});
|