-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HtmlEditor: make localization working for borderStyle selectbox if messages are loaded at runtime (T1234032) #28854
base: 25_1
Are you sure you want to change the base?
Conversation
…25_!-localization-error-in-html-editor-selectbox-toolbar
}; | ||
} | ||
}, () => { | ||
test('SelectBox should show correct localization (T1234032)', function(assert) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[to common test name]
test('SelectBox should show correct localization (T1234032)', function(assert) { | |
test('borderStyle selectbox items are localized even if messages are loaded at runtime (T1234032)', function(assert) { |
test('SelectBox should show correct localization (T1234032)', function(assert) { | ||
try { | ||
localization.loadMessages(this.messages); | ||
localization.locale('de'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[refactoring]
let's get rid of try/finally
and just do this localization stuff in beforeEach/afterEach
|
||
assert.strictEqual($firstListItem.text(), 'Test', 'borderStyleEditor is correctly localized'); | ||
} finally { | ||
localization.locale(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mistake]
U call getter here, it does not change locale. You should pass a parameter to change locale
showCellPropertiesForm(this.instance, $tableElement); | ||
this.clock.tick(10); | ||
|
||
const $borderStyleSelectBox = $(`.${SELECT_BOX_CONTAINER_CLASS} > input`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[refactoring]
Kindly check how other tests in this file are written. I think you can avoid searching though DOM and just get necessary editor though API and check its items
property
No description provided.