feat: playwright

This commit is contained in:
Ibrahima G. Coulibaly
2024-06-26 08:59:18 +01:00
parent 6e3804d2c7
commit 3f00335ade
10 changed files with 616 additions and 89 deletions

View File

@@ -0,0 +1,18 @@
import { test, expect } from '@playwright/test';
test.describe('JoinText Component', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/string/join');
});
test('should merge text pieces with specified join character', async ({
page
}) => {
// Input the text pieces
await page.getByTestId('text-input').fill('1\n2');
const result = await page.getByTestId('text-result').inputValue();
expect(result).toBe('12');
});
});