From 10317e161bf447dc30561ec4e6c1d7800ef95c6c Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Tue, 10 Oct 2023 17:35:05 +0200 Subject: [PATCH] Add e2e tests to private key export --- playwright/tests/toolbar.spec.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/playwright/tests/toolbar.spec.ts b/playwright/tests/toolbar.spec.ts index 08187451c0..2fe88277cf 100644 --- a/playwright/tests/toolbar.spec.ts +++ b/playwright/tests/toolbar.spec.ts @@ -1,5 +1,5 @@ import { test, expect } from '@playwright/test' -import { password } from '../utils/test-inputs' +import { password, privateKey } from '../utils/test-inputs' import { fillPrivateKeyAndPassword } from '../utils/fillPrivateKey' import { warnSlowApi } from '../utils/warnSlowApi' import { mockApi } from '../utils/mockApi' @@ -53,3 +53,15 @@ test.describe('Profile tab', () => { await expect(page.getByText('Loading', { exact: true })).toBeHidden() }) }) + +test.describe('My Accounts tab', () => { + test('should get a private key', async ({ page }) => { + await page.goto('/open-wallet/private-key') + await fillPrivateKeyAndPassword(page) + await page.getByTestId('account-selector').click() + await page.getByText('Manage').click() + await page.getByText('Export Private Key').click() + await page.getByText('I understand, reveal my private key').click() + await expect(page.getByText(privateKey)).toBeVisible() + }) +})