Skip to content

Commit 9eb4f44

Browse files
committed
fix unit test
1 parent c1fb51a commit 9eb4f44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/compass-components/src/components/drawer-portal.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ describe('DrawerSection', function () {
182182
: () => openDrawer('controlled-section')
183183
}
184184
>
185-
{isDrawerOpen ? 'Close drawer' : 'Open drawer'}
185+
{isDrawerOpen ? 'Hook Close drawer' : 'Hook Open drawer'}
186186
</button>
187187
</div>
188188
);
@@ -215,14 +215,14 @@ describe('DrawerSection', function () {
215215
expect(screen.getByTestId('drawer-state')).to.have.text('closed');
216216

217217
// Open the drawer
218-
userEvent.click(screen.getByRole('button', { name: 'Open drawer' }));
218+
userEvent.click(screen.getByRole('button', { name: 'Hook Open drawer' }));
219219
await waitFor(() => {
220220
expect(screen.getByTestId('drawer-state')).to.have.text('open');
221221
expect(screen.getByText('This is the controlled section')).to.be.visible;
222222
});
223223

224224
// Close the drawer
225-
userEvent.click(screen.getByRole('button', { name: 'Close drawer' }));
225+
userEvent.click(screen.getByRole('button', { name: 'Hook Close drawer' }));
226226
await waitFor(() => {
227227
expect(screen.getByTestId('drawer-state')).to.have.text('closed');
228228
expect(screen.queryByText('This is the controlled section')).not.to.exist;

0 commit comments

Comments
 (0)