blob: fee24d91c6085d877978f11308bf830d91030f22 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { expect, test } from '@playwright/test';
test.describe('Tool - json to yaml', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/json-to-yaml-converter');
});
test('Has correct title', async ({ page }) => {
await expect(page).toHaveTitle('JSON to YAML converter - IT Tools');
});
test('json is parsed and output clean yaml', async ({ page }) => {
await page.getByTestId('input').fill('{"foo":"bar","list":["item",{"key":"value"}]}');
const generatedJson = await page.getByTestId('area-content').innerText();
expect(generatedJson.trim()).toEqual('foo: bar\nlist:\n - item\n - key: value'.trim());
});
});
|