Skip to content

Commit e7f81c1

Browse files
author
喜喜懒羊羊
committed
fix test fail
1 parent 404aa45 commit e7f81c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/Projects/WBS/WBSItem/__tests__/WBSItem.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ describe('WBSItem component', () => {
7878
it('check if deleteWBS html elements get displayed in virtual DOM when the permission is not present', () => {
7979
store.getState().auth.user.permissions.frontPermissions = [];
8080
const { container } = renderComponent(index, key, wbsId, projectId, name);
81-
expect(container.querySelector('.members__assign')).not.toBeInTheDocument();
81+
expect(screen.queryByRole('button', { class: 'btn btn-outline-danger btn-sm' })).not.toBeInTheDocument();
8282
});
8383

8484
it('check if deleteWBS html elements get displayed in virtual DOM when the permission is present', () => {
8585
const { container } = renderComponent(index, key, wbsId, projectId, name);
86-
expect(container.querySelector('.members__assign')).toBeInTheDocument();
86+
expect(screen.queryByRole('button', { class: 'btn btn-outline-danger btn-sm' })).toBeInTheDocument();
8787
});
8888
it('check if modal opens when button is clicked', async () => {
8989
axios.get.mockResolvedValue({

0 commit comments

Comments
 (0)