diff --git a/ui/desktop/tests/e2e/fixtures/electronTest.js b/ui/desktop/tests/e2e/fixtures/electronTest.js index c83714c2a..3fe9d81d9 100644 --- a/ui/desktop/tests/e2e/fixtures/electronTest.js +++ b/ui/desktop/tests/e2e/fixtures/electronTest.js @@ -109,6 +109,7 @@ exports.electronTest = test.extend({ env: { NODE_ENV: 'test', BYPASS_APP_UPDATER: true, + ...process.env, }, ...options, }); diff --git a/ui/desktop/tests/e2e/settings.spec.js b/ui/desktop/tests/e2e/settings.spec.js index 7f1cc4993..95f9537eb 100644 --- a/ui/desktop/tests/e2e/settings.spec.js +++ b/ui/desktop/tests/e2e/settings.spec.js @@ -6,11 +6,32 @@ const { test } = require('./fixtures/baseTest'); const { expect } = require('@playwright/test'); -test.describe.fixme('Settings Page tests', async () => { - test('Navigates to settings page', async ({ authedPage }) => { +test.describe('Settings Page tests', async () => { + test.beforeEach(async ({ authedPage }) => { await authedPage.getByRole('link', { name: 'Settings' }).click(); + }); + + test('Navigates to settings page', async ({ authedPage }) => { await expect(authedPage).toHaveURL( /.*\/scopes\/global\/projects\/settings$/, ); }); + + test('Signs out from settings page', async ({ authedPage }) => { + await authedPage.getByRole('button', { name: 'Sign Out' }).click(); + await expect(authedPage).toHaveURL(/.*\/scopes\/global\/authenticate\//); + }); + + test('Changes log level', async ({ authedPage }) => { + await authedPage.getByLabel('Logging level').selectOption('warn'); + // Navigate away and back + await authedPage.getByRole('link', { name: 'Targets' }).click(); + await authedPage.getByRole('link', { name: 'Settings' }).click(); + + await expect(authedPage.getByLabel('Logging level')).toHaveValue('warn'); + await authedPage.getByLabel('Logging level').selectOption('debug'); + await expect(authedPage.getByLabel('Logging level')).toHaveValue('debug'); + }); + + // TODO: Add some client agent tests? Need to figure out best solution to include client agent });