Skip to content

Commit

Permalink
Add integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Oct 3, 2023
1 parent 2f0c336 commit b45b11f
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions ui-tests/tests/nbdime-merge-test10.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { expect, test } from '@playwright/test';

test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:41000/merge');
await page.locator('#merge-local').fill('data/merge_test10/left.ipynb');
await page.locator('#merge-base').fill('data/merge_test10/center.ipynb');
await page.locator('#merge-remote').fill('data/merge_test10/right.ipynb');
await page.getByRole('button', { name: 'Merge files' }).click();
});

/* notebooks of same length and 1 conflict*/
test.describe('merge test10', () => {
test('should synchronize the collapse status between editor', async ({ page }) => {
expect.soft(await page.locator('#main').screenshot()).toMatchSnapshot();

// Should display 4 collapsers
const collapsers = page.getByText('4 unchanged lines');
await expect.soft(collapsers).toHaveCount(4);
await expect.soft(page.getByText('gaussian array y')).toHaveCount(0);

// Click on the base editor collapser
await page.getByText('4 unchanged lines').nth(1).click();

// Should not display any collapsers
await expect.soft(collapsers).toHaveCount(0);
await expect(page.getByText('gaussian array y')).toHaveCount(4);
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b45b11f

Please sign in to comment.