ep_spellcheck 0.0.90 → 0.0.91

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ep_spellcheck",
3
- "version": "0.0.90",
3
+ "version": "0.0.91",
4
4
  "keywords": [
5
5
  "spell",
6
6
  "check",
@@ -0,0 +1,18 @@
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('ep_spellcheck', () => {
9
+ test('Spellcheck is on by default when not disabled', async ({page}) => {
10
+ // ep_spellcheck flips the spellcheck attribute on the inner editor
11
+ // body. Wait up to 5s in case it's set asynchronously after pad init.
12
+ const innerFrame = page.frame('ace_inner')!;
13
+ await expect.poll(
14
+ async () => innerFrame.locator('body').getAttribute('spellcheck'),
15
+ {timeout: 5_000})
16
+ .toBe('true');
17
+ });
18
+ });
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- describe('Spellcheck', 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
- it("Checks Spellcheck is on by default if it isn't disabled", function (done) {
11
- this.timeout(60000);
12
- const $inner = helper.padInner$;
13
- const shouldBeOn = true;
14
-
15
- helper.waitFor(() => ($inner.attr('spellcheck') === shouldBeOn)).done(() => {
16
- expect($inner.attr('spellcheck') === shouldBeOn);
17
- done();
18
- });
19
- });
20
- });