You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
import { test , expect } from '@playwright/test' ;
test ( 'Add contact' , async ( { page } ) = > {
// Create new ID using seed phrase "rigid shrug mobile…"
await page . goto ( './start' ) ;
await page . getByText ( 'You have a seed' ) . click ( ) ;
await page . getByPlaceholder ( 'Seed Phrase' ) . fill ( 'rigid shrug mobile smart veteran half all pond toilet brave review universe ship congress found yard skate elite apology jar uniform subway slender luggage' ) ;
await page . getByRole ( 'button' , { name : 'Import' } ) . click ( ) ;
// Set name
await page . getByRole ( 'link' , { name : 'Set Your Name' } ) . click ( ) ;
await page . getByPlaceholder ( 'Name' ) . fill ( 'User Zero' ) ;
await page . getByRole ( 'button' , { name : 'Save Changes' } ) . click ( ) ;
// Add new contact 01
await page . goto ( './contacts' ) ;
await page . getByPlaceholder ( 'URL or DID, Name, Public Key' ) . fill ( 'did:ethr:0x111d15564f824D56C7a07b913aA7aDd03382aA39' ) ;
await page . locator ( 'button > svg.fa-plus' ) . click ( ) ;
await expect ( page . locator ( 'div[role="alert"]' ) ) . toBeVisible ( ) ;
// Why doesn't the alert box come up every time?
// await page.locator('div[role="alert"] button:has-text("Yes")').click();
await expect ( page . locator ( 'li.border-b' ) ) . toContainText ( 'did:ethr:0x111d15564f824D56C7a07b913aA7aDd03382aA39' ) ;
} ) ;