From 50aeb59a371a6c39c97800883e43ab42cf42e819 Mon Sep 17 00:00:00 2001 From: osohyun0224 <53892427+osohyun0224@users.noreply.github.com> Date: Sun, 8 Sep 2024 16:09:58 +0900 Subject: [PATCH] remove :: rollback to unnecessary test code --- examples/todomvc/tests/integration.spec.ts | 2 +- tests/playwright-test/buttonClick.spec.ts | 24 ------------------- tests/playwright-test/helpers.ts | 27 ---------------------- 3 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 tests/playwright-test/buttonClick.spec.ts delete mode 100644 tests/playwright-test/helpers.ts diff --git a/examples/todomvc/tests/integration.spec.ts b/examples/todomvc/tests/integration.spec.ts index 4e895063bf..2f8317afeb 100644 --- a/examples/todomvc/tests/integration.spec.ts +++ b/examples/todomvc/tests/integration.spec.ts @@ -363,7 +363,7 @@ test.describe('Routing', () => { await test.step('Showing active items', async () => { await page.getByRole('link', { name: 'Active' }).click(); - }, {location}); + }); await test.step('Showing completed items', async () => { await page.getByRole('link', { name: 'Completed' }).click(); diff --git a/tests/playwright-test/buttonClick.spec.ts b/tests/playwright-test/buttonClick.spec.ts deleted file mode 100644 index cd87b155af..0000000000 --- a/tests/playwright-test/buttonClick.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { test, expect } from './playwright-test-fixtures'; -import { clickButton } from './helpers'; - -test('should click the button successfully', async ({ page }) => { - await page.goto('https://example.com'); - await clickButton(page, '#submit-button'); - expect(await page.isVisible('#confirmation')).toBeTruthy(); -}); \ No newline at end of file diff --git a/tests/playwright-test/helpers.ts b/tests/playwright-test/helpers.ts deleted file mode 100644 index de9540151b..0000000000 --- a/tests/playwright-test/helpers.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { test } from './stable-test-runner'; - -export async function clickButton(page, selector: string) { - return test.step(`Click on button with selector ${selector}`, async () => { - await page.click(selector); - }); -} - -export async function clickButton2(text: string) { - return test.step('dummy step', () => clickButton('helpers', text)); -} \ No newline at end of file