Skip to content

Commit bcd9c44

Browse files
author
Yongqi Wu
committed
replace getByText by getByRole
1 parent f77f194 commit bcd9c44

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/bpk-component-info-banner/src/withBannerAlertState-test.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ describe('withBannerAlertState(BpkInfoBannerExpandable)', () => {
133133
{longMessage}
134134
</BpkInfoBannerExpandableState>,
135135
);
136-
137-
await userEvent.click(screen.getByText(message));
136+
await userEvent.click(screen.getByRole('button'));
138137
expect(onExpandMock).toHaveBeenCalled();
139138
});
140139
});

0 commit comments

Comments
 (0)