diff --git a/tests/CrediForm2.spec.ts b/tests/CrediForm2.spec.ts index 8a37892..19af1a9 100644 --- a/tests/CrediForm2.spec.ts +++ b/tests/CrediForm2.spec.ts @@ -1,13 +1,13 @@ import { test, expect } from '@playwright/test'; test('test', async ({ page }) => { - await page.goto('https://credicorpbank-dev.appianportals.com/b45e2d4c-8847-47d9-ac1f-2c518647614b-informaci-n-tarjeta-der-cr-dit?$sp=AAAAAgAAAAAAAAABAAAAEKeGkvNzdXNBf7IgspZSROmfhD-37E-tMHHQ7uT4voeQvwi8f0BEMqTcqkjXK_rrVMR52uL1ai7E5ixMTsd-m_kqa9H4tQ', { waitUntil: 'load' }); - // await page.goto('https://credicorpbank-dev.appianportals.com/b45e2d4c-8847-47d9-ac1f-2c518647614b-informaci-n-tarjeta-der-cr-dit?$sp=AAAAAgAAAAAAAAABAAAAEDX7QOBaa4GVPUkTCYJtaLj1mf876n_vFqOiLZo6ardIYsC-mI8oyvrVxZor3Tt6p4sg8B-UdK0ZQORVl5pJF-fCIJbJ0A', { waitUntil: 'load' }); + await page.goto('https://credicorpbank-dev.appianportals.com/b45e2d4c-8847-47d9-ac1f-2c518647614b-informaci-n-tarjeta-der-cr-dit?$sp=AAAAAgAAAAAAAAABAAAAEACu1CdfvoSr2zjsJq4vV4TLGs3wycnJB8ThCnmIch36_lialHG_wsXHY4oX_OAEGmT7rZB_2pRHADMiC7Z4VyQzWlra2g', { waitUntil: 'load' }); await page.getByText('En mi residencia').click(); await page.getByRole('combobox').click(); await page.getByText('De lunes a viernes 8:00 a. m').click(); await page.getByText('Si', { exact: true }).click(); await page.getByLabel('Plan seguro').click(); + await page.waitForSelector('text=Hasta $1,000 (Costo: $1.52)'); await page.getByText('Hasta $1,000 (Costo: $1.52)').click(); await page.getByText('No').click(); @@ -33,5 +33,5 @@ test('test', async ({ page }) => { // const backgroundColor = await cardDiv.evaluate((el) => getComputedStyle(el).backgroundColor); // expect(backgroundColor).toBe('rgb(83, 172, 77)'); - + }); \ No newline at end of file diff --git a/tests/example.spec.ts b/tests/example.spec.ts deleted file mode 100644 index 54a906a..0000000 --- a/tests/example.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('has title', async ({ page }) => { - await page.goto('https://playwright.dev/'); - - // Expect a title "to contain" a substring. - await expect(page).toHaveTitle(/Playwright/); -}); - -test('get started link', async ({ page }) => { - await page.goto('https://playwright.dev/'); - - // Click the get started link. - await page.getByRole('link', { name: 'Get started' }).click(); - - // Expects page to have a heading with the name of Installation. - await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible(); -});