Skip to content

Commit

Permalink
added regression test for specific guardian staff skill issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SaculRennorb committed May 30, 2024
1 parent 9783be0 commit 1e5209d
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/c#/10/Database/SkillIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@ public enum SkillId {
Save_Yourselves = 9085,
Bane_Signet1 = 9093,
Shelter = 9102,
Bolt_of_Wrath = 9122,
Hammer_of_Wisdom4 = 9125,
Sanctuary2 = 9128,
Holy_Strike = 9140,
Symbol_of_Swiftness = 9143,
Line_of_Warding = 9144,
Signet_of_Judgment1 = 9150,
Signet_of_Wrath1 = 9151,
Hold_the_Line = 9152,
Expand All @@ -146,6 +150,7 @@ public enum SkillId {
Contemplation_of_Purity = 9248,
Wall_of_Reflection = 9251,
Hallowed_Ground = 9253,
Empower = 9265,
Ether_Feast = 10176,
Mirror = 10177,
Arcane_Thievery = 10185,
Expand Down
5 changes: 5 additions & 0 deletions include/php/8.0/Database/SkillIds.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@ class SkillId {
public const Save_Yourselves = 9085;
public const Bane_Signet1 = 9093;
public const Shelter = 9102;
public const Bolt_of_Wrath = 9122;
public const Hammer_of_Wisdom4 = 9125;
public const Sanctuary2 = 9128;
public const Holy_Strike = 9140;
public const Symbol_of_Swiftness = 9143;
public const Line_of_Warding = 9144;
public const Signet_of_Judgment1 = 9150;
public const Signet_of_Wrath1 = 9151;
public const Hold_the_Line = 9152;
Expand All @@ -148,6 +152,7 @@ class SkillId {
public const Contemplation_of_Purity = 9248;
public const Wall_of_Reflection = 9251;
public const Hallowed_Ground = 9253;
public const Empower = 9265;
public const Ether_Feast = 10176;
public const Mirror = 10177;
public const Arcane_Thievery = 10185;
Expand Down
5 changes: 5 additions & 0 deletions include/ts/es6/Database/SkillIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ const enum SkillId {
Save_Yourselves = 9085,
Bane_Signet1 = 9093,
Shelter = 9102,
Bolt_of_Wrath = 9122,
Hammer_of_Wisdom4 = 9125,
Sanctuary2 = 9128,
Holy_Strike = 9140,
Symbol_of_Swiftness = 9143,
Line_of_Warding = 9144,
Signet_of_Judgment1 = 9150,
Signet_of_Wrath1 = 9151,
Hold_the_Line = 9152,
Expand All @@ -145,6 +149,7 @@ const enum SkillId {
Contemplation_of_Purity = 9248,
Wall_of_Reflection = 9251,
Hallowed_Ground = 9253,
Empower = 9265,
Ether_Feast = 10176,
Mirror = 10177,
Arcane_Thievery = 10185,
Expand Down
13 changes: 13 additions & 0 deletions tests/c#/10/ApiCacheTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,17 @@ public async Task LoadEleStaffSkills()

Assert.Equal(SkillId.Flame_Burst, thirdSkill);
}

[Fact] /* regression: guardian staff would show tome skills */
public async Task GuardianStaff() {
var code = new BuildCode();
code.Profession = Profession.Guardian;
code.WeaponSet1.MainHand = WeaponType.Staff;

Assert.Equal(SkillId.Bolt_of_Wrath , await V2.APICache.ResolveWeaponSkill(code, code.WeaponSet1, 0));
Assert.Equal(SkillId.Holy_Strike , await V2.APICache.ResolveWeaponSkill(code, code.WeaponSet1, 1));
Assert.Equal(SkillId.Symbol_of_Swiftness, await V2.APICache.ResolveWeaponSkill(code, code.WeaponSet1, 2));
Assert.Equal(SkillId.Empower , await V2.APICache.ResolveWeaponSkill(code, code.WeaponSet1, 3));
Assert.Equal(SkillId.Line_of_Warding , await V2.APICache.ResolveWeaponSkill(code, code.WeaponSet1, 4));
}
}
13 changes: 13 additions & 0 deletions tests/php/8.0/ApiInteractionTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,17 @@ public function LoadEleStaffSkills()

$this->assertEquals(SkillId::Flame_Burst, $thirdSkill);
}

/** @test */ /* regression: guardian staff would show tome skills */
public function GuardianStaff() {
$code = new BuildCode();
$code->Profession = Profession::Guardian;
$code->WeaponSet1->MainHand = WeaponType::Staff;

$this->assertEquals(SkillId::Bolt_of_Wrath , APICache::ResolveWeaponSkill($code, $code->WeaponSet1, 0));
$this->assertEquals(SkillId::Holy_Strike , APICache::ResolveWeaponSkill($code, $code->WeaponSet1, 1));
$this->assertEquals(SkillId::Symbol_of_Swiftness, APICache::ResolveWeaponSkill($code, $code->WeaponSet1, 2));
$this->assertEquals(SkillId::Empower , APICache::ResolveWeaponSkill($code, $code->WeaponSet1, 3));
$this->assertEquals(SkillId::Line_of_Warding , APICache::ResolveWeaponSkill($code, $code->WeaponSet1, 4));
}
}
13 changes: 13 additions & 0 deletions tests/ts/es6/ApiInteractionTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,17 @@ describe("ResolveWeaponSkills", () => {

expect(thirdSkill).toBe(SkillId.Flame_Burst);
});

/* regression: guardian staff would show tome skills */
test('GuardianStaff', async () => {
var code = new BuildCode();
code.Profession = Profession.Guardian;
code.WeaponSet1.MainHand = WeaponType.Staff;

expect(await APICache.ResolveWeaponSkill(code, code.WeaponSet1, 0)).toBe(SkillId.Bolt_of_Wrath);
expect(await APICache.ResolveWeaponSkill(code, code.WeaponSet1, 1)).toBe(SkillId.Holy_Strike);
expect(await APICache.ResolveWeaponSkill(code, code.WeaponSet1, 2)).toBe(SkillId.Symbol_of_Swiftness);
expect(await APICache.ResolveWeaponSkill(code, code.WeaponSet1, 3)).toBe(SkillId.Empower);
expect(await APICache.ResolveWeaponSkill(code, code.WeaponSet1, 4)).toBe(SkillId.Line_of_Warding);
});
});

0 comments on commit 1e5209d

Please sign in to comment.