* feat: 🎸 scope picker component (#2646) * feat: 🎸 scope picker component --------- Co-authored-by: lisbet-alvarez <lisbet-alvarez@users.noreply.github.com> Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> * refactor: 💡 use hds side nav w/ hds frame instead of rose (#2688) * refactor: 💡 use hds side nav w/ hds frame instead of rose * test: 💍 clean up selectors * fix: 🐛 specificity of style override * refactor: 💡 use hds side nav list instead of target and portal * refactor: 💡 revert to using portal component & update scss * docs: ✏️ update comment * refactor: 💡 use custom class names for containers * refactor: 💡 pr feedback (use @hasSidebar arg) * refactor: 💡 fix onboarding page & fix settings title * refactor: 💡 remove unneeded template file (pr feedback) * test: 💍 fix tests due to merge conflicts * test: 💍 add missing test selector due to merge conflict * test: 💍 fix more broken tests due to merge conflicts * chore: 🤖 update yarn.lock & update hds version to 4.18.1 * chore: 🤖 fix e2e test cases due to side nav refactor (#2751) * chore: 🤖 fix e2e test cases due to side nav refactor * test: 💍 fix e2e test for desktop --------- Co-authored-by: lisbet-alvarez <lisbet-alvarez@users.noreply.github.com> Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
66 lines
2.0 KiB
JavaScript
66 lines
2.0 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* 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: 'Application local navigation' })
|
|
.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);
|
|
}
|
|
}
|
|
},
|
|
);
|