Skip to content
Snippets Groups Projects

Protected containers: Create protection rules in project settings

All threads resolved!
1 file
+ 12
11
Compare changes
  • Side-by-side
  • Inline
@@ -53,19 +53,20 @@ describe('container Protection Rule Form', () => {
describe('form fields', () => {
describe('form field "pushProtectedUpToAccessLevelSelect"', () => {
it('contains only valid options', () => {
mountComponent();
expect(findPushProtectedUpToAccessLevelSelect().exists()).toBe(true);
const pushProtectedUpToAccessLevelSelectOptions = findPushProtectedUpToAccessLevelSelect()
const pushProtectedUpToAccessLevelSelectOptions = () =>
findPushProtectedUpToAccessLevelSelect()
.findAll('option')
.wrappers.map((option) => option.element.value);
expect(pushProtectedUpToAccessLevelSelectOptions).toEqual([
'DEVELOPER',
'MAINTAINER',
'OWNER',
]);
});
it.each(['DEVELOPER', 'MAINTAINER', 'OWNER'])(
'includes the %s access level',
(accessLevel) => {
mountComponent();
expect(findPushProtectedUpToAccessLevelSelect().exists()).toBe(true);
expect(pushProtectedUpToAccessLevelSelectOptions()).toContain(accessLevel);
},
);
});
describe('when graphql mutation is in progress', () => {
Loading