зеркало из https://github.com/mozilla/treeherder.git
Update dependency eslint-plugin-jest to v27 (#7560)
* Update dependency eslint-plugin-jest to v27 * fix tests to use proper .to* commands for updated jest Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Joel Maher <joel.maher@gmail.com>
This commit is contained in:
Родитель
054b9896b0
Коммит
dc3945fe48
|
@ -91,7 +91,7 @@
|
|||
"eslint-config-airbnb": "19.0.4",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-jest": "23.1.1",
|
||||
"eslint-plugin-jest": "27.1.3",
|
||||
"eslint-plugin-jsx-a11y": "6.2.3",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"eslint-plugin-react": "7.16.0",
|
||||
|
|
|
@ -87,7 +87,7 @@ const result = {
|
|||
|
||||
describe('getRevisionUrl helper', () => {
|
||||
test('escapes some html symbols', () => {
|
||||
expect(getRevisionUrl('1234567890ab', 'autoland')).toEqual(
|
||||
expect(getRevisionUrl('1234567890ab', 'autoland')).toBe(
|
||||
'/jobs?repo=autoland&revision=1234567890ab',
|
||||
);
|
||||
});
|
||||
|
@ -95,10 +95,10 @@ describe('getRevisionUrl helper', () => {
|
|||
|
||||
describe('displayNumber helper', () => {
|
||||
test('returns expected values', () => {
|
||||
expect(displayNumber('123.53222')).toEqual('123.53');
|
||||
expect(displayNumber('123123123.53222')).toEqual('123123123.53');
|
||||
expect(displayNumber(1 / 0)).toEqual('Infinity');
|
||||
expect(displayNumber(Number.NaN)).toEqual('N/A');
|
||||
expect(displayNumber('123.53222')).toBe('123.53');
|
||||
expect(displayNumber('123123123.53222')).toBe('123123123.53');
|
||||
expect(displayNumber(1 / 0)).toBe('Infinity');
|
||||
expect(displayNumber(Number.NaN)).toBe('N/A');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ describe('Filtering', () => {
|
|||
|
||||
fireEvent.keyDown(document, { key: 'f', keyCode: 70 });
|
||||
|
||||
expect(filterField).toBe(document.activeElement);
|
||||
expect(filterField).toEqual(document.activeElement);
|
||||
});
|
||||
|
||||
test('KeyboardShortcut ctrl+shift+f: clear the quick filter input', async () => {
|
||||
|
@ -356,7 +356,7 @@ describe('Filtering', () => {
|
|||
expect(queryAllByText('B')).toHaveLength(0);
|
||||
});
|
||||
|
||||
expect(filterField.value).toEqual('yaml');
|
||||
expect(filterField.value).toBe('yaml');
|
||||
fireEvent.keyDown(document, {
|
||||
key: 'f',
|
||||
keyCode: 70,
|
||||
|
@ -366,7 +366,7 @@ describe('Filtering', () => {
|
|||
|
||||
await waitFor(() => getAllByText('B'));
|
||||
|
||||
expect(filterField.value).toEqual('');
|
||||
expect(filterField.value).toBe('');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -442,7 +442,7 @@ describe('Filtering', () => {
|
|||
expect(queryAllByText(symbolToRemove)).toHaveLength(0);
|
||||
});
|
||||
|
||||
expect(history.location.search).toEqual(
|
||||
expect(history.location.search).toBe(
|
||||
'?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Csuccess%2Cretry%2Cusercancel%2Crunnable',
|
||||
);
|
||||
});
|
||||
|
@ -467,7 +467,7 @@ describe('Filtering', () => {
|
|||
await findAllByText('B');
|
||||
await waitFor(() => getAllByText(symbolToRemove), 5000);
|
||||
expect(jobCount()).toBe(50);
|
||||
expect(history.location.search).toEqual('?repo=autoland');
|
||||
expect(history.location.search).toBe('?repo=autoland');
|
||||
});
|
||||
|
||||
test('Filters | Reset should get back to original set of jobs', async () => {
|
||||
|
|
|
@ -64,7 +64,7 @@ describe('Transformations', () => {
|
|||
});
|
||||
});
|
||||
|
||||
test('Test path transformations (WPT)', () => {
|
||||
test('Path transformations (WPT)', () => {
|
||||
const tests = [
|
||||
{
|
||||
path: 'devtools/client/framework/browser-toolbox/test/browser.ini',
|
||||
|
|
|
@ -187,7 +187,7 @@ describe('More revisions link component', () => {
|
|||
const link = getByText('\u2026and more');
|
||||
|
||||
expect(link).toBeInTheDocument();
|
||||
expect(link.getAttribute('href')).toEqual('http://more.link/');
|
||||
expect(link.getAttribute('href')).toBe('http://more.link/');
|
||||
});
|
||||
|
||||
test('has an external link icon', () => {
|
||||
|
|
|
@ -171,7 +171,7 @@ describe('Pushes Redux store', () => {
|
|||
});
|
||||
await store.dispatch(fetchPushes(10, true));
|
||||
|
||||
expect(window.location.search).toEqual(
|
||||
expect(window.location.search).toBe(
|
||||
`?repo=${repoName}&tochange=ba9c692786e95143b8df3f4b3e9b504dfbc589a0&fromchange=90da061f588d1315ee4087225d041d7474d9dfd8`,
|
||||
);
|
||||
});
|
||||
|
@ -258,9 +258,9 @@ describe('Pushes Redux store', () => {
|
|||
{ type: CLEAR_PUSHES },
|
||||
);
|
||||
|
||||
expect(reduced.pushList).toEqual([]);
|
||||
expect(reduced.allUnclassifiedFailureCount).toEqual(0);
|
||||
expect(reduced.filteredUnclassifiedFailureCount).toEqual(0);
|
||||
expect(reduced.pushList).toStrictEqual([]);
|
||||
expect(reduced.allUnclassifiedFailureCount).toBe(0);
|
||||
expect(reduced.filteredUnclassifiedFailureCount).toBe(0);
|
||||
});
|
||||
|
||||
test('should replace the pushList with setPushes', async () => {
|
||||
|
@ -276,8 +276,8 @@ describe('Pushes Redux store', () => {
|
|||
);
|
||||
|
||||
expect(reduced.pushList).toEqual([push2]);
|
||||
expect(reduced.allUnclassifiedFailureCount).toEqual(0);
|
||||
expect(reduced.filteredUnclassifiedFailureCount).toEqual(0);
|
||||
expect(reduced.allUnclassifiedFailureCount).toBe(0);
|
||||
expect(reduced.filteredUnclassifiedFailureCount).toBe(0);
|
||||
});
|
||||
|
||||
test('should get new unclassified counts with recalculateUnclassifiedCounts', async () => {
|
||||
|
@ -295,8 +295,8 @@ describe('Pushes Redux store', () => {
|
|||
});
|
||||
|
||||
expect(Object.keys(reduced.jobMap)).toHaveLength(5);
|
||||
expect(reduced.allUnclassifiedFailureCount).toEqual(2);
|
||||
expect(reduced.filteredUnclassifiedFailureCount).toEqual(1);
|
||||
expect(reduced.allUnclassifiedFailureCount).toBe(2);
|
||||
expect(reduced.filteredUnclassifiedFailureCount).toBe(1);
|
||||
});
|
||||
|
||||
test('should add to the jobMap with updateJobMap', async () => {
|
||||
|
|
|
@ -93,7 +93,7 @@ describe('SelectedJob Redux store', () => {
|
|||
|
||||
expect(reduced.selectedJob).toBeUndefined();
|
||||
await waitFor(() =>
|
||||
expect(notifications[0]).toEqual(
|
||||
expect(notifications[0]).toBe(
|
||||
'Selected task: VaQoWKTbSdGSwBJn6UZV9g not within current push range.',
|
||||
),
|
||||
);
|
||||
|
@ -111,7 +111,7 @@ describe('SelectedJob Redux store', () => {
|
|||
|
||||
expect(reduced.selectedJob).toBeUndefined();
|
||||
await waitFor(() =>
|
||||
expect(notifications[0]).toEqual(
|
||||
expect(notifications[0]).toBe(
|
||||
'Task not found: a824gBVmRQSBuEexnVW_Qg, run 0',
|
||||
),
|
||||
);
|
||||
|
|
|
@ -52,16 +52,14 @@ describe('FilterAlertsWithVideos', () => {
|
|||
|
||||
await alertsWithVideos.enrichAndRetrieveAlerts();
|
||||
alertSummaryWithVideos.alerts.forEach((alert) => {
|
||||
if (alertsWithVideos.shouldHaveVideoLinks(alert)) {
|
||||
expect(alert).toHaveProperty('results_link', expectedResultsLink);
|
||||
expect(alert).toHaveProperty(
|
||||
'prev_results_link',
|
||||
expectedPrevResultsLink,
|
||||
);
|
||||
} else {
|
||||
expect(alert.results_link).toBeUndefined();
|
||||
expect(alert.prev_results_link).toBeUndefined();
|
||||
let erl = expectedResultsLink;
|
||||
let eprl = expectedPrevResultsLink;
|
||||
if (!alertsWithVideos.shouldHaveVideoLinks(alert)) {
|
||||
erl = undefined;
|
||||
eprl = undefined;
|
||||
}
|
||||
expect(alert.results_link).toEqual(erl);
|
||||
expect(alert.prev_results_link).toEqual(eprl);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -98,10 +96,11 @@ describe('FilterAlertsWithVideos', () => {
|
|||
const alerts = await alertsWithoutVideos.enrichAndRetrieveAlerts();
|
||||
expect(alerts).toStrictEqual([]);
|
||||
alertSummaryWithoutVideos.alerts.forEach((alert) => {
|
||||
if (!alertsWithoutVideos.shouldHaveVideoLinks(alert)) {
|
||||
expect(alert.results_link).toBeUndefined();
|
||||
expect(alert.prev_results_link).toBeUndefined();
|
||||
if (alertsWithoutVideos.shouldHaveVideoLinks(alert)) {
|
||||
return;
|
||||
}
|
||||
expect(alert.results_link).toBeUndefined();
|
||||
expect(alert.prev_results_link).toBeUndefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -119,10 +118,11 @@ describe('FilterAlertsWithVideos', () => {
|
|||
const alerts = await alertsWithoutVideos.enrichAndRetrieveAlerts();
|
||||
expect(alerts).toStrictEqual([]);
|
||||
alertSummaryNonBrowsertime.alerts.forEach((alert) => {
|
||||
if (!alertsWithoutVideos.shouldHaveVideoLinks(alert)) {
|
||||
expect(alert.results_link).toBeUndefined();
|
||||
expect(alert.prev_results_link).toBeUndefined();
|
||||
if (alertsWithoutVideos.shouldHaveVideoLinks(alert)) {
|
||||
return;
|
||||
}
|
||||
expect(alert.results_link).toBeUndefined();
|
||||
expect(alert.prev_results_link).toBeUndefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -60,7 +60,7 @@ const alertTableRowTest = (
|
|||
|
||||
afterEach(cleanup);
|
||||
|
||||
test('Test column contains only suite and test name', async () => {
|
||||
test('Column contains only suite and test name', async () => {
|
||||
const { getByTestId } = alertTableRowTest({ alert: testAlert, tags: false });
|
||||
const { suite, test } = testAlert.series_signature;
|
||||
|
||||
|
@ -71,7 +71,7 @@ test('Test column contains only suite and test name', async () => {
|
|||
expect(alertTitle.textContent).toBe(`${suite} ${test}`);
|
||||
});
|
||||
|
||||
test('Tests with duplicated suite and test name appears only once in Test column', async () => {
|
||||
test('Duplicated suite and test name appears only once in Test column', async () => {
|
||||
const { suite, test } = testAlert.series_signature;
|
||||
testAlert.series_signature.suite = 'duplicatedName';
|
||||
testAlert.series_signature.test = 'duplicatedName';
|
||||
|
@ -238,7 +238,7 @@ test('Duplicated tags and option are displayed only once, options and tags are t
|
|||
expect(allTagsAndOptions).toHaveLength(2);
|
||||
});
|
||||
|
||||
test('Duplicated tags and option are displayed only once, options and tags have elements in common ', async () => {
|
||||
test('Duplicated tags and option are displayed only once, options and tags have elements in common', async () => {
|
||||
const testOptions = ['cold', 'live', 'web'];
|
||||
const testTags = ['cold', 'live'];
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ describe('alert filtering ignores repository and/or options', () => {
|
|||
[testAlertSummaries[0].alerts[0].series_signature.options[0]],
|
||||
];
|
||||
testCases.forEach((testCase) => {
|
||||
it(testCase.toString(), async () => {
|
||||
it(`testcase: ${testCase.toString()}`, async () => {
|
||||
const { getByPlaceholderText, getByText } = alertsView();
|
||||
const alertsFilterInput = await waitFor(() =>
|
||||
getByPlaceholderText(filterText.inputPlaceholder),
|
||||
|
@ -382,7 +382,7 @@ test('selecting the alert summary checkbox then deselecting one alert only updat
|
|||
// only the selected alert has been updated
|
||||
expect(modifyAlertSpy).toHaveBeenCalled();
|
||||
expect(modifyAlertSpy.mock.results).toHaveLength(3);
|
||||
expect(modifyAlertSpy.mock.results[0].value.data.id).toEqual(69345);
|
||||
expect(modifyAlertSpy.mock.results[0].value.data.id).toBe(69345);
|
||||
expect(modifyAlertSpy.mock.results[0].value).toStrictEqual({
|
||||
data: {
|
||||
...testAlertSummaries[0].alerts[0],
|
||||
|
@ -770,7 +770,7 @@ test(`table data can be sorted in ascending order by 'Magnitude of Change'`, asy
|
|||
);
|
||||
});
|
||||
|
||||
test('test data can be sorted only by one column', async () => {
|
||||
test('Data can be sorted only by one column', async () => {
|
||||
const {
|
||||
getAllByLabelText,
|
||||
getByTestId,
|
||||
|
@ -816,7 +816,7 @@ test('test data can be sorted only by one column', async () => {
|
|||
);
|
||||
});
|
||||
|
||||
test('test previous alert button should be disable at first', async () => {
|
||||
test('Previous alert button should be disable at first', async () => {
|
||||
const { getByTestId } = alertsViewControls();
|
||||
|
||||
const prevScrollButton = await waitFor(() =>
|
||||
|
@ -826,7 +826,7 @@ test('test previous alert button should be disable at first', async () => {
|
|||
expect(prevScrollButton).toBeDisabled();
|
||||
});
|
||||
|
||||
test('test next alert button should be disable when reaching the last alert', async () => {
|
||||
test('Next alert button should be disable when reaching the last alert', async () => {
|
||||
const { getByTestId } = alertsViewControls();
|
||||
Element.prototype.scrollIntoView = jest.fn();
|
||||
|
||||
|
@ -842,11 +842,11 @@ test('test next alert button should be disable when reaching the last alert', as
|
|||
expect(nextScrollButton).toBeDisabled();
|
||||
});
|
||||
|
||||
test('test sherlock backfill status icons are displayed correctly', async () => {
|
||||
test('Sherlock backfill status icons are displayed correctly', async () => {
|
||||
const { getByTestId } = alertsViewControls();
|
||||
|
||||
const alert = testAlertSummaries[0].alerts[3];
|
||||
expect(alert.id).toEqual(69347);
|
||||
expect(alert.id).toBe(69347);
|
||||
|
||||
const alertIcon = await waitFor(() =>
|
||||
getByTestId(`alert ${alert.id.toString()} sherlock icon`),
|
||||
|
@ -855,10 +855,10 @@ test('test sherlock backfill status icons are displayed correctly', async () =>
|
|||
expect(alertIcon).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('test sherlock status 0 in tooltip on alerts', async () => {
|
||||
test('Sherlock status 0 in tooltip on alerts', async () => {
|
||||
const alert = testAlertSummaries[0].alerts[3];
|
||||
alert.backfill_record.status = alertBackfillResultStatusMap.preliminary;
|
||||
expect(alert.id).toEqual(69347);
|
||||
expect(alert.id).toBe(69347);
|
||||
|
||||
const { getByTestId, getByText } = alertsViewControls();
|
||||
// hovering over the Sherlock icon should display the tooltip
|
||||
|
@ -869,11 +869,11 @@ test('test sherlock status 0 in tooltip on alerts', async () => {
|
|||
await waitFor(() => getByText(alertBackfillResultVisual.preliminary.message));
|
||||
});
|
||||
|
||||
test('test sherlock status 1 in tooltip on alerts', async () => {
|
||||
test('Sherlock status 1 in tooltip on alerts', async () => {
|
||||
const alert = testAlertSummaries[0].alerts[3];
|
||||
alert.backfill_record.status =
|
||||
alertBackfillResultStatusMap.readyForProcessing;
|
||||
expect(alert.id).toEqual(69347);
|
||||
expect(alert.id).toBe(69347);
|
||||
|
||||
const { getByTestId, getByText } = alertsViewControls();
|
||||
// hovering over the Sherlock icon should display the tooltip
|
||||
|
@ -886,10 +886,10 @@ test('test sherlock status 1 in tooltip on alerts', async () => {
|
|||
);
|
||||
});
|
||||
|
||||
test('test sherlock status 2 in tooltip on alerts', async () => {
|
||||
test('Sherlock status 2 in tooltip on alerts', async () => {
|
||||
const alert = testAlertSummaries[0].alerts[3];
|
||||
alert.backfill_record.status = alertBackfillResultStatusMap.backfilled;
|
||||
expect(alert.id).toEqual(69347);
|
||||
expect(alert.id).toBe(69347);
|
||||
|
||||
const { getByTestId, getByText } = alertsViewControls();
|
||||
// hovering over the Sherlock icon should display the tooltip
|
||||
|
@ -900,10 +900,10 @@ test('test sherlock status 2 in tooltip on alerts', async () => {
|
|||
await waitFor(() => getByText(alertBackfillResultVisual.backfilled.message));
|
||||
});
|
||||
|
||||
test('test sherlock status 3 in tooltip on alerts', async () => {
|
||||
test('Sherlock status 3 in tooltip on alerts', async () => {
|
||||
const alert = testAlertSummaries[0].alerts[3];
|
||||
alert.backfill_record.status = alertBackfillResultStatusMap.successful;
|
||||
expect(alert.id).toEqual(69347);
|
||||
expect(alert.id).toBe(69347);
|
||||
|
||||
const { getByTestId, getByText } = alertsViewControls();
|
||||
// hovering over the Sherlock icon should display the tooltip
|
||||
|
@ -914,10 +914,10 @@ test('test sherlock status 3 in tooltip on alerts', async () => {
|
|||
await waitFor(() => getByText(alertBackfillResultVisual.successful.message));
|
||||
});
|
||||
|
||||
test('test sherlock status 4 in tooltip on alerts', async () => {
|
||||
test('Sherlock status 4 in tooltip on alerts', async () => {
|
||||
const alert = testAlertSummaries[0].alerts[3];
|
||||
alert.backfill_record.status = alertBackfillResultStatusMap.failed;
|
||||
expect(alert.id).toEqual(69347);
|
||||
expect(alert.id).toBe(69347);
|
||||
|
||||
const { getByTestId, getByText } = alertsViewControls();
|
||||
// hovering over the Sherlock icon should display the tooltip
|
||||
|
|
|
@ -661,7 +661,7 @@ test(`table data can be sorted in ascending order by 'Confidence'`, async () =>
|
|||
expect(compareTableRows[2]).toContainElement(result3);
|
||||
});
|
||||
|
||||
test('test data can be sorted only by one column', async () => {
|
||||
test('Data can be sorted only by one column', async () => {
|
||||
const { getAllByLabelText, getByText, getByTitle } = compareTableControls();
|
||||
|
||||
let compareTableRows = await waitFor(() =>
|
||||
|
@ -710,7 +710,7 @@ test(`table data sorted by 'Magnitude of Difference' has data with invalid magni
|
|||
const result2 = await waitFor(() => getByText(result[1].name));
|
||||
const result3 = await waitFor(() => getByText(result[2].name));
|
||||
|
||||
expect(result[2].magnitude).toBe(NaN);
|
||||
expect(result[2].magnitude).toBeNaN();
|
||||
expect(compareTableRows[0]).toContainElement(result1);
|
||||
expect(compareTableRows[1]).toContainElement(result2);
|
||||
expect(compareTableRows[2]).toContainElement(result3);
|
||||
|
@ -756,8 +756,8 @@ test(`table data sorted by 'Delta' has data with invalid delta at the end`, asyn
|
|||
const result2 = await waitFor(() => getByText(result[1].name));
|
||||
const result3 = await waitFor(() => getByText(result[2].name));
|
||||
|
||||
expect(result[2].delta).toBe(NaN);
|
||||
expect(result[2].deltaPercentage).toBe(NaN);
|
||||
expect(result[2].delta).toBeNaN();
|
||||
expect(result[2].deltaPercentage).toBeNaN();
|
||||
expect(compareTableRows[0]).toContainElement(result1);
|
||||
expect(compareTableRows[1]).toContainElement(result2);
|
||||
expect(compareTableRows[2]).toContainElement(result3);
|
||||
|
@ -799,7 +799,7 @@ test(`table data sorted by 'Confidence' has data with invalid confidence at the
|
|||
const result2 = await waitFor(() => getByText(result[1].name));
|
||||
const result3 = await waitFor(() => getByText(result[2].name));
|
||||
|
||||
expect(result[2].confidence).toBe(NaN);
|
||||
expect(result[2].confidence).toBeNaN();
|
||||
expect(compareTableRows[0]).toContainElement(result1);
|
||||
expect(compareTableRows[1]).toContainElement(result2);
|
||||
expect(compareTableRows[2]).toContainElement(result3);
|
||||
|
@ -868,6 +868,6 @@ test('Click on download button starts JSON file download', async () => {
|
|||
},
|
||||
});
|
||||
|
||||
expect(downloadButton.download).toEqual('test.json');
|
||||
expect(downloadButton.href).toEqual(`data:text/json;charset=utf-8, ${file}`);
|
||||
expect(downloadButton.download).toBe('test.json');
|
||||
expect(downloadButton.href).toBe(`data:text/json;charset=utf-8, ${file}`);
|
||||
});
|
||||
|
|
|
@ -11,14 +11,14 @@ test('Passing undefined to the Perfdocs constructor does not result in exception
|
|||
const title = undefined;
|
||||
|
||||
const perfdocs = new Perfdocs(framework, suite, platform, title);
|
||||
expect(perfdocs.documentationURL).toEqual(
|
||||
expect(perfdocs.documentationURL).toBe(
|
||||
'https://firefox-source-docs.mozilla.org/testing/perfdocs/',
|
||||
);
|
||||
expect(perfdocs.framework).toEqual('');
|
||||
expect(perfdocs.suite).toEqual('');
|
||||
expect(perfdocs.platform).toEqual('');
|
||||
expect(perfdocs.title).toEqual('');
|
||||
expect(perfdocs.remainingName).toEqual('');
|
||||
expect(perfdocs.framework).toBe('');
|
||||
expect(perfdocs.suite).toBe('');
|
||||
expect(perfdocs.platform).toBe('');
|
||||
expect(perfdocs.title).toBe('');
|
||||
expect(perfdocs.remainingName).toBe('');
|
||||
expect(perfdocs.hasDocumentation()).toBeFalsy();
|
||||
});
|
||||
|
||||
|
@ -29,14 +29,14 @@ test('Passing null to the Perfdocs constructor does not result in exception', ()
|
|||
const title = null;
|
||||
|
||||
const perfdocs = new Perfdocs(framework, suite, platform, title);
|
||||
expect(perfdocs.documentationURL).toEqual(
|
||||
expect(perfdocs.documentationURL).toBe(
|
||||
'https://firefox-source-docs.mozilla.org/testing/perfdocs/',
|
||||
);
|
||||
expect(perfdocs.framework).toEqual('');
|
||||
expect(perfdocs.suite).toEqual('');
|
||||
expect(perfdocs.platform).toEqual('');
|
||||
expect(perfdocs.title).toEqual('');
|
||||
expect(perfdocs.remainingName).toEqual('');
|
||||
expect(perfdocs.framework).toBe('');
|
||||
expect(perfdocs.suite).toBe('');
|
||||
expect(perfdocs.platform).toBe('');
|
||||
expect(perfdocs.title).toBe('');
|
||||
expect(perfdocs.remainingName).toBe('');
|
||||
expect(perfdocs.hasDocumentation()).toBeFalsy();
|
||||
});
|
||||
|
||||
|
@ -45,7 +45,7 @@ test('If the framework is unknown the documentation url resulted is a general on
|
|||
const suite = 'someSuite';
|
||||
|
||||
const perfdocs = new Perfdocs(framework, suite);
|
||||
expect(perfdocs.documentationURL).toEqual(
|
||||
expect(perfdocs.documentationURL).toBe(
|
||||
'https://firefox-source-docs.mozilla.org/testing/perfdocs/',
|
||||
);
|
||||
});
|
||||
|
@ -56,7 +56,7 @@ test('For framework browsertime the documentation url is correct', () => {
|
|||
const platform = 'android';
|
||||
|
||||
const perfdocs = new Perfdocs(framework, suite, platform);
|
||||
expect(perfdocs.documentationURL).toEqual(
|
||||
expect(perfdocs.documentationURL).toBe(
|
||||
'https://firefox-source-docs.mozilla.org/testing/perfdocs/raptor.html#web-de-m',
|
||||
);
|
||||
});
|
||||
|
@ -66,7 +66,7 @@ test('For framework devtools the documentation url is correct', () => {
|
|||
const suite = 'damp';
|
||||
|
||||
const perfdocs = new Perfdocs(framework, suite);
|
||||
expect(perfdocs.documentationURL).toEqual(
|
||||
expect(perfdocs.documentationURL).toBe(
|
||||
'https://firefox-source-docs.mozilla.org/devtools/tests/performance-tests-overview.html#damp',
|
||||
);
|
||||
});
|
||||
|
|
|
@ -58,7 +58,7 @@ const testsTable = (data, projectsMap = false, platformsMap = false) =>
|
|||
|
||||
afterEach(cleanup);
|
||||
|
||||
test('Tests table with no data displays appropriate message', async () => {
|
||||
test('Table with no data displays appropriate message', async () => {
|
||||
const { getByText } = testsTable();
|
||||
|
||||
const message = await waitFor(() => getByText(noResultsMessage));
|
||||
|
@ -66,7 +66,7 @@ test('Tests table with no data displays appropriate message', async () => {
|
|||
expect(message).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('Tests table should show data', async () => {
|
||||
test('Table should show data', async () => {
|
||||
const { getByText } = testsTable(results, projectsMap, platformsMap);
|
||||
|
||||
const result1 = await waitFor(() => getByText(results[0].test));
|
||||
|
@ -98,7 +98,7 @@ test('Clicking on platform icon displays the list of platforms', async () => {
|
|||
expect(platformList.children[1]).toHaveTextContent('platform1');
|
||||
});
|
||||
|
||||
test('Test alerts from Alerts column are split into improvements and regressions', async () => {
|
||||
test('Alerts from Alerts column are split into improvements and regressions', async () => {
|
||||
const { getAllByTestId } = testsTable(results, projectsMap, platformsMap);
|
||||
|
||||
const improvements = await waitFor(() => getAllByTestId('improvements'));
|
||||
|
|
|
@ -53,7 +53,7 @@ describe('My Pushes', () => {
|
|||
const { queryByText } = render(testMyPushes({ isLoggedIn: false }));
|
||||
|
||||
// verify no author query param exists
|
||||
expect(history.location.search).toEqual('');
|
||||
expect(history.location.search).toBe('');
|
||||
|
||||
await waitFor(() =>
|
||||
expect(queryByText(myPushesDefaultMessage)).toBeInTheDocument(),
|
||||
|
|
|
@ -89,7 +89,7 @@ describe('FailureSummaryTab', () => {
|
|||
await waitFor(() => screen.getByText('Hide bug suggestions'));
|
||||
const duplicateSummary = await findByText('1725755');
|
||||
const openBugPart = duplicateSummary.nextSibling;
|
||||
expect(openBugPart.textContent).toEqual(' >1725749');
|
||||
expect(openBugPart.textContent).toBe(' >1725749');
|
||||
});
|
||||
|
||||
test('suggested non-duplicate bugs should not mention other bug like duplicates do', async () => {
|
||||
|
@ -100,7 +100,7 @@ describe('FailureSummaryTab', () => {
|
|||
await waitFor(() => screen.getByText('Hide bug suggestions'));
|
||||
const duplicateSummary = await findByText('1725755');
|
||||
const openBugPart = duplicateSummary.nextSibling;
|
||||
expect(openBugPart.textContent).toEqual(' >1725749');
|
||||
expect(openBugPart.textContent).toBe(' >1725749');
|
||||
});
|
||||
|
||||
test('classification with match to duplicate bug should put open bug into pinboard', async () => {
|
||||
|
@ -112,7 +112,7 @@ describe('FailureSummaryTab', () => {
|
|||
const duplicateSummary = await findByText('1725755');
|
||||
fireEvent.click(duplicateSummary.previousSibling);
|
||||
await waitFor(() => screen.getByTestId('pinboard-bug-1725749'));
|
||||
expect(screen.getByTestId('pinboard-bug-1725749').textContent).toEqual(
|
||||
expect(screen.getByTestId('pinboard-bug-1725749').textContent).toBe(
|
||||
'1725749',
|
||||
);
|
||||
});
|
||||
|
|
114
yarn.lock
114
yarn.lock
|
@ -2229,11 +2229,6 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"
|
||||
integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==
|
||||
|
||||
"@types/json-schema@^7.0.3":
|
||||
version "7.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d"
|
||||
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
|
||||
|
||||
"@types/json5@^0.0.29":
|
||||
version "0.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
|
||||
|
@ -2305,6 +2300,11 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
|
||||
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==
|
||||
|
||||
"@types/semver@^7.3.12":
|
||||
version "7.3.12"
|
||||
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.12.tgz#920447fdd78d76b19de0438b7f60df3c4a80bf1c"
|
||||
integrity sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==
|
||||
|
||||
"@types/serve-index@^1.9.1":
|
||||
version "1.9.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278"
|
||||
|
@ -2382,28 +2382,53 @@
|
|||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@typescript-eslint/experimental-utils@^2.5.0":
|
||||
version "2.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz#d3524b644cdb40eebceca67f8cf3e4cc9c8f980f"
|
||||
integrity sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==
|
||||
"@typescript-eslint/scope-manager@5.40.1":
|
||||
version "5.40.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.40.1.tgz#a7a5197dfd234622a2421ea590ee0ccc02e18dfe"
|
||||
integrity sha512-jkn4xsJiUQucI16OLCXrLRXDZ3afKhOIqXs4R3O+M00hdQLKR58WuyXPZZjhKLFCEP2g+TXdBRtLQ33UfAdRUg==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.3"
|
||||
"@typescript-eslint/typescript-estree" "2.34.0"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
"@typescript-eslint/types" "5.40.1"
|
||||
"@typescript-eslint/visitor-keys" "5.40.1"
|
||||
|
||||
"@typescript-eslint/typescript-estree@2.34.0":
|
||||
version "2.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5"
|
||||
integrity sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==
|
||||
"@typescript-eslint/types@5.40.1":
|
||||
version "5.40.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.40.1.tgz#de37f4f64de731ee454bb2085d71030aa832f749"
|
||||
integrity sha512-Icg9kiuVJSwdzSQvtdGspOlWNjVDnF3qVIKXdJ103o36yRprdl3Ge5cABQx+csx960nuMF21v8qvO31v9t3OHw==
|
||||
|
||||
"@typescript-eslint/typescript-estree@5.40.1":
|
||||
version "5.40.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.40.1.tgz#9a7d25492f02c69882ce5e0cd1857b0c55645d72"
|
||||
integrity sha512-5QTP/nW5+60jBcEPfXy/EZL01qrl9GZtbgDZtDPlfW5zj/zjNrdI2B5zMUHmOsfvOr2cWqwVdWjobCiHcedmQA==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
glob "^7.1.6"
|
||||
is-glob "^4.0.1"
|
||||
lodash "^4.17.15"
|
||||
semver "^7.3.2"
|
||||
tsutils "^3.17.1"
|
||||
"@typescript-eslint/types" "5.40.1"
|
||||
"@typescript-eslint/visitor-keys" "5.40.1"
|
||||
debug "^4.3.4"
|
||||
globby "^11.1.0"
|
||||
is-glob "^4.0.3"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/utils@^5.10.0":
|
||||
version "5.40.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.40.1.tgz#3204fb73a559d3b7bab7dc9d3c44487c2734a9ca"
|
||||
integrity sha512-a2TAVScoX9fjryNrW6BZRnreDUszxqm9eQ9Esv8n5nXApMW0zeANUYlwh/DED04SC/ifuBvXgZpIK5xeJHQ3aw==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.9"
|
||||
"@types/semver" "^7.3.12"
|
||||
"@typescript-eslint/scope-manager" "5.40.1"
|
||||
"@typescript-eslint/types" "5.40.1"
|
||||
"@typescript-eslint/typescript-estree" "5.40.1"
|
||||
eslint-scope "^5.1.1"
|
||||
eslint-utils "^3.0.0"
|
||||
semver "^7.3.7"
|
||||
|
||||
"@typescript-eslint/visitor-keys@5.40.1":
|
||||
version "5.40.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.40.1.tgz#f3d2bf5af192f4432b84cec6fdcb387193518754"
|
||||
integrity sha512-A2DGmeZ+FMja0geX5rww+DpvILpwo1OsiQs0M+joPWJYsiEFBLsH0y1oFymPNul6Z5okSmHpP4ivkc2N0Cgfkw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.40.1"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@webassemblyjs/ast@1.11.1":
|
||||
version "1.11.1"
|
||||
|
@ -3984,7 +4009,7 @@ debug@^3.1.0, debug@^3.2.7:
|
|||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
debug@^4.3.2:
|
||||
debug@^4.3.2, debug@^4.3.4:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||
|
@ -4577,12 +4602,12 @@ eslint-plugin-import@2.26.0:
|
|||
resolve "^1.22.0"
|
||||
tsconfig-paths "^3.14.1"
|
||||
|
||||
eslint-plugin-jest@23.1.1:
|
||||
version "23.1.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.1.1.tgz#1220ab53d5a4bf5c3c4cd07c0dabc6199d4064dd"
|
||||
integrity sha512-2oPxHKNh4j1zmJ6GaCBuGcb8FVZU7YjFUOJzGOPnl9ic7VA/MGAskArLJiRIlnFUmi1EUxY+UiATAy8dv8s5JA==
|
||||
eslint-plugin-jest@27.1.3:
|
||||
version "27.1.3"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.1.3.tgz#9f359eeac0c720a825f658e7e261a9eef869dc8d"
|
||||
integrity sha512-7DrIfYRQPa7JQd1Le8G/BJsfYHVUKQdJQ/6vULSp/4NjKZmSMJ/605G2hhScEra++SiH68zPEjLnrO74nHrMLg==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "^2.5.0"
|
||||
"@typescript-eslint/utils" "^5.10.0"
|
||||
|
||||
eslint-plugin-jsx-a11y@6.2.3:
|
||||
version "6.2.3"
|
||||
|
@ -4621,7 +4646,7 @@ eslint-plugin-react@7.16.0:
|
|||
prop-types "^15.7.2"
|
||||
resolve "^1.12.0"
|
||||
|
||||
eslint-scope@5.1.1, eslint-scope@^5.0.0, eslint-scope@^5.1.1:
|
||||
eslint-scope@5.1.1, eslint-scope@^5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
|
||||
integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
|
||||
|
@ -4637,13 +4662,6 @@ eslint-scope@^7.1.1:
|
|||
esrecurse "^4.3.0"
|
||||
estraverse "^5.2.0"
|
||||
|
||||
eslint-utils@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
|
||||
integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
|
||||
dependencies:
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
eslint-utils@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672"
|
||||
|
@ -4651,7 +4669,7 @@ eslint-utils@^3.0.0:
|
|||
dependencies:
|
||||
eslint-visitor-keys "^2.0.0"
|
||||
|
||||
eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
|
||||
eslint-visitor-keys@^1.0.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
|
||||
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
|
||||
|
@ -5320,7 +5338,7 @@ glob-to-regexp@^0.4.0, glob-to-regexp@^0.4.1:
|
|||
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
|
||||
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
|
||||
|
||||
glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
|
||||
glob@^7.0.3, glob@^7.1.3, glob@^7.1.4:
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023"
|
||||
integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==
|
||||
|
@ -9031,13 +9049,6 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0:
|
|||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
||||
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||
|
||||
semver@^7.3.2:
|
||||
version "7.3.5"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
|
||||
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
|
||||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
semver@^7.3.5:
|
||||
version "7.3.7"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
|
||||
|
@ -9045,6 +9056,13 @@ semver@^7.3.5:
|
|||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
semver@^7.3.7:
|
||||
version "7.3.8"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
|
||||
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
|
||||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
send@0.17.1:
|
||||
version "0.17.1"
|
||||
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
|
||||
|
@ -9773,7 +9791,7 @@ tslib@~2.1.0:
|
|||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
|
||||
integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==
|
||||
|
||||
tsutils@^3.17.1:
|
||||
tsutils@^3.21.0:
|
||||
version "3.21.0"
|
||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
|
||||
integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
|
||||
|
|
Загрузка…
Ссылка в новой задаче