ep_author_hover 11.0.16 → 11.0.18
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.
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"name": "ep_author_hover",
|
|
8
8
|
"description": "Adds author names to span titles (shows on hover), works as authors change their name. Hover includes author color and fast switching between author spans. Hat tip to Martyn York for the initial work on this.",
|
|
9
|
-
"version": "11.0.
|
|
9
|
+
"version": "11.0.18",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/ether/ep_author_hover.git"
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
// Inline replacement for the shared `showSettings` helper. The shared helper
|
|
9
|
+
// performs a regular `.click()` on the settings cog, which times out in
|
|
10
|
+
// CI because core's `#toolbar-overlay` div intercepts pointer events while
|
|
11
|
+
// the editor is focused (the same root cause that required `force:true`
|
|
12
|
+
// in `clearAuthorship` / the ep_align fix). The overlay is purely cosmetic,
|
|
13
|
+
// so dispatching the click with `force:true` is the supported workaround.
|
|
14
|
+
const openSettingsPopup = async (page: import('@playwright/test').Page) => {
|
|
15
|
+
const settings = page.locator('#settings');
|
|
16
|
+
const isShown = async () =>
|
|
17
|
+
((await settings.getAttribute('class')) || '').includes('popup-show');
|
|
18
|
+
if (await isShown()) return;
|
|
19
|
+
await page
|
|
20
|
+
.locator("button[data-l10n-id='pad.toolbar.settings.title']")
|
|
21
|
+
.click({force: true});
|
|
22
|
+
await page.waitForFunction(
|
|
23
|
+
() => document.querySelector('#settings')!.classList.contains('popup-show'));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
test.describe('ep_author_hover', () => {
|
|
27
|
+
test('plugin is loaded and exposes itself in clientVars', async ({page}) => {
|
|
28
|
+
const enabled = await page.evaluate(
|
|
29
|
+
() => (window as any).clientVars?.plugins?.plugins?.ep_author_hover != null);
|
|
30
|
+
expect(enabled).toBe(true);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('settings popup exposes the author-hover toggle', async ({page}) => {
|
|
34
|
+
await openSettingsPopup(page);
|
|
35
|
+
// The plugin renders into #mySettings via the eejsBlock_mySettings
|
|
36
|
+
// hook; its checkbox is identified by id="options-author-hover".
|
|
37
|
+
await expect(page.locator('#options-author-hover')).toBeAttached();
|
|
38
|
+
await expect(page.locator('label[for="options-author-hover"]')).toBeAttached();
|
|
39
|
+
});
|
|
40
|
+
});
|