Skip to content

Commit

Permalink
Basic Address Generation Test
Browse files Browse the repository at this point in the history
  • Loading branch information
silkroadnomad committed Dec 4, 2024
1 parent e956d94 commit 38660d0
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion tests/playground.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ test.describe('Wallet Generation Tests', () => {
});


test('Change to ElectrumX-Doi Regtest', async ({ page, browser }) => {
test('Basic Wallet Generation Test', async ({ page, browser }) => {

await page.goto('/');
await page.waitForSelector('text=You are connected to an', { state: 'visible' });
Expand All @@ -120,5 +120,28 @@ test.describe('Wallet Generation Tests', () => {
expect(mnemonic).not.toBe('');
});

test('Basic Address Generation Test', async ({ page, browser }) => {
await page.goto('/');
await page.waitForSelector('text=You are connected to an', { state: 'visible' });
await page.getByRole('button', { name: 'Doichain-Mainnet Open menu' }).click();
await page.getByText('Doichain-Regtest').click();
await page.selectOption('#derivationStandardSelect', 'electrum-legacy');

// Set the mnemonic to the specified seed phrase
await page.fill('#mnemonicTextarea', 'test test test test test test test test test test test test');

// Fill in the password for decryption
await page.fill('#passwordInput', 'mnemonic');

// Click to decrypt
await page.getByRole('button', { name: 'Decrypt' }).click();

// Extract the generated address
const generatedAddress = await page.inputValue('#nextUnusedAddress');

// Verify the generated address
expect(generatedAddress).toBe('n3csERn5LkYxgmNQ1XH4qfRR5Ak8v3p3HU');
});

// ... other tests ...
});

0 comments on commit 38660d0

Please sign in to comment.