From 2fbb68d6a631dc50468a0b85d011e8c9837b5f17 Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Wed, 18 Oct 2023 23:58:09 -0300 Subject: [PATCH] fix(keyPairListComponent.spec.ts): fix typo in test case description fix(keyPairListComponent.spec.ts): update test case to fill input field with a value containing spaces for better coverage fix(keyPairListComponent.spec.ts): add assertion to check if input field value with spaces is correctly filled fix(keyPairListComponent.spec.ts): update test case to fill input field with a value containing spaces for better coverage fix(keyPairListComponent.spec.ts): update assertion to check if input field value with spaces is correctly filled --- .../end-to-end/keyPairListComponent.spec.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/frontend/tests/end-to-end/keyPairListComponent.spec.ts b/src/frontend/tests/end-to-end/keyPairListComponent.spec.ts index 01c7c7bca..936a07035 100644 --- a/src/frontend/tests/end-to-end/keyPairListComponent.spec.ts +++ b/src/frontend/tests/end-to-end/keyPairListComponent.spec.ts @@ -21,7 +21,17 @@ test("KeypairListComponent", async ({ page }) => { await page.locator('//*[@id="keypair0"]').click(); await page.locator('//*[@id="keypair0"]').fill("testtesttesttest"); await page.locator('//*[@id="keypair100"]').click(); - await page.locator('//*[@id="keypair100"]').fill("testtesttesttesttesttest"); + await page + .locator('//*[@id="keypair100"]') + .fill("test test test test test test"); + + const valueWithSpace = await page + .locator('//*[@id="keypair100"]') + .inputValue(); + + if (valueWithSpace !== "test test test test test test") { + expect(false).toBeTruthy(); + } const plusButtonLocatorNode = page.locator('//*[@id="plusbtn0"]'); const elementCountNode = await plusButtonLocatorNode.count(); @@ -94,7 +104,7 @@ test("KeypairListComponent", async ({ page }) => { await page.locator('//*[@id="keypair100"]').click(); await page .locator('//*[@id="keypair100"]') - .fill("testtesttesttesttesttest"); + .fill("test test test test test test"); const plusButtonLocator = page.locator('//*[@id="plusbtn0"]'); const elementCount = await plusButtonLocator.count(); @@ -132,7 +142,7 @@ test("KeypairListComponent", async ({ page }) => { if ( key1 === "testtesttesttest" && - value1 === "testtesttesttesttesttest" && + value1 === "test test test test test test" && key2 === "testtesttesttest2" && value2 === "testtesttesttesttesttest2" ) {