refactor(settings): polish settings UI

This commit is contained in:
Carlos Valente
2026-08-01 17:09:48 +02:00
committed by Carlos Valente
parent f0c284b708
commit 24be49ef66
49 changed files with 1946 additions and 1268 deletions
+18 -5
View File
@@ -7,10 +7,11 @@ test('redirect', async ({ context }) => {
await controllerPage.goto('/editor?settings=network__clients');
await remotePage.goto('/timer');
await controllerPage.getByTestId('not-self-redirect').click();
const remoteClient = controllerPage.getByRole('row').filter({ hasText: /\/timer/ });
await remoteClient.getByTestId('not-self-redirect').click();
await controllerPage.getByRole('textbox', { name: 'http://localhost:' }).click();
await controllerPage.getByRole('textbox', { name: 'http://localhost:' }).fill('studio');
await controllerPage.getByLabel('Redirect', { exact: true }).click();
await controllerPage.getByRole('button', { name: 'Redirect to custom path' }).click();
await expect(remotePage.getByTestId('studio-view')).toBeVisible();
});
@@ -22,7 +23,11 @@ test('identify', async ({ context }) => {
await controllerPage.goto('/editor?settings=network__clients');
await remotePage.goto('/timer');
await controllerPage.getByTestId('not-self-identify').click();
await controllerPage
.getByRole('row')
.filter({ hasText: /\/timer/ })
.getByTestId('not-self-identify')
.click();
await expect(remotePage.getByTestId('identify-overlay')).toBeVisible();
});
@@ -34,11 +39,19 @@ test('rename', async ({ context }) => {
await controllerPage.goto('/editor?settings=network__clients');
await remotePage.goto('/timer');
await controllerPage.getByTestId('not-self-rename').click();
await controllerPage
.getByRole('row')
.filter({ hasText: /\/timer/ })
.getByTestId('not-self-rename')
.click();
await controllerPage.getByPlaceholder('new name').click();
await controllerPage.getByPlaceholder('new name').fill('test');
await controllerPage.getByRole('button', { name: 'Submit' }).click();
await controllerPage.getByTestId('not-self-identify').click();
await controllerPage
.getByRole('row')
.filter({ hasText: /\/timer/ })
.getByTestId('not-self-identify')
.click();
await expect(remotePage.getByTestId('identify-overlay')).toContainText('test');
});