Fix activity spec
This commit is contained in:
parent
8cdc066ff9
commit
2c203185a0
|
@ -129,10 +129,19 @@ const
|
|||
}
|
||||
];
|
||||
|
||||
const pipeline = {
|
||||
_class: "some.class"
|
||||
}
|
||||
|
||||
const capabilities = {
|
||||
'some.class':{
|
||||
has: () => true
|
||||
}
|
||||
}
|
||||
describe("Activity should render", () => {
|
||||
|
||||
it("does renders the Activity with data", () => {
|
||||
const wrapper = shallow(<Activity runs={data} />);
|
||||
const wrapper = shallow(<Activity runs={data} pipeline={pipeline} capabilities={capabilities}/>);
|
||||
// does data renders?
|
||||
assert.isNotNull(wrapper)
|
||||
assert.equal(wrapper.find('Runs').length, data.length)
|
||||
|
@ -142,14 +151,14 @@ describe("Activity should render", () => {
|
|||
|
||||
describe("Activity should not render", () => {
|
||||
it("does not renders the Activity without data", () => {
|
||||
const wrapper = shallow(<Activity />).node;
|
||||
const wrapper = shallow(<Activity pipeline={pipeline} capabilities={capabilities}/>).node;
|
||||
assert.isNull(wrapper);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Pipeline -> Activity List', () => {
|
||||
it('should not duplicate changeset messages', () => {
|
||||
const wrapper = shallow(<Activity runs={data} />);
|
||||
const wrapper = shallow(<Activity runs={data} pipeline={pipeline} capabilities={capabilities} />);
|
||||
assert.isNotNull(wrapper);
|
||||
|
||||
const runs = wrapper.find('Runs');
|
||||
|
|
Loading…
Reference in New Issue