This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
/
Ambush.spec.js
51 lines (47 loc) · 2.05 KB
/
Ambush.spec.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
describe('Ambush', function() {
integration(function() {
beforeEach(function() {
this.setupTest({
phase: 'conflict',
player1: {
inPlay: ['Adept of the Waves']
},
player2: {
fate: 50,
inPlay: ['Adept of the Waves'],
hand: ['Ambush', 'Adept of Shadows', 'Adept of Shadows', 'Adept of Shadows', 'bayushi-kachiko', 'vengeful-oathkeeper']
}
});
this.noMoreActions();
this.initiateConflict({
attackers: ['Adept of the Waves'],
defenders: ['Adept of the Waves']
});
this.ambush = this.player2.hand[0];
this.adept1 = this.player2.hand[1];
this.adept2 = this.player2.hand[2];
this.adept3 = this.player2.hand[3];
this.kachiko = this.player2.hand[4];
this.lion = this.player2.hand[5];
});
describe('When playing Ambush', function() {
beforeEach(function() {
this.player2.clickCard(this.ambush, 'hand');
});
it('should not allow the player to select more than 2 characters', function() {
this.player2.clickCard(this.adept1, 'hand');
this.player2.clickCard(this.adept2, 'hand');
this.player2.clickCard(this.adept3, 'hand');
expect(this.player2.selectedCards.length).toBe(2);
});
it('should not allow the player to select characters with more than 6 cost', function() {
this.player2.clickCard(this.adept1, 'hand');
this.player2.clickCard(this.kachiko, 'hand');
expect(this.player2.selectedCards.includes(this.kachiko)).toBe(false);
});
it('should not allow the player to select non-Scorpion characters', function() {
expect(this.player2.currentActionTargets.includes(this.lion)).toBe(false);
});
});
});
});