Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test contacts syncing initial state too, not just actions #1741

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .changelog/1741.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test contacts syncing initial state too, not just actions
17 changes: 15 additions & 2 deletions playwright/tests/syncTabs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,30 @@ test.describe('syncTabs', () => {
await page.getByTestId('toolbar-contacts-tab').click()
await page.getByText('You have no contacts yet.')

await page.getByRole('button', { name: 'Add Contact' }).click()
await page.getByPlaceholder('Name').fill('stakefish')
await page
.getByPlaceholder('Address', { exact: true })
.fill('oasis1qq3xrq0urs8qcffhvmhfhz4p0mu7ewc8rscnlwxe')
await page.getByRole('button', { name: 'Save' }).click()
await expect(page.getByTestId('account-choice')).toHaveCount(1)

await tab2.goto('/')
await tab2.getByTestId('account-selector').click()
await tab2.getByTestId('toolbar-contacts-tab').click()
await expect(tab2.getByTestId('account-choice')).toHaveCount(1)
await tab2.getByRole('button', { name: 'Add Contact' }).click()
await tab2.getByPlaceholder('Name').fill('Foo')
await tab2
.getByPlaceholder('Address', { exact: true })
.fill('oasis1qq2vzcvxn0js5unsch5me2xz4kr43vcasv0d5eq4')
await tab2.getByRole('button', { name: 'Save' }).click()
await expect(tab2.getByTestId('account-choice')).toHaveCount(1)
await expect(page.getByTestId('account-choice')).toHaveCount(1)
await expect(tab2.getByTestId('account-choice')).toHaveCount(2)
await expect(page.getByTestId('account-choice')).toHaveCount(2)

await page.getByRole('button', { name: 'Manage' }).first().click()
await page.getByRole('button', { name: 'Delete contact' }).click()
await page.getByRole('button', { name: 'Yes, delete' }).click()

await page.getByRole('button', { name: 'Manage' }).click()
await page.getByPlaceholder('Name').fill('Bar')
Expand Down
Loading