From c5f5e81f2ca24cc88a5bbf0f3cf4d8304e414a01 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Wed, 31 Jul 2024 19:44:44 +0800 Subject: [PATCH] Playwright: check ID generation --- .../04-check-id-generation.spec.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test-playwright/04-check-id-generation.spec.ts diff --git a/test-playwright/04-check-id-generation.spec.ts b/test-playwright/04-check-id-generation.spec.ts new file mode 100644 index 000000000..446e68668 --- /dev/null +++ b/test-playwright/04-check-id-generation.spec.ts @@ -0,0 +1,21 @@ +import { test, expect } from '@playwright/test'; + +test('Check ID generation', async ({ page }) => { + // Load Account view + await page.goto('./account'); + + // Check that ID is empty + await expect(page.locator('#sectionIdentityDetails code.truncate')).toBeEmpty(); + + // Load homepage to trigger ID generation (?) + await page.goto('./'); + + // Wait for activity feed to start loading, as a delay + await expect(page.locator('ul#listLatestActivity li:nth-child(10)')).toBeVisible(); + + // Go back to Account view + await page.goto('./account'); + + // Check that ID is now generated + await expect(page.locator('#sectionIdentityDetails code.truncate')).toContainText('did:ethr:'); +}); \ No newline at end of file