ep_font_size 0.4.41 → 0.4.44
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/locales/kn.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Apply sizes to fonts",
|
|
3
3
|
"name": "ep_font_size",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.44",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "John McLear",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"url": "https://etherpad.org/"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"eslint": "^8.
|
|
33
|
-
"eslint-config-etherpad": "^3.0.
|
|
32
|
+
"eslint": "^8.11.0",
|
|
33
|
+
"eslint-config-etherpad": "^3.0.9",
|
|
34
34
|
"typescript": "^4.6.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
describe('ep_font_size - Select font-size dropdown localization', function () {
|
|
4
|
-
const changeEtherpadLanguageTo = (lang
|
|
4
|
+
const changeEtherpadLanguageTo = async (lang) => {
|
|
5
5
|
const boldTitles = {
|
|
6
6
|
en: 'Bold (Ctrl+B)',
|
|
7
|
-
fr: 'Gras (Ctrl+B)',
|
|
7
|
+
fr: 'Gras (Ctrl + B)',
|
|
8
8
|
};
|
|
9
9
|
const chrome$ = helper.padChrome$;
|
|
10
10
|
|
|
@@ -20,24 +20,23 @@ describe('ep_font_size - Select font-size dropdown localization', function () {
|
|
|
20
20
|
// hide settings again
|
|
21
21
|
$settingsButton.click();
|
|
22
22
|
|
|
23
|
-
helper.
|
|
24
|
-
.
|
|
23
|
+
await helper.waitForPromise(
|
|
24
|
+
() => chrome$('.buttonicon-bold').parent()[0].title === boldTitles[lang]);
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
// create a new pad with comment before each test run
|
|
28
|
-
beforeEach(function (
|
|
29
|
-
helper.newPad(() => {
|
|
30
|
-
changeEtherpadLanguageTo('fr', cb);
|
|
31
|
-
});
|
|
28
|
+
beforeEach(async function () {
|
|
32
29
|
this.timeout(60000);
|
|
30
|
+
await helper.aNewPad();
|
|
31
|
+
await changeEtherpadLanguageTo('fr');
|
|
33
32
|
});
|
|
34
33
|
|
|
35
34
|
// ensure we go back to English to avoid breaking other tests:
|
|
36
|
-
after(function (
|
|
37
|
-
changeEtherpadLanguageTo('en'
|
|
35
|
+
after(async function () {
|
|
36
|
+
await changeEtherpadLanguageTo('en');
|
|
38
37
|
});
|
|
39
38
|
|
|
40
|
-
it('Localizes dropdown when Etherpad language is changed', function (
|
|
39
|
+
it('Localizes dropdown when Etherpad language is changed', async function () {
|
|
41
40
|
const optionTranslations = {
|
|
42
41
|
'ep_font_size.size': 'Taille de police',
|
|
43
42
|
};
|
|
@@ -45,7 +44,5 @@ describe('ep_font_size - Select font-size dropdown localization', function () {
|
|
|
45
44
|
const $option = chrome$('#editbar').find('#font-size').find('option').first();
|
|
46
45
|
|
|
47
46
|
expect($option.text()).to.be(optionTranslations[$option.attr('data-l10n-id')]);
|
|
48
|
-
|
|
49
|
-
return done();
|
|
50
47
|
});
|
|
51
48
|
});
|
|
@@ -6,9 +6,9 @@ describe('ep_font_size - Set Font size and ensure its removed properly', functio
|
|
|
6
6
|
// Ensure heading value is properly set when caret is placed on font size changed content
|
|
7
7
|
|
|
8
8
|
// create a new pad before each test run
|
|
9
|
-
beforeEach(function (
|
|
10
|
-
helper.newPad(cb);
|
|
9
|
+
beforeEach(async function () {
|
|
11
10
|
this.timeout(60000);
|
|
11
|
+
await helper.aNewPad();
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
// Create Pad
|
|
@@ -17,7 +17,7 @@ describe('ep_font_size - Set Font size and ensure its removed properly', functio
|
|
|
17
17
|
// Select all text
|
|
18
18
|
// Set it to size 8
|
|
19
19
|
|
|
20
|
-
it('Changes from size 8 to 9 and back to 8', function (
|
|
20
|
+
it('Changes from size 8 to 9 and back to 8', async function () {
|
|
21
21
|
this.timeout(60000);
|
|
22
22
|
const chrome$ = helper.padChrome$;
|
|
23
23
|
const inner$ = helper.padInner$;
|
|
@@ -32,22 +32,19 @@ describe('ep_font_size - Set Font size and ensure its removed properly', functio
|
|
|
32
32
|
chrome$('#font-size').change();
|
|
33
33
|
|
|
34
34
|
let fElement = inner$('div').first();
|
|
35
|
-
helper.
|
|
35
|
+
await helper.waitForPromise(() => {
|
|
36
36
|
const elementHasClass = fElement.children().first().hasClass('font-size:9');
|
|
37
37
|
return expect(elementHasClass).to.be(true);
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}).done(() => {
|
|
49
|
-
done();
|
|
50
|
-
});
|
|
38
|
+
});
|
|
39
|
+
$firstTextElement = inner$('div').first();
|
|
40
|
+
$firstTextElement.sendkeys('{selectall}');
|
|
41
|
+
// sets first line to Font size 8
|
|
42
|
+
chrome$('#font-size').val('0');
|
|
43
|
+
chrome$('#font-size').change();
|
|
44
|
+
await helper.waitForPromise(() => {
|
|
45
|
+
fElement = inner$('div').first();
|
|
46
|
+
const elementHasClass = fElement.children().first().hasClass('font-size:8');
|
|
47
|
+
return expect(elementHasClass).to.be(true);
|
|
51
48
|
});
|
|
52
49
|
});
|
|
53
50
|
|