diff options
author | 2023-10-16 00:57:47 +0200 | |
---|---|---|
committer | 2023-10-15 22:57:47 +0000 | |
commit | b2ad4f7a27d1feaf0ef58042689124fc51c54d1e (patch) | |
tree | 904208593bd17b20b026f996a2a1b65e6b607f8c /src/tools/text-to-binary/text-to-binary.e2e.spec.ts | |
parent | b408df82c1d8a0123e552048421b37afcf5189c6 (diff) | |
download | it-tools-b2ad4f7a27d1feaf0ef58042689124fc51c54d1e.tar.gz it-tools-b2ad4f7a27d1feaf0ef58042689124fc51c54d1e.tar.zst it-tools-b2ad4f7a27d1feaf0ef58042689124fc51c54d1e.zip |
feat(new tool): text to ascii converter (#669)
Diffstat (limited to 'src/tools/text-to-binary/text-to-binary.e2e.spec.ts')
-rw-r--r-- | src/tools/text-to-binary/text-to-binary.e2e.spec.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tools/text-to-binary/text-to-binary.e2e.spec.ts b/src/tools/text-to-binary/text-to-binary.e2e.spec.ts new file mode 100644 index 0000000..2b4e431 --- /dev/null +++ b/src/tools/text-to-binary/text-to-binary.e2e.spec.ts @@ -0,0 +1,25 @@ +import { expect, test } from '@playwright/test'; + +test.describe('Tool - Text to ASCII 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'); + }); + + test('Text to binary conversion', async ({ page }) => { + await page.getByTestId('text-to-binary-input').fill('it-tools'); + const binary = await page.getByTestId('text-to-binary-output').inputValue(); + + expect(binary).toEqual('01101001 01110100 00101101 01110100 01101111 01101111 01101100 01110011'); + }); + + test('Binary to text conversion', async ({ page }) => { + 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'); + }); +}); |