From 60a2a62ad092c471b928b2b68fcd8be8b25d6457 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 11 Apr 2023 14:08:35 -0400 Subject: [PATCH] test(accordion): remove undefined check in test (#27171) ## What is the current behavior? The `ionChange` event test occasionally flakes on CI: https://github.com/ionic-team/ionic-framework/actions/runs/4670357292/jobs/8270028536 It appears that when clicking the same accordion again the test expects the `ionChange` event to receive a detail payload of `undefined`. However, this is wrong because `ionChange` should not fire at all if the value does not change. ## What is the new behavior? - Removes the `undefined` check from the test. This check does not seem necessary as clicking the `nth(2)` accordion should then update the payload. ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information --- core/src/components/accordion/test/basic/accordion.e2e.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/src/components/accordion/test/basic/accordion.e2e.ts b/core/src/components/accordion/test/basic/accordion.e2e.ts index fc033142f9..fae82ec3ad 100644 --- a/core/src/components/accordion/test/basic/accordion.e2e.ts +++ b/core/src/components/accordion/test/basic/accordion.e2e.ts @@ -42,9 +42,6 @@ test.describe('accordion: ionChange', () => { await accordionHeaders.nth(1).click(); await expect(ionChange).toHaveReceivedEventDetail({ value: 'second' }); - await accordionHeaders.nth(1).click(); - await expect(ionChange).toHaveReceivedEventDetail({ value: undefined }); - await accordionHeaders.nth(2).click(); await expect(ionChange).toHaveReceivedEventDetail({ value: 'third' }); });