Files
threshold-ui/e2e-tests/desktop/tests/settings.spec.js
T
55e1e68f30 [COMPLIANCE] Update Copyright and License Headers (#3099)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Dharini <dharini@hashicorp.com>
2026-01-20 11:35:10 -05:00

37 lines
1.3 KiB
JavaScript

/**
* Copyright IBM Corp. 2021, 2025
* SPDX-License-Identifier: BUSL-1.1
*/
import { expect, test } from '../fixtures/baseTest.js';
test.describe('Settings Page tests', () => {
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
});