From 679f3807f467540a88a86a6f8717138d611f0cd9 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 14 Oct 2024 16:48:41 +0200 Subject: [PATCH] Add test to ensure the settings URL is updated --- e2e/settings.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/e2e/settings.spec.ts b/e2e/settings.spec.ts index 48db1dd..256bcb9 100644 --- a/e2e/settings.spec.ts +++ b/e2e/settings.spec.ts @@ -6,4 +6,18 @@ test('update the log level', async ({ page }) => { await page.getByLabel('Log level').selectOption('TRACE'); await page.getByRole('main').locator('div').filter({ hasText: 'Log' }).getByRole('button').click(); await expect(page.locator('span').filter({ hasText: 'success ! The log level has' }).locator('b')).toBeVisible(); +}) + +test('update the URL with wrong URL applies', async ({ page }) => { + await page.goto('/dashboard'); + await page.getByRole('link', { name: 'Settings' }).click(); + await page.getByLabel('Codex client node URL').click(); + + await page.getByLabel('Codex client node URL').fill('http://127.0.0.1:8079'); + await page.getByRole('button', { name: 'Save changes' }).nth(1).click(); + + await expect.soft(page.getByText("Cannot retrieve the data")).toBeVisible() + + await page.getByLabel('Codex client node URL').fill('http://127.0.0.1:8080'); + await page.getByRole('button', { name: 'Save changes' }).nth(1).click(); }) \ No newline at end of file