From 4673c5a3753afc97b6891dc8392b29834e400ed9 Mon Sep 17 00:00:00 2001 From: Jamie Holding Date: Wed, 1 Jul 2026 09:44:30 +0000 Subject: [PATCH] feat(dlp): surface 'Live Your Story' Castle Stage show Disney flags P1GS93 (Live Your Story - a Disney Princess Celebration) 'Hide from the Service', so it was filtered out. Add it to VISIBILITY_EXCEPTIONS to surface it as a SHOW, matching the existing override pattern for Frozen Ever After / Tangled Spin. Adds a regression test covering the exception and the control (other hidden shows stay dropped). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/parks/dlp/__tests__/visibility.test.ts | 52 ++++++++++++++++++++++ src/parks/dlp/disneylandparis.ts | 1 + 2 files changed, 53 insertions(+) create mode 100644 src/parks/dlp/__tests__/visibility.test.ts diff --git a/src/parks/dlp/__tests__/visibility.test.ts b/src/parks/dlp/__tests__/visibility.test.ts new file mode 100644 index 00000000..3b33d7ef --- /dev/null +++ b/src/parks/dlp/__tests__/visibility.test.ts @@ -0,0 +1,52 @@ +import {describe, it, expect, vi, beforeEach} from 'vitest'; +import {DisneylandParis} from '../disneylandparis.js'; + +/** + * A hidden POI is normally dropped by filterPOIEntities (HIDE_RULES). Entities + * listed in VISIBILITY_EXCEPTIONS bypass that. P1GS93 ("Live Your Story") is a + * real Castle Stage show Disney flags "Hide from the Service", so it must be + * force-surfaced while other hidden shows stay filtered. + */ +function stubbedPark(): DisneylandParis { + const park = new DisneylandParis(); + vi.spyOn(park as any, 'getPOIData').mockResolvedValue({ + ThemePark: [{id: 'P1', name: 'Disneyland Park', type: 'ThemePark'}], + Entertainment: [ + { + id: 'P1GS93', + name: 'Live Your Story – a Disney Princess Celebration', + type: 'Entertainment', + subType: 'Stage Show', + location: {id: 'P1'}, + hideFunctionality: 'Hide from the Service', + }, + { + // Control: hidden Stage Show NOT in VISIBILITY_EXCEPTIONS — must stay dropped. + id: 'P1G107', + name: 'Disney Music Hits Concert', + type: 'Entertainment', + subType: 'Stage Show', + location: {id: 'P1'}, + hideFunctionality: 'Hide from Web List + Mobile App', + }, + ], + }); + return park; +} + +describe('DLP visibility exceptions', () => { + beforeEach(() => vi.restoreAllMocks()); + + it('surfaces P1GS93 (Live Your Story) despite its "Hide from the Service" flag', async () => { + const entities = await stubbedPark().getEntities(); + const lys = entities.find((e) => e.id === 'P1GS93'); + expect(lys).toBeDefined(); + expect(lys?.entityType).toBe('SHOW'); + expect((lys as any)?.parkId).toBe('P1'); + }); + + it('still drops other hidden shows not in the exception set', async () => { + const entities = await stubbedPark().getEntities(); + expect(entities.find((e) => e.id === 'P1G107')).toBeUndefined(); + }); +}); diff --git a/src/parks/dlp/disneylandparis.ts b/src/parks/dlp/disneylandparis.ts index dbf0e76e..7aa89f8b 100644 --- a/src/parks/dlp/disneylandparis.ts +++ b/src/parks/dlp/disneylandparis.ts @@ -34,6 +34,7 @@ const IGNORE_ENTITIES = new Set([ const VISIBILITY_EXCEPTIONS = new Set([ 'P2EA00', // Frozen Ever After 'P2DA00', // Tangled Spin + 'P1GS93', // Live Your Story – a Disney Princess Celebration (Castle Stage; Disney flags it "Hide from the Service") ]); /** Hide rules that exclude entities from the POI list */