Skip to content

Commit 8df3675

Browse files
Different tactic
1 parent 7df38ba commit 8df3675

1 file changed

Lines changed: 14 additions & 25 deletions

File tree

spec/text-editor-component-spec.js

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5760,34 +5760,23 @@ describe('TextEditorComponent', () => {
57605760
expect(component.getScrollTopRow()).toBe(4);
57615761
});
57625762

5763-
describe('gracefully handles the editor being hidden', () => {
5764-
beforeEach(() => {
5765-
if (process.platform === 'linux') {
5766-
useAlternativeScheduler();
5767-
}
5768-
});
5763+
it('gracefully handles the editor being hidden after a styling change', async (done) => {
5764+
jasmine.useRealClock();
5765+
jasmine.filterByPlatform({only: ['linux']}, done);
5766+
// Seems to make this test less flaky.
5767+
await wait(0);
57695768

5770-
afterEach(() => {
5771-
if (process.platform === 'linux') {
5772-
restoreDefaultScheduler();
5773-
}
5769+
const { component, element } = buildComponent({
5770+
autoHeight: false
57745771
});
5772+
element.style.fontSize =
5773+
parseInt(getComputedStyle(element).fontSize) + 5 + 'px';
5774+
TextEditor.didUpdateStyles();
5775+
element.style.display = 'none';
5776+
await component.getNextUpdatePromise();
57755777

5776-
it('after a styling change', async (done) => {
5777-
jasmine.filterByPlatform({only: ['linux']}, done);
5778-
5779-
const { component, element } = buildComponent({
5780-
autoHeight: false
5781-
});
5782-
element.style.fontSize =
5783-
parseInt(getComputedStyle(element).fontSize) + 5 + 'px';
5784-
TextEditor.didUpdateStyles();
5785-
element.style.display = 'none';
5786-
await component.getNextUpdatePromise();
5787-
5788-
done();
5789-
});
5790-
})
5778+
done();
5779+
});
57915780

57925781
it('does not throw an exception when the editor is soft-wrapped and changing the font size changes also the longest screen line', async () => {
57935782
const { component, element, editor } = buildComponent({

0 commit comments

Comments
 (0)