mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2025-12-14 12:06:28 +00:00
* Price checking does not work when using a gamepad(Ctrl+D) #452 Uses parts from #454 to fix the issue. Co-authored-by: lawrsp <7957003+lawrsp@users.noreply.github.com> * Fix tests :( * Fix magic rarity item name parse in "cmn-Hant" language (#460) * Fix magic rarity item name parse in "cmn-Hant" language * Add by translated when ref is null --------- Co-authored-by: kvan7 <kvan.valve@gmail.com> * chore: yarn to npm and add missing step (#461) * fix: update game config path for linux to poe2 * Merge pull request #463 from nightah/fix-poe2-linuxconfig fix: update game config path for linux to poe2 * fix tests * fix: MacOS crash on startup (#428) * fix: MacOS crash on startup * update for windows/linux * move main app startup into function Mac calls that in async, other platforms proceed in sync. * [PoE2] - Relics broken again #444 * test prettier and add npm script * add format/lint support to main * Fix defineProps macro * Run speed v0.8.0 - Russian. #447 * fix negative gold * Merge branch 'Kvan7:master' into master * fix: app-ready fixing before we're ready * Merge branch 'dev' into pr/larssn/428 * should work? * Merge commit 'ab1c8bfa3a31b06da9cf18db0273f6a92e407bc5' into pr/larssn/428 * fix being lazy on the merge * fix: add executable bit to compilation script (#465) * Item Images (#472) * image data stuff * ignore lookup file * update testing * sort items * change sort ot be by refname * more code * working pulling * Fixes #456 Create script to request item's images from trade site #456 * Fixes #457 Update ImageFix to use new saved images before poe1 ones #457 * add images to items * Add Spear as item category * Add Flail as category * Add "goodness" from upstream * Fix #474 Tier # missing from some defense stats #474 * minor oops * remove error for waystones * Add a bunch of images to the docs * Extra widgets docs * Update chat commands links docs * add stash search docs * Item info docs page * more docs * Update bug-report.yml * Version bump * extra version bump * Merge commit '77899fd6a7e08ab25bb677b70ba04757cc472f63' into dev * Upgraded rune selector #345 (#482) * Add added-rune mark to effected stats * Add runes to data parser * run data * more change * add popout to select rune * Other runes work now * different ui for opening rune menu * banner for debug cause i want it * Add above selector * Add auto close * Add config option to open above * update translation docs * More useful filter enables * Add stat text to rune selector * fix overflow * fix le garbage * Fix unique corrupted error * hide runes in 2 spots * fix ele damage runes * Fix bug no filters * minor change * fix flat damage tiers * fix source on ele damage * revert #103 * data update for timelost * fix warnings for timelost jewels * add tags to items data * Fix "grant skill" unidentified mod * Update style for rune, remove logs * better shortening for timelost text * Generalize the rune selector * Fix attack speed rune * fix runes including non martial weapons * sort trade ids, helps git struggle less * final data update before patch time * minor * update data for 0.2.0 * fix runes kinda * version bump
74 lines
2.6 KiB
TypeScript
74 lines
2.6 KiB
TypeScript
import { magicBasetype } from "@/parser/magic-name";
|
|
import { beforeEach, describe, expect, test } from "vitest";
|
|
import { setupTests } from "../vitest.setup";
|
|
import { loadForLang } from "@/assets/data";
|
|
|
|
describe("Check Magic Name (en)", () => {
|
|
beforeEach(async () => {
|
|
setupTests();
|
|
await loadForLang("en");
|
|
});
|
|
test("Should parse normal name", () => {
|
|
const name = "Rattling Sceptre";
|
|
expect(magicBasetype(name)).toBe("Rattling Sceptre");
|
|
});
|
|
test("Should parse magic name with suffix", () => {
|
|
const name = "Cultist Greathammer of Nourishment";
|
|
expect(magicBasetype(name)).toBe("Cultist Greathammer");
|
|
});
|
|
test("Should parse magic name with prefix", () => {
|
|
const name = "Pulsing Antler Focus";
|
|
expect(magicBasetype(name)).toBe("Antler Focus");
|
|
});
|
|
test("Should parse magic name with prefix and suffix", () => {
|
|
const name = "Reaver's Temple Maul of Stunning";
|
|
expect(magicBasetype(name)).toBe("Temple Maul");
|
|
});
|
|
});
|
|
|
|
describe("Check Magic Name (cmn-Hant)", () => {
|
|
beforeEach(async () => {
|
|
setupTests({ language: "cmn-Hant" });
|
|
await loadForLang("cmn-Hant");
|
|
});
|
|
test("Should parse normal name", () => {
|
|
const name = "雜響權杖";
|
|
expect(magicBasetype(name)).toBe("雜響權杖");
|
|
});
|
|
test("Should parse magic name with suffix", () => {
|
|
const name = "營養之教徒巨錘";
|
|
expect(magicBasetype(name)).toBe("教徒巨錘");
|
|
});
|
|
test("Should parse magic name with prefix", () => {
|
|
const name = "脈衝的靈鹿法器";
|
|
expect(magicBasetype(name)).toBe("靈鹿法器");
|
|
});
|
|
test("Should parse magic name with prefix and suffix", () => {
|
|
const name = "掠奪者的擊暈之神殿重錘";
|
|
expect(magicBasetype(name)).toBe("神殿重錘");
|
|
});
|
|
});
|
|
|
|
describe("Check Magic Name (cmn-Hant) when UI returns english name", () => {
|
|
beforeEach(async () => {
|
|
setupTests({ language: "cmn-Hant" });
|
|
await loadForLang("cmn-Hant");
|
|
});
|
|
test("Should parse normal name", () => {
|
|
const name = "Rattling Sceptre";
|
|
expect(magicBasetype(name)).toBe("Rattling Sceptre");
|
|
});
|
|
test("Should parse magic name with suffix", () => {
|
|
const name = "Cultist Greathammer of Nourishment";
|
|
expect(magicBasetype(name)).toBe("Cultist Greathammer");
|
|
});
|
|
test("Should parse magic name with prefix", () => {
|
|
const name = "Pulsing Antler Focus";
|
|
expect(magicBasetype(name)).toBe("Antler Focus");
|
|
});
|
|
test("Should parse magic name with prefix and suffix", () => {
|
|
const name = "Reaver's Temple Maul of Stunning";
|
|
expect(magicBasetype(name)).toBe("Temple Maul");
|
|
});
|
|
});
|