Skip to content

Commit

Permalink
eslint
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Reynolds <[email protected]>
  • Loading branch information
gsreynolds committed Dec 6, 2023
1 parent 48a9c24 commit efe665a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
28 changes: 15 additions & 13 deletions cypress/e2e/Settings/settings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,21 @@ describe('Manage Settings', { failFast: { enabled: true } }, () => {
});

// 1 Day is the default
['Today', '1 Day', '3 Days', '1 Week', '2 Weeks', '1 Month', '3 Months', '180 Days'].forEach((tenor) => {
it(`Update default since date lookback to ${tenor}`, () => {
let [sinceDateNum, sinceDateTenor] = tenor.split(' ');
if (tenor === 'Today') {
sinceDateNum = '0';
sinceDateTenor = 'Day';
}
const expectedDate = moment().subtract(Number(sinceDateNum), sinceDateTenor).format('L');
updateDefaultSinceDateLookback(tenor);
updateUserLocale('English (United States)', 'Settings', 'Updated user profile settings');
cy.get('#query-date-input').should('contain', expectedDate);
});
});
['Today', '1 Day', '3 Days', '1 Week', '2 Weeks', '1 Month', '3 Months', '180 Days'].forEach(
(tenor) => {
it(`Update default since date lookback to ${tenor}`, () => {
let [sinceDateNum, sinceDateTenor] = tenor.split(' ');
if (tenor === 'Today') {
sinceDateNum = '0';
sinceDateTenor = 'Day';
}
const expectedDate = moment().subtract(Number(sinceDateNum), sinceDateTenor).format('L');
updateDefaultSinceDateLookback(tenor);
updateUserLocale('English (United States)', 'Settings', 'Updated user profile settings');
cy.get('#query-date-input').should('contain', expectedDate);
});
},
);

it('Update max rate limit', () => {
const maxRateLimit = 600;
Expand Down
5 changes: 4 additions & 1 deletion cypress/e2e/app.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import moment from 'moment/min/moment-with-locales';

import {
acceptDisclaimer, waitForIncidentTable, clearLocalCache, pd,
acceptDisclaimer,
waitForIncidentTable,
clearLocalCache,
pd,
} from '../support/util/common';

import packageConfig from '../../package.json';
Expand Down
4 changes: 3 additions & 1 deletion src/config/column-generator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,9 @@ export const defaultAlertsColumns = () => [
if (value.length > 0) {
return renderLinkCell({
text: value,
href: cell.row.original.alerts?.[0]?.body?.cef_details?.client_url || cell.row.original.html_url,
href:
cell.row.original.alerts?.[0]?.body?.cef_details?.client_url
|| cell.row.original.html_url,
});
}
return renderPlainTextAlertCell({ value, cell });
Expand Down

0 comments on commit efe665a

Please sign in to comment.