Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/uSupport.E2E/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineConfig({
},
projects: [
{ name: 'admin-setup', testMatch: 'admin.setup.ts' },
{ name: 'editor-setup', testMatch: 'editor.setup.ts' },
{ name: 'editor-setup', testMatch: 'editor.setup.ts', dependencies: ['admin-setup'] },
{
name: 'admin',
testMatch: '*.spec.ts',
Expand Down
6 changes: 2 additions & 4 deletions src/uSupport.E2E/tests/editor/editor.setup.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { test as setup } from '@playwright/test';
import { ApiHelpers } from '@umbraco-cms/acceptance-test-helpers';
import { EDITOR_STATE } from '../../playwright.config';
import { ADMIN_STATE, EDITOR_STATE } from '../../playwright.config';
import { login } from '../helpers';

setup('log in as editor', async ({ page, browser }) => {
const email = process.env.UMBRACO_EDITOR_LOGIN!;
const password = process.env.UMBRACO_EDITOR_PASSWORD!;

// Unattended install only creates the admin, so log in as admin over the API to create the editor
const adminContext = await browser.newContext();
const adminContext = await browser.newContext({ storageState: ADMIN_STATE });
const api = new ApiHelpers(await adminContext.newPage());
await api.updateTokenAndCookie(process.env.UMBRACO_USER_LOGIN!, process.env.UMBRACO_USER_PASSWORD!);
const editors = await api.userGroup.getByName('Editors');
// Creates the user if missing and resets the password, so reruns are safe
await api.user.setUserPermissions('Editor', email, password, editors.id);
Expand Down
6 changes: 3 additions & 3 deletions src/uSupport/Client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading