mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-22 13:25:36 +03:00
83d2b3b7fa
UX/Translation changes: - new teams: remove redundant tooltips that don't add meaningful information - move general information to table fieldset - new teams: rename "general" to "custom" access for clarity - new teams: show labels beside options on mobile Accessibility: - semantic form elements allow easier navigation (fieldset, mostly) - improve better labelling of new teams table - fix accessibility scan issues - TODO: the parts that "disable" form elements were not yet touched and are not really accessible to screenreaders Technical: - replace two JavaScript solutions with one CSS standard - implement a simpler grid (.simple-grid) - simplify markup - remove some webhook settings specific CSS Testing: - check more form content for accessibility issues - but exclude tooltips from the scan :( - reuse existing form tests from previous PR
24 lines
979 B
JavaScript
24 lines
979 B
JavaScript
// @ts-check
|
|
import {expect} from '@playwright/test';
|
|
import {test, login_user, login} from './utils_e2e.js';
|
|
import {validate_form} from './shared/forms.js';
|
|
|
|
test.beforeAll(async ({browser}, workerInfo) => {
|
|
await login_user(browser, workerInfo, 'user2');
|
|
});
|
|
|
|
test('org team settings', async ({browser}, workerInfo) => {
|
|
test.skip(workerInfo.project.name === 'Mobile Safari', 'Cannot get it to work - as usual');
|
|
const page = await login({browser}, workerInfo);
|
|
const response = await page.goto('/org/org3/teams/team1/edit');
|
|
await expect(response?.status()).toBe(200);
|
|
|
|
await page.locator('input[name="permission"][value="admin"]').click();
|
|
await expect(page.locator('.hide-unless-checked')).toBeHidden();
|
|
|
|
await page.locator('input[name="permission"][value="read"]').click();
|
|
await expect(page.locator('.hide-unless-checked')).toBeVisible();
|
|
|
|
// we are validating the form here to include the part that could be hidden
|
|
await validate_form({page});
|
|
});
|