···24682468settings.protected_branch.save_rule = Save rule
24692469settings.protected_branch.delete_rule = Delete rule
24702470settings.branch_protection = Protection rules for branch "<b>%s</b>"
24712471+settings.protect_new_rule = Create a new branch protection rule
24712472settings.protect_this_branch = Enable branch protection
24722473settings.protect_this_branch_desc = Prevents deletion and restricts Git pushing and merging to the branch.
24732474settings.protect_disable_push = Disable push
···24792480settings.protect_whitelist_committers = Whitelist restricted push
24802481settings.protect_whitelist_committers_desc = Only whitelisted users or teams will be allowed to push to this branch (but not force push).
24812482settings.protect_whitelist_deploy_keys = Whitelist deploy keys with write access to push.
24822482-settings.protect_whitelist_users = Whitelisted users for pushing:
24832483-settings.protect_whitelist_teams = Whitelisted teams for pushing:
24832483+settings.protect_whitelist_users = Whitelisted users for pushing
24842484+settings.protect_whitelist_teams = Whitelisted teams for pushing
24842485settings.protect_merge_whitelist_committers = Enable merge whitelist
24852486settings.protect_merge_whitelist_committers_desc = Allow only whitelisted users or teams to merge pull requests into this branch.
24862486-settings.protect_merge_whitelist_users = Whitelisted users for merging:
24872487-settings.protect_merge_whitelist_teams = Whitelisted teams for merging:
24872487+settings.protect_merge_whitelist_users = Whitelisted users for merging
24882488+settings.protect_merge_whitelist_teams = Whitelisted teams for merging
24882489settings.protect_check_status_contexts = Enable status check
24892489-settings.protect_status_check_patterns = Status check patterns:
24902490+settings.protect_status_check_patterns = Status check patterns
24902491settings.protect_status_check_patterns_desc = Enter patterns to specify which status checks must pass before branches can be merged into a branch that matches this rule. Each line specifies a pattern. Patterns cannot be empty.
24912492settings.protect_check_status_contexts_desc = Require status checks to pass before merging. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. If no contexts are matched, the last commit must be successful regardless of context.
24922493settings.protect_check_status_contexts_list = Status checks found in the last week for this repository
24932494settings.protect_status_check_matched = Matched
24942495settings.protect_invalid_status_check_pattern = Invalid status check pattern: "%s".
24952496settings.protect_no_valid_status_check_patterns = No valid status check patterns.
24962496-settings.protect_required_approvals = Required approvals:
24972497+settings.protect_required_approvals = Required approvals
24972498settings.protect_required_approvals_desc = Allow only to merge pull request with enough positive reviews.
24982499settings.protect_approvals_whitelist_enabled = Restrict approvals to whitelisted users or teams
24992500settings.protect_approvals_whitelist_enabled_desc = Only reviews from whitelisted users or teams will count to the required approvals. Without approval whitelist, reviews from anyone with write access count to the required approvals.
25002500-settings.protect_approvals_whitelist_users = Whitelisted reviewers:
25012501-settings.protect_approvals_whitelist_teams = Whitelisted teams for reviews:
25012501+settings.protect_approvals_whitelist_users = Whitelisted reviewers
25022502+settings.protect_approvals_whitelist_teams = Whitelisted teams for reviews
25022503settings.dismiss_stale_approvals = Dismiss stale approvals
25032504settings.dismiss_stale_approvals_desc = When new commits that change the content of the pull request are pushed to the branch, old approvals will be dismissed.
25042505settings.ignore_stale_approvals = Ignore stale approvals
···25082509settings.protect_branch_name_pattern = Protected branch name pattern
25092510settings.protect_branch_name_pattern_desc = Protected branch name patterns. See <a href="https://github.com/gobwas/glob">the documentation</a> for pattern syntax. Examples: main, release/**
25102511settings.protect_patterns = Patterns
25112511-settings.protect_protected_file_patterns = Protected file patterns (separated using semicolon ";"):
25122512+settings.protect_protected_file_patterns = Protected file patterns (separated using semicolon ";")
25122513settings.protect_protected_file_patterns_desc = Protected files are not allowed to be changed directly even if user has rights to add, edit, or delete files in this branch. Multiple patterns can be separated using semicolon (";"). See <a href="https://pkg.go.dev/github.com/gobwas/glob#Compile">github.com/gobwas/glob</a> documentation for pattern syntax. Examples: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>.
25132513-settings.protect_unprotected_file_patterns = Unprotected file patterns (separated using semicolon ";"):
25142514+settings.protect_unprotected_file_patterns = Unprotected file patterns (separated using semicolon ";")
25142515settings.protect_unprotected_file_patterns_desc = Unprotected files that are allowed to be changed directly if user has write access, bypassing push restriction. Multiple patterns can be separated using semicolon (";"). See <a href="https://pkg.go.dev/github.com/gobwas/glob#Compile">github.com/gobwas/glob</a> documentation for pattern syntax. Examples: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>.
25152516settings.add_protected_branch = Enable protection
25162517settings.delete_protected_branch = Disable protection
···3131 const response = await page.goto('/user2/repo1/settings/branches/edit');
3232 await expect(response?.status()).toBe(200);
33333434- // not yet accessible :(
3535- // await validate_form({page}, 'fieldset');
3434+ await validate_form({page}, 'fieldset');
3535+3636+ // verify header is new
3737+ await expect(page.locator('h4')).toContainText('new');
3838+ await page.locator('input[name="rule_name"]').fill('testrule');
3939+ await page.getByText('Save rule').click();
4040+ // verify header is in edit mode
4141+ await page.waitForLoadState('networkidle');
4242+ await page.getByText('Edit').click();
4343+ await expect(page.locator('h4')).toContainText('Protection rules for branch');
4444+ // delete the rule for the next test
4545+ await page.goBack();
4646+ await page.getByText('Delete rule').click();
4747+ await page.getByText('Yes').click();
3648});
+10
tests/e2e/shared/forms.js
···44export async function validate_form({page}, scope) {
55 scope ??= 'form';
66 const accessibilityScanResults = await new AxeBuilder({page})
77+ // disable checking for link style - should be fixed, but not now
88+ .disableRules('link-in-text-block')
79 .include(scope)
810 // exclude automated tooltips from accessibility scan, remove when fixed
911 .exclude('span[data-tooltip-content')
1212+ // exclude weird non-semantic HTML disabled content
1313+ .exclude('.disabled')
1014 .analyze();
1115 expect(accessibilityScanResults.violations).toEqual([]);
1216···1620 await expect(b).toHaveCSS('margin-left', '0px');
1721 await expect(b).toHaveCSS('margin-top', '0px');
1822 await expect(b).toHaveCSS('vertical-align', 'baseline');
2323+ }
2424+ // assert no (trailing) colon is used in labels
2525+ // might be necessary to adjust in case colons are strictly necessary in help text
2626+ for (const l of await page.locator('label').all()) {
2727+ const str = await l.textContent();
2828+ await expect(str.split('\n')[0]).not.toContain(':');
1929 }
2030}