Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions packages/e2e/src/diff.ambiguous-three-lines-left-two-right.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ const expectRowsToHaveText = async (expect: any, rows: any, texts: readonly stri
}
}

export const skip = 1

const toError = (error: unknown, fallbackMessage: string): Error => {
if (error instanceof Error) {
return error
Expand Down Expand Up @@ -58,13 +56,17 @@ const afterAnchor = true`,
const rightRows = Locator('.DiffEditorContentRight .EditorRow')
const leftLineNumbers = Locator('.DiffEditorContentLeft .DiffEditorLineNumber')
const rightLineNumbers = Locator('.DiffEditorContentRight .DiffEditorLineNumber')
const rightEmptyLineNumbers = Locator('.DiffEditorContentRight .DiffEditorLineNumberEmpty')
const rightGutterItems = Locator('.DiffEditorContentRight .DiffEditorGutter > div')
const deletedRows = Locator('.DiffEditorContentLeft .EditorRow.Deletion')
const insertedRows = Locator('.DiffEditorContentRight .EditorRow.Insertion')

await expect(leftRows).toHaveCount(5)
await expect(rightRows).toHaveCount(5)
await expect(leftLineNumbers).toHaveCount(5)
await expect(rightLineNumbers).toHaveCount(5)
await expect(rightLineNumbers).toHaveCount(4)
await expect(rightEmptyLineNumbers).toHaveCount(1)
await expect(rightGutterItems).toHaveCount(5)
await expect(deletedRows).toHaveCount(1)
await expect(insertedRows).toHaveCount(0)
await expect(deletedRows.nth(0)).toHaveText('renderItem()')
Expand All @@ -76,8 +78,8 @@ const afterAnchor = true`,
(): Promise<void> => expectRowsToHaveText(expect, rightRows, ['const beforeAnchor = true', 'renderItem()', 'renderItem()', '', 'const afterAnchor = true']),
])
await expectOneOf([
(): Promise<void> => expectRowsToHaveText(expect, rightLineNumbers, ['1', '', '2', '3', '4']),
(): Promise<void> => expectRowsToHaveText(expect, rightLineNumbers, ['1', '2', '', '3', '4']),
(): Promise<void> => expectRowsToHaveText(expect, rightLineNumbers, ['1', '2', '3', '', '4']),
(): Promise<void> => expectRowsToHaveText(expect, rightGutterItems, ['1', '', '2', '3', '4']),
(): Promise<void> => expectRowsToHaveText(expect, rightGutterItems, ['1', '2', '', '3', '4']),
(): Promise<void> => expectRowsToHaveText(expect, rightGutterItems, ['1', '2', '3', '', '4']),
])
}
Loading