Skip to content

Commit

Permalink
Update dependencies | linter fixes (#461)
Browse files Browse the repository at this point in the history
* Update dependencies | linter fixes

* Downgrade cfpb-expandables

* Build assets
  • Loading branch information
anselmbradford authored Aug 8, 2023
1 parent 1219665 commit 7bda7e7
Show file tree
Hide file tree
Showing 40 changed files with 61 additions and 282 deletions.
15 changes: 10 additions & 5 deletions cypress/e2e/common/filters.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ describe('Filter Panel', () => {
cy.get('.date-filter button.a-btn__link:first').click({ force: true });
cy.log('apply dates');

cy.get('#date_received-from').clear().type('2015-09-11').blur();
cy.get('#date_received-from').clear();
cy.get('#date_received-from').type('2015-09-11');
cy.get('#date_received-from').blur();

cy.wait('@getComplaintsDateFrom');

cy.url().should('include', 'date_received_min=2015-09-11');

cy.log('apply a through date');

cy.get('#date_received-through').clear().type('2020-10-31').blur();
cy.get('#date_received-through').clear();
cy.get('#date_received-through').type('2020-10-31');
cy.get('#date_received-through').blur();

cy.url().should('include', 'date_received_max=2020-10-31');

Expand Down Expand Up @@ -237,9 +241,10 @@ describe('Filter Panel', () => {
cy.log('open again');
cy.get('.state .o-expandable_link').click();
cy.log('searches a typeahead filter');
cy.findByPlaceholderText('Enter state name or abbreviation')
.clear()
.type('texas');
cy.findByPlaceholderText('Enter state name or abbreviation').clear();
cy.findByPlaceholderText('Enter state name or abbreviation').type(
'texas'
);

cy.get('.state .typeahead-selector').should('exist');

Expand Down
9 changes: 4 additions & 5 deletions cypress/e2e/common/search-bar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ describe('Search Bar', () => {
describe('Typeaheads', () => {
it('has no typeahead functionality in All Data', () => {
cy.intercept(typeAheadRequest, { body: [] }).as('typeahead');
cy.findByPlaceholderText('Enter your search term(s)')
.clear()
.type('bank', {
delay: 200,
});
cy.findByPlaceholderText('Enter your search term(s)').clear();
cy.findByPlaceholderText('Enter your search term(s)').type('bank', {
delay: 200,
});
cy.findByText('No matches found.').should('not.exist');
});

Expand Down
15 changes: 9 additions & 6 deletions cypress/e2e/list/list.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,20 @@ describe('List View', () => {
cy.get(filterHasNarrative).should('not.be.checked');

// Click the narrative-only button.
cy.get(addNarrativesButton).click().should('have.class', 'selected');
cy.get(addNarrativesButton).click();
cy.get(addNarrativesButton).should('have.class', 'selected');

cy.get(filterHasNarrative).should('be.checked');

// Click the narrative-only button again. There should be no change.
cy.get(addNarrativesButton)
.click({ force: true })
.should('have.class', 'selected');
cy.get(addNarrativesButton).click({ force: true });
cy.get(addNarrativesButton).should('have.class', 'selected');

cy.get(filterHasNarrative).should('be.checked');

// Click the all results button. The narratives should be removed.
cy.get(removeNarrativesButton).click().should('have.class', 'selected');
cy.get(removeNarrativesButton).click();
cy.get(removeNarrativesButton).should('have.class', 'selected');

cy.get(filterHasNarrative).should('not.be.checked');
});
Expand Down Expand Up @@ -138,7 +139,9 @@ describe('List View', () => {
cy.log('pagination resets after applying date filter');
cy.get(nextButton).click();
cy.get(currentPage).should('have.text', 'Page 2');
cy.get('#date_received-from').clear().type('2018-09-23').blur();
cy.get('#date_received-from').clear();
cy.get('#date_received-from').type('2018-09-23');
cy.get('#date_received-from').blur();
cy.get(currentPage).should('have.text', 'Page 1');
});

Expand Down
6 changes: 3 additions & 3 deletions dist/ccdb5.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ccdb5.css.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/ccdb5.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ccdb5.js.map

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,24 @@
"not ie > 0"
],
"devDependencies": {
"@babel/cli": "^7.18.10",
"@babel/core": "^7.18.10",
"@babel/eslint-parser": "^7.19.1",
"@babel/preset-react": "^7.18.6",
"@babel/runtime": "^7.18.9",
"@cfpb/cfpb-atomic-component": "0.17.9",
"@cfpb/cfpb-buttons": "0.17.9",
"@cfpb/cfpb-core": "0.17.9",
"@cfpb/cfpb-design-system": "^0.17.12",
"@babel/cli": "^7.22.5",
"@babel/core": "^7.22.5",
"@babel/eslint-parser": "^7.22.5",
"@babel/preset-react": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@cfpb/cfpb-atomic-component": "0.27.0",
"@cfpb/cfpb-buttons": "0.27.0",
"@cfpb/cfpb-core": "0.27.0",
"@cfpb/cfpb-design-system": "^0.27.1",
"@cfpb/cfpb-expandables": "^0.17.12",
"@cfpb/cfpb-forms": "0.17.9",
"@cfpb/cfpb-grid": "0.17.9",
"@cfpb/cfpb-icons": "0.17.9",
"@cfpb/cfpb-layout": "0.17.9",
"@cfpb/cfpb-notifications": "0.17.9",
"@cfpb/cfpb-pagination": "0.17.9",
"@cfpb/cfpb-tables": "0.17.9",
"@cfpb/cfpb-typography": "0.17.9",
"@cfpb/cfpb-forms": "0.27.0",
"@cfpb/cfpb-grid": "0.27.0",
"@cfpb/cfpb-icons": "0.27.0",
"@cfpb/cfpb-layout": "0.27.1",
"@cfpb/cfpb-notifications": "0.27.0",
"@cfpb/cfpb-pagination": "0.27.0",
"@cfpb/cfpb-tables": "0.27.0",
"@cfpb/cfpb-typography": "0.27.0",
"@craco/craco": "^6.4.3",
"@reduxjs/toolkit": "^1.8.5",
"@testing-library/cypress": "^8.0.3",
Expand All @@ -67,32 +67,32 @@
"dayjs": "^1.10.7",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-jsdoc": "^39.2.1",
"eslint-plugin-cypress": "^2.13.3",
"eslint-plugin-jsdoc": "^46.2.6",
"eslint-plugin-react-redux": "^4.0.0",
"highcharts": "9.2.2",
"history": "^4.10.1",
"husky": "^8.0.1",
"identity-obj-proxy": "3.0.0",
"intro.js": "^6.0.0",
"intro.js-react": "0.6.0",
"jest": "28.1.3",
"jest-environment-jsdom": "28.1.3",
"jest": "29.5.0",
"jest-environment-jsdom": "29.5.0",
"jest-fetch-mock": "^3.0.3",
"less": "^4.1.3",
"less-plugin-clean-css": "^1.5.1",
"lint-staged": "^13.0.1",
"lint-staged": "^13.2.2",
"lodash": "^4.17.21",
"mini-css-extract-plugin": "^2.6.1",
"mini-css-extract-plugin": "^2.7.6",
"mockdate": "^3.0.5",
"postcss": "^8.4.18",
"postcss": "^8.4.24",
"postcss-less": "^6.0.0",
"postcss-preset-env": "^7.8.2",
"postcss-safe-parser": "^6.0.0",
"prettier": "^2.7.1",
"prettier": "^2.8.8",
"prop-types": "^15.5.10",
"query-string": "^5.0.0",
"react": "^18.2.0",
Expand All @@ -108,7 +108,7 @@
"redux-devtools-extension": "^2.13.2",
"redux-mock-store": "^1.5.4",
"redux-thunk": "^2.2.0",
"release-it": "^15.5.0",
"release-it": "^15.11.0",
"string-replace-loader": "^3.1.0",
"stylelint": "^14.14.0",
"stylelint-config-recommended-less": "^1.0.4"
Expand Down
1 change: 0 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const DetailComponents = () => {
// eslint-disable-next-line react/no-multi-comp
/**
* Main App Component
*
* @returns {JSX.Element} Main app
*/
export const App = () => {
Expand Down
1 change: 0 additions & 1 deletion src/actions/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const Analytics = {

/**
* Get data layer object.
*
* @param {string} action - Name of event.
* @param {string} label - DOM element label.
* @param {string} category - Type of event.
Expand Down
18 changes: 0 additions & 18 deletions src/actions/complaints.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const TRENDS_FAILED = 'TRENDS_FAILED';
// Routing action
/**
* Routes to the correct endpoint based on the state
*
* @returns {Promise} a chain of promises that will update the Redux store
*/
export function sendQuery() {
Expand All @@ -51,7 +50,6 @@ export function sendQuery() {

/**
* Routes to the correct endpoint based on the state
*
* @returns {Promise} a chain of promises that will update the Redux store
*/
export function sendHitsQuery() {
Expand Down Expand Up @@ -80,7 +78,6 @@ export function sendHitsQuery() {

/**
* Calls the aggregations endpoint of the API
*
* @returns {Promise} a chain of promises that will update the Redux store
*/
export function getAggregations() {
Expand All @@ -104,7 +101,6 @@ export function getAggregations() {

/**
* Calls the complaint search endpoint of the API
*
* @returns {Promise} a chain of promises that will update the Redux store
*/
export function getComplaints() {
Expand All @@ -128,7 +124,6 @@ export function getComplaints() {

/**
* Calls the detail endpoint of the API
*
* @param {string} id - the id of the complaint to retrieve
* @returns {Promise} a chain of promises that will update the Redux store
*/
Expand All @@ -145,7 +140,6 @@ export function getComplaintDetail(id) {

/**
* Calls the states endpoint of the API
*
* @returns {Promise} a chain of promises that will update the Redux store
*/
export function getStates() {
Expand All @@ -169,7 +163,6 @@ export function getStates() {

/**
* Calls the trends endpoint of the API
*
* @returns {Promise} a chain of promises that will update the Redux store
*/
export function getTrends() {
Expand Down Expand Up @@ -202,7 +195,6 @@ export function getTrends() {

/**
* Notifies the application that an API call is happening
*
* @param {string} type - action type
* @param {string} url - the url being called
* @returns {string} a packaged payload to be used by Redux reducers
Expand All @@ -216,7 +208,6 @@ export function callingApi(type, url) {

/**
* Creates an action in response to aggregations being received from the API
*
* @param {string} data - the raw data returned from the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand All @@ -229,7 +220,6 @@ export function aggregationsReceived(data) {

/**
* Creates an action in response after aggregation search fails
*
* @param {string} error - the error returned from `fetch`, not the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand All @@ -242,7 +232,6 @@ export function aggregationsFailed(error) {

/**
* Creates an action in response to search results being received from the API
*
* @param {string} data - the raw data returned from the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand All @@ -255,7 +244,6 @@ export function complaintsReceived(data) {

/**
* Creates an action in response after a search fails
*
* @param {string} error - the error returned from `fetch`, not the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand All @@ -268,7 +256,6 @@ export function complaintsFailed(error) {

/**
* Creates an action in response to complaint detail being received from the API
*
* @param {string} data - the raw data returned from the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand All @@ -281,7 +268,6 @@ export function complaintDetailReceived(data) {

/**
* Creates an action in response after a detail search fails
*
* @param {string} error - the error returned from `fetch`, not the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand All @@ -294,7 +280,6 @@ export function complaintDetailFailed(error) {

/**
* Creates an action in response to states results being received from the API
*
* @param {string} data - the raw data returned from the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand All @@ -307,7 +292,6 @@ export function statesReceived(data) {

/**
* Creates an action in response after states results fails
*
* @param {string} error - the error returned from `fetch`, not the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand All @@ -320,7 +304,6 @@ export function statesFailed(error) {

/**
* Creates an action in response to trends results being received from the API
*
* @param {string} data - the raw data returned from the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand All @@ -333,7 +316,6 @@ export function trendsReceived(data) {

/**
* Creates an action in response after trends results fails
*
* @param {string} error - the error returned from `fetch`, not the API
* @returns {string} a packaged payload to be used by Redux reducers
*/
Expand Down
Loading

0 comments on commit 7bda7e7

Please sign in to comment.