Verify unlock reward visibility in release QA
This commit is contained in:
@@ -5,6 +5,7 @@ import { chromium } from 'playwright';
|
||||
const targetUrl = withDebugParam(process.env.RELEASE_QA_URL ?? 'http://127.0.0.1:4173/');
|
||||
const screenshotDir = 'dist';
|
||||
const expectedTitle = '\uC0BC\uAD6D\uC9C0: \uC138 \uD615\uC81C\uC758 \uB9F9\uC138';
|
||||
const firstBattleUnlockLabel = '\uD669\uAC74 \uC794\uB2F9 \uCD94\uACA9 \uAC1C\uBC29';
|
||||
|
||||
let serverProcess;
|
||||
let browser;
|
||||
@@ -98,6 +99,10 @@ try {
|
||||
assert(resultProbe.outcome === 'victory', `Expected forced victory result: ${JSON.stringify(resultProbe)}`);
|
||||
assert(resultProbe.resultTexts.includes('목표 정산'), `Expected result objective settlement title: ${JSON.stringify(resultProbe.resultTexts)}`);
|
||||
assert(resultProbe.resultTexts.some((text) => text.includes('목표 보상')), `Expected reward panel to name objective rewards: ${JSON.stringify(resultProbe.resultTexts)}`);
|
||||
assert(
|
||||
resultProbe.resultTexts.some((text) => text.includes(`해금 ${firstBattleUnlockLabel}`)),
|
||||
`Expected result reward panel to surface first battle unlock label: ${JSON.stringify(resultProbe.resultTexts)}`
|
||||
);
|
||||
assert(!resultProbe.resultTexts.some((text) => text.includes('미달')), `Expected result screen to avoid harsh optional-goal wording: ${JSON.stringify(resultProbe.resultTexts)}`);
|
||||
|
||||
await page.mouse.click(738, 642);
|
||||
@@ -120,6 +125,16 @@ try {
|
||||
assert(firstCampProbe.state?.campaign?.step === 'first-camp', `Expected victory to return to first camp: ${JSON.stringify(firstCampProbe.state)}`);
|
||||
assert(firstCampProbe.summary?.includes('보유 군자금'), `Expected camp summary to show held gold: ${JSON.stringify(firstCampProbe)}`);
|
||||
assert(firstCampProbe.texts.some((text) => text.includes('전투 보상')), `Expected camp report to show battle reward: ${JSON.stringify(firstCampProbe.texts)}`);
|
||||
assert(
|
||||
firstCampProbe.texts.some((text) => text.includes(`다음 ${firstBattleUnlockLabel}`)),
|
||||
`Expected camp report to surface first battle unlock label: ${JSON.stringify(firstCampProbe.texts)}`
|
||||
);
|
||||
assert(
|
||||
firstCampProbe.state?.report?.campaignRewards?.unlocks?.some(
|
||||
(unlock) => unlock.battleId === 'second-battle-yellow-turban-pursuit' && unlock.title === firstBattleUnlockLabel
|
||||
),
|
||||
`Expected campaign report debug state to retain first battle unlock reward: ${JSON.stringify(firstCampProbe.state?.report?.campaignRewards)}`
|
||||
);
|
||||
|
||||
await seedCampaignSave(page, {
|
||||
battleId: 'fifty-eighth-battle-qishan-retreat',
|
||||
|
||||
@@ -15547,6 +15547,7 @@ export class CampScene extends Phaser.Scene {
|
||||
? {
|
||||
rewardGold: this.report.rewardGold,
|
||||
objectives: this.report.objectives,
|
||||
campaignRewards: this.report.campaignRewards,
|
||||
completedCampDialogues: this.report.completedCampDialogues,
|
||||
completedCampVisits: this.report.completedCampVisits,
|
||||
bonds: this.report.bonds.map((bond) => ({ id: bond.id, level: bond.level, exp: bond.exp, battleExp: bond.battleExp }))
|
||||
|
||||
Reference in New Issue
Block a user