Skip to content

Commit

Permalink
Update cypress and fix flaky tests
Browse files Browse the repository at this point in the history
Update cypress version, and add retries for flaky tests. Also add
optional chaining to autocomplete to avoid generating js error messages
when no autocomplete test results are present.
  • Loading branch information
anvit committed Aug 8, 2024
1 parent 3132937 commit bef6a92
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 136 deletions.
1 change: 1 addition & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = defineConfig({
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
retries: {'runMode': 2},
baseUrl: 'http://localhost:63001',
},
})
151 changes: 17 additions & 134 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"css-loader": "^6.3.0",
"cypress": "^13.7.1",
"cypress": "^13.13.0",
"cypress-file-upload": "^5.0.8",
"cypress-wait-until": "^1.7.2",
"expose-loader": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion plugins/arDominionB5Plugin/js/searchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
);
},
searchPost: (response, $element) => {
if (response.length && $element.val().length >= 3) {
if (response?.length && $element?.val().length >= 3) {
$results.html(response);
dropdown.show();
} else {
Expand Down

0 comments on commit bef6a92

Please sign in to comment.