Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vrigal committed Sep 8, 2023
1 parent 6215bc7 commit 81f021d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/ui/job-view/details/PinBoard_test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ describe('DetailsPanel', () => {

test('pin all jobs', async () => {
const { queryAllByTitle } = render(testDetailsPanel());
store.dispatch(pinJobs(jobList.data));
await store.dispatch(pinJobs(jobList.data));
const unPinJobBtns = queryAllByTitle('Unpin job');
expect(unPinJobBtns).toHaveLength(5);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/test-setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Entry point for Jest tests
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';

const mockBuildUrl = jest.fn((root, taskId, path) => {
return `${root}/${taskId}/artifacts/${path}`;
Expand Down
4 changes: 3 additions & 1 deletion ui/perfherder/alerts/AlertsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ class AlertsView extends React.Component {
const userInputArray = userInput.split(' ');

const repositories = projects.map(({ name }) => name);
const optionsCollection = Object.values(optionCollectionMap);
const optionsCollection = optionCollectionMap
? Object.values(optionCollectionMap)
: [];

const allNotSupportedFilters = [...repositories, ...optionsCollection];
return allNotSupportedFilters.filter((elem) =>
Expand Down

0 comments on commit 81f021d

Please sign in to comment.