ep_set_title_on_pad 0.6.39 → 0.6.41

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ep_set_title_on_pad
1
+ # Derive Pad Title from its First Line for Etherpad
2
2
 
3
3
  [![Demo](demo.gif)](https://github.com/ether/ep_set_title_on_pad/actions/workflows/test-and-release.yml)
4
4
  [![Backend Tests Status](https://github.com/ether/ep_set_title_on_pad/actions/workflows/test-and-release.yml/badge.svg)](https://github.com/ether/ep_set_title_on_pad/actions/workflows/test-and-release.yml)
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.39",
4
+ "version": "0.6.41",
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
- });