Merge pull request #15154 from atom/jr-fix-15122

Fix flaky test re: blinking cursor
This commit is contained in:
Jason Rudolph
2017-08-03 20:19:07 -04:00
committed by GitHub

View File

@@ -411,20 +411,15 @@ describe('TextEditorComponent', () => {
await component.getNextUpdatePromise()
const [cursor1, cursor2] = element.querySelectorAll('.cursor')
expect(getComputedStyle(cursor1).opacity).toBe('1')
expect(getComputedStyle(cursor2).opacity).toBe('1')
await conditionPromise(() =>
getComputedStyle(cursor1).opacity === '0' && getComputedStyle(cursor2).opacity === '0'
)
await conditionPromise(() =>
getComputedStyle(cursor1).opacity === '1' && getComputedStyle(cursor2).opacity === '1'
)
await conditionPromise(() =>
getComputedStyle(cursor1).opacity === '0' && getComputedStyle(cursor2).opacity === '0'
)
await conditionPromise(() =>
getComputedStyle(cursor1).opacity === '1' && getComputedStyle(cursor2).opacity === '1'
)
editor.moveRight()
await component.getNextUpdatePromise()