* refactor: 💡 use hds app header and app side nav * style: 💄 fix dark-mode colors for side nav and app header * style: 💄 cleanup * style: 💄 simplify selector * refactor: 💡 move util (param finder) to core addon * refactor: 💡 move scope picker to core addon * refactor: 💡 use hds header and app side nav in ui/desktop * refactor: 💡 clean up ui/desktop files * refactor: 💡 remove uneeded header components * refactor: 💡 remove uneeded global layout * Add missing copyright headers * style: 💄 adjust foreground and background colors to fix contras * style: 💄 remove uneeded stylelint disables * style: 💄 fix dark mode styling in desktop ui * refactor: 💡 readd user-select style * test: 💍 fix tests + e2e tests for admin and desktop UIs * refactor: 💡 clean up uneeded main elements and fix color link * Add missing copyright headers * fix: 🐛 e2e test selectors for ui/desktop * style: 💄 revert link color change * refactor: 💡 remove hds override * fix: 🐛 scope dropdown for desktop * fix: 🐛 max-height to desktop scope dropdown * Add missing copyright headers * chore: 🤖 update lockfile due to webpack update
66 lines
1.9 KiB
JavaScript
66 lines
1.9 KiB
JavaScript
/**
|
|
* Copyright IBM Corp. 2021, 2026
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { test } from '../../global-setup.js';
|
|
import { expect } from '@playwright/test';
|
|
|
|
import * as boundaryCli from '../../helpers/boundary-cli';
|
|
import { OrgsPage } from '../pages/orgs.js';
|
|
import { StoragePoliciesPage } from '../pages/storage-policies.js';
|
|
|
|
test(
|
|
'Global Settings',
|
|
{ tag: ['@ent', '@aws', '@docker'] },
|
|
async ({
|
|
page,
|
|
controllerAddr,
|
|
adminAuthMethodId,
|
|
adminLoginName,
|
|
adminPassword,
|
|
}) => {
|
|
await page.goto('/');
|
|
let policyName;
|
|
try {
|
|
// Create a storage policy
|
|
const storagePoliciesPage = new StoragePoliciesPage(page);
|
|
policyName = await storagePoliciesPage.createStoragePolicy();
|
|
const orgsPage = new OrgsPage(page);
|
|
await orgsPage.attachStoragePolicy(policyName);
|
|
|
|
// Detach storage policy
|
|
await page.getByRole('button', { name: 'Manage', exact: true }).click();
|
|
await page
|
|
.getByRole('button', { name: 'Detach Storage Policy', exact: true })
|
|
.click();
|
|
await page.getByRole('button', { name: 'OK', exact: true }).click();
|
|
await expect(
|
|
page.getByRole('alert').getByText('Success', { exact: true }),
|
|
).toBeVisible();
|
|
await page.getByRole('button', { name: 'Dismiss' }).click();
|
|
|
|
// Navigate to orgs page when done
|
|
await page
|
|
.getByRole('navigation', { name: 'Primary' })
|
|
.getByRole('link', { name: 'Orgs' })
|
|
.click();
|
|
await expect(page.getByRole('heading', { name: 'Orgs' })).toBeVisible();
|
|
} finally {
|
|
if (policyName) {
|
|
await boundaryCli.authenticateBoundary(
|
|
controllerAddr,
|
|
adminAuthMethodId,
|
|
adminLoginName,
|
|
adminPassword,
|
|
);
|
|
const storagePolicyId = await boundaryCli.getPolicyIdFromName(
|
|
'global',
|
|
policyName,
|
|
);
|
|
await boundaryCli.deletePolicy(storagePolicyId);
|
|
}
|
|
}
|
|
},
|
|
);
|