Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lsocrate committed Jan 11, 2024
1 parent a52097d commit 83e2d27
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 41 deletions.
1 change: 0 additions & 1 deletion server/game/cards/20-Core2/Phoenix/FukurokushisBlessing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import AbilityDsl from '../../../abilitydsl';
import DrawCard from '../../../drawcard';
import type Player from '../../../player';
import { ProvinceCard } from '../../../ProvinceCard';

export default class FukurokushisBlessing extends DrawCard {
Expand Down
37 changes: 17 additions & 20 deletions test/server/cards/20-Core2/Phoenix/FukurokushisBlessing.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ describe("Fukurokushi's Blessing", function () {
this.player2.clickPrompt('1');
});

it('does not work outside conflicts', function () {
this.noMoreActions();

this.player2.clickCard(this.feeding);
this.player2.clickCard(this.cycleOfVengeance);
this.player2.clickCard(this.cycleOfVengeance);

expect(this.player1).not.toHavePrompt('Triggered Abilities');
expect(this.player1).not.toBeAbleToSelect(this.blessing);

this.player2.clickCard(this.kuwanan);
expect(this.getChatLogs(10)).toContain(
'player2 uses Cycle of Vengeance to honor and place a fate on Doji Kuwanan'
);
expect(this.cycleOfVengeance.isBroken).toBe(true);
});

it('cancels provinces on attack', function () {
this.noMoreActions();
this.player2.clickPrompt('Pass');
Expand All @@ -49,25 +66,5 @@ describe("Fukurokushi's Blessing", function () {
);
expect(this.kuwanan.bowed).toBe(false);
});

it('does not work outside conflicts', function () {
/**
* THIS TEST IS FLAKY. THE REASON WHY IS A MYSTERY
*/
this.noMoreActions();

this.player2.clickCard(this.feeding);
this.player2.clickCard(this.cycleOfVengeance);
this.player2.clickCard(this.cycleOfVengeance);

expect(this.player1).not.toHavePrompt('Triggered Abilities');
expect(this.player1).not.toBeAbleToSelect(this.blessing);

this.player2.clickCard(this.kuwanan);
expect(this.getChatLogs(10)).toContain(
'player2 uses Cycle of Vengeance to honor and place a fate on Doji Kuwanan'
);
expect(this.cycleOfVengeance.isBroken).toBe(true);
});
});
});
20 changes: 1 addition & 19 deletions test/server/cards/20-Core2/Unicorn/ForeignCustoms.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,6 @@ describe('Foreign Customs', function () {
this.chagatai.facedown = false;
});

it('should react if you win', function () {
this.noMoreActions();
this.initiateConflict({
attackers: [this.challenger],
defenders: [this.toshimoko]
});

this.player2.clickCard(this.pd);
this.player2.clickCard(this.toshimoko);
this.player2.clickCard(this.challenger);

this.player1.clickPrompt('2');
this.player2.clickPrompt('1');

expect(this.player1).toHavePrompt('Triggered Abilities');
expect(this.player1).toBeAbleToSelect(this.destiny);
});

it('should react if you lose', function () {
this.noMoreActions();
this.initiateConflict({
Expand Down Expand Up @@ -135,7 +117,7 @@ describe('Foreign Customs', function () {
this.player1.clickPrompt('1');
this.player2.clickPrompt('2');

expect(this.player2).toHavePrompt('Policy Debate');
expect(this.player2).not.toHavePrompt('Triggered Abilities');
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/server/cards/20-Core2/Unicorn/IdeNobutada.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Ide Nobutada', function () {

this.fineKatana = this.player1.findCardByName('fine-katana');
this.ideNobutada = this.player1.findCardByName('ide-nobutada');
this.shinjoTakame = this.player1.findCardByName('shinjo-takame', 'dynasty deck');
this.shinjoTakame = this.player1.findCardByName('shinjo-takame');

this.ideNobutada.honor();
this.ideNobutada.modifyFate(1);
Expand Down

0 comments on commit 83e2d27

Please sign in to comment.