17426: Add "enableWhenPristine" option for dialog boxes.
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / project-action-set.test.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { projectActionSet, readOnlyProjectActionSet } from "./project-action-set";
6
7 describe('project-action-set', () => {
8     const flattProjectActionSet = projectActionSet.reduce((prev, next) => prev.concat(next), []);
9     const flattReadOnlyProjectActionSet = readOnlyProjectActionSet.reduce((prev, next) => prev.concat(next), []);
10
11     describe('projectActionSet', () => {
12         it('should not be empty', () => {
13             // then
14             expect(flattProjectActionSet.length).toBeGreaterThan(0);
15         });
16
17         it('should contain readOnlyProjectActionSet items', () => {
18             // then
19             expect(flattProjectActionSet)
20                 .toEqual(expect.arrayContaining(flattReadOnlyProjectActionSet));
21         })
22     });
23
24     describe('readOnlyProjectActionSet', () => {
25         it('should not be empty', () => {
26             // then
27             expect(flattReadOnlyProjectActionSet.length).toBeGreaterThan(0);
28         });
29
30         it('should not contain projectActionSet items', () => {
31             // then
32             expect(flattReadOnlyProjectActionSet)
33                 .not.toEqual(expect.arrayContaining(flattProjectActionSet));
34         })
35     });
36 });