Skip to content

Commit

Permalink
Update other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vrigal committed Jun 21, 2024
1 parent 0b23726 commit 9f749a2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
6 changes: 5 additions & 1 deletion tests/ui/job-view/AppHistory_test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ describe('history', () => {
},
);
fetchMock.get(
`begin:${getProjectUrl('/push/?full=true&count=', repoName)}`,
`begin:${getProjectUrl('/push/?full=true&count=10&revision=', 'try')}`,
{ results: [] },
);
fetchMock.get(
`begin:${getProjectUrl('/push/?full=true&count=10', repoName)}`,
{
...pushListFixture,
results: [pushListFixture.results[0]],
Expand Down
9 changes: 7 additions & 2 deletions tests/ui/job-view/AppRoutes_test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ConnectedRouter } from 'connected-react-router';
import App from '../../../ui/App';
import reposFixture from '../mock/repositories';
import { getApiUrl } from '../../../ui/helpers/url';
import { getProjectUrl } from '../../../ui/helpers/location';
import {
configureStore,
history,
Expand All @@ -28,6 +29,12 @@ describe('Test for backwards-compatible routes for other apps', () => {
fetchMock.get('/revision.txt', []);
fetchMock.get(getApiUrl('/repository/'), reposFixture);
fetchMock.get(getApiUrl('/failureclassification/'), []);
fetchMock.get(getApiUrl('/user/'), []);
fetchMock.get(getProjectUrl('/jobs/319893964/', 'autoland'), {});
fetchMock.get(
getProjectUrl('/jobs/319893964/text_log_errors/', 'autoland'),
{},
);
});

test('old push health url should redirect to correct url', () => {
Expand Down Expand Up @@ -83,8 +90,6 @@ describe('Test for backwards-compatible routes for other apps', () => {
});

test('url is not broken when it contains a table permalink hash', async () => {
fetchMock.get(getApiUrl('/user/'), []);

history.push(
'/perfherder/compare?originalProject=mozilla-central&originalRevision=54e7fb66ad44b8dcb8caab587f929dad60932d71&newProject=mozilla-central&newRevision=54e7fb66ad44b8dcb8caab587f929dad60932d71&framework=1&page=1#tableLink-header-134266337',
);
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/job-view/bugfiler_test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@ describe('BugFiler', () => {
});

test('should strip omitted leads from thisFailure', async () => {
const { getByTitle } = bugFilerComponentSuggestions(PdfSuggestions);
render(bugFilerComponentSuggestions(PdfSuggestions), { legacyRoot: true });

const toggleSummary = getByTitle('expand');
const toggleSummary = screen.getByTitle('expand');
await fireEvent.click(toggleSummary);

// TODO: hardcoded '2' value - how to get textarea for expanded field
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/test-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ jest.mock('taskcluster-client-web', () => {
}),
};
});

jest.setTimeout(10000);

0 comments on commit 9f749a2

Please sign in to comment.