Playwright: implemented importUser

This commit is contained in:
Jose Olarte III
2024-08-05 19:58:40 +08:00
parent 43965e2ea7
commit 5da836c47c
4 changed files with 32 additions and 31 deletions

View File

@@ -1,16 +1,8 @@
import { test, expect } from '@playwright/test';
test('Add contact', async ({ page }) => {
// Create new ID using seed phrase "island fever beef…"
await page.goto('./start');
await page.getByText('You have a seed').click();
await page.getByPlaceholder('Seed Phrase').fill('island fever beef wine urban aim vacant quit afford total poem flame service calm better adult neither color gaze forum month sister imitate excite');
await page.getByRole('button', { name: 'Import' }).click();
// Set name
await page.getByRole('link', { name: 'Set Your Name' }).click();
await page.getByPlaceholder('Name').fill('User One');
await page.getByRole('button', { name: 'Save Changes' }).click();
// Import user 01
await importUser(page, '01');
// Add new contact 00
await page.goto('./contacts');