From 5fc555271d4cf243d90161fcc5e5cfb1cd66a1b3 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 2 Nov 2023 10:23:46 +0100 Subject: [PATCH] Fix test [dependabot skip] --- packages/stories-block/src/block/test/storiesPlaceholder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/stories-block/src/block/test/storiesPlaceholder.js b/packages/stories-block/src/block/test/storiesPlaceholder.js index fa29e4bd49f3..3eaf1ace6d2b 100644 --- a/packages/stories-block/src/block/test/storiesPlaceholder.js +++ b/packages/stories-block/src/block/test/storiesPlaceholder.js @@ -27,6 +27,7 @@ import StoriesLoading from '../components/storiesLoading'; describe('StoriesLoading', () => { it('should display spinner', () => { render(); - expect(screen.getByText('Loading Stories…')).toBeInTheDocument(); + // Text occurs twice, once within the placeholder and once in the a11y-speak-region. + expect(screen.getAllByText('Loading Stories…')[0]).toBeInTheDocument(); }); });