resolves merges conflicts
This commit is contained in:
parent
65b0de5cee
commit
6e530e5937
|
@ -2,20 +2,12 @@
|
|||
|
||||
[Home](./index.md) > [cautious-journey](./cautious-journey.md) > [FlagLabel](./cautious-journey.flaglabel.md)
|
||||
|
||||
## FlagLabel interface
|
||||
## FlagLabel type
|
||||
|
||||
Individual labels: the equivalent of a checkbox.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface FlagLabel extends BaseLabel, ChangeSet
|
||||
export declare type FlagLabel = BaseLabel;
|
||||
```
|
||||
<b>Extends:</b> BaseLabel, ChangeSet
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [requires](./cautious-journey.flaglabel.requires.md) | Array<LabelRef> | |
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [cautious-journey](./cautious-journey.md) > [FlagLabel](./cautious-journey.flaglabel.md) > [requires](./cautious-journey.flaglabel.requires.md)
|
||||
|
||||
## FlagLabel.requires property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
requires: Array<LabelRef>;
|
||||
```
|
|
@ -41,6 +41,8 @@ export interface BaseLabel extends ChangeSet {
|
|||
* Label priority.
|
||||
*/
|
||||
priority: number;
|
||||
|
||||
requires: Array<LabelRef>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,13 +39,17 @@ describe('label helpers', () => {
|
|||
requires: [],
|
||||
}];
|
||||
const states = [{
|
||||
adds: [],
|
||||
name: 'foo',
|
||||
priority: 1,
|
||||
removes: [],
|
||||
requires: [],
|
||||
values,
|
||||
}, {
|
||||
adds: [],
|
||||
name: 'bar',
|
||||
priority: 1,
|
||||
removes: [],
|
||||
requires: [],
|
||||
values,
|
||||
}];
|
||||
|
@ -61,13 +65,17 @@ describe('label helpers', () => {
|
|||
describe('prioritize labels helper', () => {
|
||||
it('should sort by priority', () => {
|
||||
const HIGH_LABEL = {
|
||||
adds: [],
|
||||
name: 'high',
|
||||
priority: 5,
|
||||
removes: [],
|
||||
requires: [],
|
||||
};
|
||||
const LOW_LABEL = {
|
||||
adds: [],
|
||||
name: 'low',
|
||||
priority: 1,
|
||||
removes: [],
|
||||
requires: [],
|
||||
};
|
||||
|
||||
|
@ -77,13 +85,17 @@ describe('label helpers', () => {
|
|||
|
||||
it('should sort by name when priority is equal', () => {
|
||||
const FIRST_LABEL = {
|
||||
adds: [],
|
||||
name: 'label-a',
|
||||
priority: 1,
|
||||
removes: [],
|
||||
requires: [],
|
||||
};
|
||||
const SECOND_LABEL = {
|
||||
adds: [],
|
||||
name: 'label-b',
|
||||
priority: 1,
|
||||
removes: [],
|
||||
requires: [],
|
||||
};
|
||||
|
||||
|
@ -95,9 +107,12 @@ describe('label helpers', () => {
|
|||
describe('label color helper', () => {
|
||||
it('should return the value color', () => {
|
||||
expect(getLabelColor(['test'], alea(), {
|
||||
adds: [],
|
||||
color: 'beans',
|
||||
name: '',
|
||||
priority: 1,
|
||||
removes: [],
|
||||
requires: [],
|
||||
values: [],
|
||||
}, {
|
||||
adds: [],
|
||||
|
@ -106,14 +121,18 @@ describe('label helpers', () => {
|
|||
name: '',
|
||||
priority: 1,
|
||||
removes: [],
|
||||
requires: [],
|
||||
})).to.equal('not');
|
||||
});
|
||||
|
||||
it('should return the state color when value color is unset', () => {
|
||||
expect(getLabelColor(['test'], alea(), {
|
||||
adds: [],
|
||||
color: 'beans',
|
||||
name: '',
|
||||
priority: 1,
|
||||
removes: [],
|
||||
requires: [],
|
||||
values: [],
|
||||
}, {
|
||||
adds: [],
|
||||
|
@ -122,6 +141,7 @@ describe('label helpers', () => {
|
|||
name: '',
|
||||
priority: 1,
|
||||
removes: [],
|
||||
requires: [],
|
||||
})).to.equal('beans');
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue