mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 12:12:15 +01:00
add dashboard frontend
This commit is contained in:
@@ -3,8 +3,8 @@ import { PLAYWRIGHT_BASE_URL } from '../playwright/config';
|
||||
|
||||
async function goToOrganizationSettings(page) {
|
||||
await page.goto(PLAYWRIGHT_BASE_URL + '/dashboard');
|
||||
await page.locator('#currentTeamButton').click();
|
||||
await page.getByRole('link', { name: 'Team Settings' }).click();
|
||||
await page.getByTestId('organization_switcher').click();
|
||||
await page.getByText('Team Settings').click();
|
||||
}
|
||||
|
||||
test('test that organization name can be updated', async ({ page }) => {
|
||||
@@ -12,14 +12,28 @@ test('test that organization name can be updated', async ({ page }) => {
|
||||
await page.getByLabel('Team Name').fill('NEW ORG NAME');
|
||||
await page.getByLabel('Team Name').press('Enter');
|
||||
await page.getByLabel('Team Name').press('Meta+r');
|
||||
await expect(page.getByRole('navigation')).toContainText('NEW ORG NAME');
|
||||
await expect(page.getByTestId('organization_switcher')).toContainText(
|
||||
'NEW ORG NAME'
|
||||
);
|
||||
});
|
||||
|
||||
test('test that new editor can be invited', async ({ page }) => {
|
||||
test('test that new manager can be invited', async ({ page }) => {
|
||||
await goToOrganizationSettings(page);
|
||||
const editorId = Math.round(Math.random() * 10000);
|
||||
await page.getByLabel('Email').fill(`new+${editorId}@editor.test`);
|
||||
await page.getByRole('button', { name: 'Editor' }).click();
|
||||
await page.getByRole('button', { name: 'Manager' }).click();
|
||||
await page.getByRole('button', { name: 'Add' }).click();
|
||||
await page.reload();
|
||||
await expect(page.getByRole('main')).toContainText(
|
||||
`new+${editorId}@editor.test`
|
||||
);
|
||||
});
|
||||
|
||||
test('test that new employee can be invited', async ({ page }) => {
|
||||
await goToOrganizationSettings(page);
|
||||
const editorId = Math.round(Math.random() * 10000);
|
||||
await page.getByLabel('Email').fill(`new+${editorId}@editor.test`);
|
||||
await page.getByRole('button', { name: 'Employee' }).click();
|
||||
await page.getByRole('button', { name: 'Add' }).click();
|
||||
await page.reload();
|
||||
await expect(page.getByRole('main')).toContainText(
|
||||
|
||||
Reference in New Issue
Block a user