Skip to content

Commit 971a624

Browse files
test(e2e): add null-plan guard test for nx-campaign-plan-card
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 parent 77cbdae commit 971a624

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

nx2/test/e2e/plan-card.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ test.describe('nx-campaign-plan-card', () => {
9595
await expect(items.nth(1)).toHaveAttribute('status', 'running');
9696
});
9797

98+
test('renders without error when plan is set to null', async ({ page }) => {
99+
await page.evaluate(() => {
100+
document.getElementById('card').plan = null;
101+
});
102+
const card = page.locator('nx-campaign-plan-card');
103+
await expect(shadow(card, '.plan-card')).toBeVisible();
104+
});
105+
98106
test('shows Done and disables run button when all tasks complete', async ({ page }) => {
99107
await page.evaluate(() => {
100108
const card = document.getElementById('card');

0 commit comments

Comments
 (0)