blob: 11fbbd8e0a9b1e7645a8aff825ad48d33ea61fc4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import { expect, test } from '@playwright/test';
test.describe('Tool - XML formatter', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/xml-formatter');
});
test('Has correct title', async ({ page }) => {
await expect(page).toHaveTitle('XML formatter - IT Tools');
});
test('XML is converted into a human readable format', async ({ page }) => {
await page.getByTestId('input').fill('<foo><bar>baz</bar><bar>baz</bar></foo>');
const formattedXml = await page.getByTestId('area-content').innerText();
expect(formattedXml.trim()).toEqual(`
<foo>
<bar>baz</bar>
<bar>baz</bar>
</foo>`.trim());
});
});
|