mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Merge pull request #15154 from atom/jr-fix-15122
Fix flaky test re: blinking cursor
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user