Skip to content

Commit e3fece1

Browse files
committed
toolbar/TourButton: fix test when env var set
The name depends on the environment and this test failed during release.
1 parent 2908ac3 commit e3fece1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/toolbar/buttons/tour/TourButton.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { cleanup } from '@testing-library/react';
55
import React from 'react';
66
import { testRender } from '../../../../test';
7+
import { appName } from '../../../app/constants';
78
import { HubRuntimeState } from '../../../hub/reducers';
89
import { tourStart } from '../../../tour/actions';
910
import TourButton from './TourButton';
@@ -17,7 +18,7 @@ it('should dispatch action when clicked', async () => {
1718
hub: { runtime: HubRuntimeState.Running },
1819
});
1920

20-
await user.click(button.getByRole('button', { name: 'Tour Pybricks Code' }));
21+
await user.click(button.getByRole('button', { name: `Tour ${appName}` }));
2122

2223
expect(dispatch).toHaveBeenCalledWith(tourStart());
2324
});

0 commit comments

Comments
 (0)