Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed Jul 24, 2020
1 parent ea84292 commit 729ee6e
Show file tree
Hide file tree
Showing 14 changed files with 65,476 additions and 8 deletions.
3,666 changes: 3,666 additions & 0 deletions build/jodit.css

Large diffs are not rendered by default.

3,375 changes: 3,375 additions & 0 deletions build/jodit.es2018.css

Large diffs are not rendered by default.

27,512 changes: 27,512 additions & 0 deletions build/jodit.es2018.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions build/jodit.es2018.min.css

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions build/jodit.es2018.min.js

Large diffs are not rendered by default.

30,877 changes: 30,877 additions & 0 deletions build/jodit.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions build/jodit.min.css

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions build/jodit.min.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions make.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
module.exports = {
paths: [
require('path').resolve(__dirname, './plugins/example/'),
require('path').resolve(__dirname, './plugins/show-blocks/'),
// require('path').resolve(__dirname, './plugins/example/'),
]
};
2 changes: 1 addition & 1 deletion src/core/helpers/checker/is-license.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
import { isString } from './is-string';

export const isLicense = (license: string): boolean => {
return isString(license) && license.length === 23 && /^[a-z0-9-]+$/i.test(license);
return isString(license) && license.length === 23 && /^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(license);
}
2 changes: 1 addition & 1 deletion src/modules/toolbar/collection/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class ToolbarCollection<T extends IViewBased = IViewBased>

super.update();

this.j.e.fire('updateToolbar');
this.j.e.fire('afterUpdateToolbar');
}

update = this.j.async.debounce(this.immediateUpdate, this.j.defaultTimeout);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/size/size.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function size(editor: IJodit): void {
)
.on(window, 'load', resizeWorkspace)
.on(
'afterInit resize updateToolbar scroll afterResize',
'afterInit resize afterUpdateToolbar scroll afterResize',
resizeWorkspace
);
}
4 changes: 2 additions & 2 deletions test/tests/acceptance/interfaceTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('Test interface', function () {
describe('Set license', function () {
it('Should show License in about dialog', function () {
const editor = getJodit({
license: '12345678901234567890123456789022', // don't use this key - it is wrong
license: '12345-67890-12345-67890', // don't use this key - it is wrong
toolbarAdaptive: false
});

Expand All @@ -42,7 +42,7 @@ describe('Test interface', function () {

expect(
dialog.textContent.match(
/License: 12345678-\*\*\*\*\*\*\*\*-\*\*\*\*\*\*\*\*-56789022/
/License: 12345-67-\*\*\*\*\*\*\*\*-\*\*\*\*\*\*\*/
)
).is.not.null;
});
Expand Down
5 changes: 4 additions & 1 deletion test/tests/units/helpersTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,15 @@ describe('Test helpers', function() {
'Type something',
'Напишите что-либо',
'ru',

'About Jodit',
'حول جوديت',
'ar',

'About Jodit',
'About Jodit',
'{About Jodit}',
'ar1',

'British people',
'{British people}',
'ar'
Expand Down

0 comments on commit 729ee6e

Please sign in to comment.