mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 05:47:10 -04:00
fix(text-to-binary): return valid UTF-8 results for non-ASCII text
This commit is contained in:
parent
e876d03608
commit
35d8264c2b
5 changed files with 105 additions and 50 deletions
|
@ -1,12 +1,12 @@
|
|||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test.describe('Tool - Text to ASCII binary', () => {
|
||||
test.describe('Tool - Text to UTF-8 binary', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/text-to-binary');
|
||||
});
|
||||
|
||||
test('Has correct title', async ({ page }) => {
|
||||
await expect(page).toHaveTitle('Text to ASCII binary - IT Tools');
|
||||
await expect(page).toHaveTitle('Text to UTF-8 binary - IT Tools');
|
||||
});
|
||||
|
||||
test('Text to binary conversion', async ({ page }) => {
|
||||
|
@ -17,7 +17,9 @@ test.describe('Tool - Text to ASCII binary', () => {
|
|||
});
|
||||
|
||||
test('Binary to text conversion', async ({ page }) => {
|
||||
await page.getByTestId('binary-to-text-input').fill('01101001 01110100 00101101 01110100 01101111 01101111 01101100 01110011');
|
||||
await page
|
||||
.getByTestId('binary-to-text-input')
|
||||
.fill('01101001 01110100 00101101 01110100 01101111 01101111 01101100 01110011');
|
||||
const text = await page.getByTestId('binary-to-text-output').inputValue();
|
||||
|
||||
expect(text).toEqual('it-tools');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue