Skip to content

Commit

Permalink
Add automated regression tests (#4309)
Browse files Browse the repository at this point in the history
* refactor e2e tests

* add regression test: 5.1: Search
  • Loading branch information
beyang committed Jun 11, 2019
1 parent 0a47dd5 commit f2365a5
Show file tree
Hide file tree
Showing 7 changed files with 697 additions and 401 deletions.
2 changes: 1 addition & 1 deletion shared/src/components/ResultContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class ResultContainer extends React.PureComponent<Props, State> {
const Icon = this.props.icon
const stringIcon = this.props.stringIcon ? this.props.stringIcon : undefined
return (
<div className="result-container" data-testid="result-container">
<div className="e2e-search-result result-container" data-testid="result-container">
<div
className={
'result-container__header' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`<HierarchicalLocationsView /> displays a single location when complete
partialVisibility={true}
>
<div
className="result-container"
className="e2e-search-result result-container"
data-testid="result-container"
>
<div
Expand Down Expand Up @@ -225,7 +225,7 @@ exports[`<HierarchicalLocationsView /> displays multiple locations grouped by fi
partialVisibility={true}
>
<div
className="result-container"
className="e2e-search-result result-container"
data-testid="result-container"
>
<div
Expand Down Expand Up @@ -393,7 +393,7 @@ exports[`<HierarchicalLocationsView /> displays partial locations before complet
partialVisibility={true}
>
<div
className="result-container"
className="e2e-search-result result-container"
data-testid="result-container"
>
<div
Expand Down
3 changes: 2 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"license": "MIT",
"scripts": {
"test": "jest --testPathIgnorePatterns e2e",
"test-e2e": "jest --coverage=false --runInBand e2e",
"test-e2e": "jest --coverage=false --runInBand index.e2e chrome.e2e",
"test-regression": "jest --coverage=false --runInBand regression",
"test-e2e-sgdev": "env SOURCEGRAPH_BASE_URL=https://sourcegraph.sgdev.org OVERRIDE_AUTH_SECRET=${SGDEV_OVERRIDE_AUTH_SECRET} jest --coverage=false e2e",
"build": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" gulp build",
"watch": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" gulp watch",
Expand Down
Loading

0 comments on commit f2365a5

Please sign in to comment.