-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathexample.js
executable file
·51 lines (41 loc) · 1.27 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Fixtures = require('ibl-fixture-generator');
creator = new Fixtures({
savePath: './webapp/php/lib/test/fixtures/bamboo/'
});
creator.createFixture('categories/films/highlights').then(function (fixture) {
var group = fixture.insertGroup(0);
group.set({
title: 'New Group title for me!',
stacked: true
}).setMasterbrand('bbc_two').getChild(0).set({
synopses: {
small: 'A brand new synopses small just making it long to really try and confuse the truncation'
}
});
fixture.insertMostPopular(1);
fixture.insertGroup(2);
fixture.insertGroup(3);
fixture.insertGroup(4);
fixture.insertGroup(5);
fixture.insertGroup(6);
fixture.insertGroup(7);
fixture.save();
}).done();
creator.createFixture('categories/sport/programmes').then(function (fixture) {
fixture.getProgramme(1).getEpisode().set({
title: 'Hai from fixture',
labels: {
time: 'Hai Guys'
}
}).setMasterbrand('boo_fart');
fixture.save();
}).done();
creator.createFixture('home/highlights').then(function (fixture) {
fixture.getElement(0).set({
title: 'Hai from fixture'
});
fixture.insertGroup(5).set({
title: 'spanking new group'
});
fixture.save();
}).done();