-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1334 from bancorprotocol/add-overlapping-tests
Add create overlapping integration tests
- Loading branch information
Showing
37 changed files
with
995 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ name: Build | |
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
push: | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ name: Test | |
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
push: | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+11.4 KB
(120%)
e2e/screenshots/simulator/recurring/Recurring limit limit/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2 Bytes
(100%)
...screenshots/simulator/recurring/Recurring limit limit/simulator-input-price.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4 Bytes
(100%)
...shots/simulator/recurring/Recurring range range/simulator-results-animation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-499 Bytes
(99%)
e2e/screenshots/strategy/disposable/Disposable buy limit/create/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.56 KB
(110%)
e2e/screenshots/strategy/disposable/Disposable buy limit/deposit/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2 Bytes
(100%)
e2e/screenshots/strategy/disposable/Disposable buy range/create/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4 Bytes
(100%)
e2e/screenshots/strategy/disposable/Disposable sell limit/editPrices/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+611 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring limit limit/deposit/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring limit limit/withdraw/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring limit range/create/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-911 Bytes
(98%)
e2e/screenshots/strategy/recurring/Recurring limit range/deposit/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring limit range/renew/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring range limit/create/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+25 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring range limit/create/my-strategy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-689 Bytes
(99%)
e2e/screenshots/strategy/recurring/Recurring range limit/deposit/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring range range/create/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/libs/testing-library/drivers/CreateOverlappingDriver.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { Screen, within } from '@testing-library/dom'; | ||
|
||
export class CreateOverlappingDriver { | ||
constructor(private screen: Screen) {} | ||
|
||
getStrategyChart() { | ||
return { | ||
closeChart: () => this.screen.getByTestId('close-chart'), | ||
openChart: () => this.screen.getByTestId('open-chart'), | ||
chart: () => this.screen.queryByTestId('strategy-chart'), | ||
}; | ||
} | ||
|
||
getOverlappingForm() { | ||
return this.screen.getByTestId('create-strategy-form'); | ||
} | ||
|
||
getOverlappingInput() { | ||
const form = this.getOverlappingForm(); | ||
return { | ||
min: () => within(form).getByTestId('input-min'), | ||
max: () => within(form).getByTestId('input-max'), | ||
spread: { | ||
input: () => within(form).getByTestId('spread-input'), | ||
default: () => within(form).getByTestId('spread-0.05'), | ||
option: (value: string) => within(form).getByTestId(`spread-${value}`), | ||
}, | ||
anchorRequired: () => within(form).queryByTestId('require-anchor'), | ||
anchor: (anchor: 'buy' | 'sell') => | ||
within(form).getByTestId(`anchor-${anchor}`), | ||
budget: () => within(form).getByTestId('input-budget'), | ||
marketPriceIndicators: () => | ||
within(form).getAllByTestId('market-price-indication'), | ||
approveWarnings: () => within(form).queryByTestId('approve-warnings'), | ||
}; | ||
} | ||
|
||
getUserPriceForm() { | ||
return this.screen.getByTestId('user-price-form'); | ||
} | ||
|
||
getUserPriceInput() { | ||
return { | ||
open: () => this.screen.getByTestId('edit-market-price'), | ||
editPrice: () => | ||
within(this.getUserPriceForm()).getByTestId('input-price'), | ||
approveWarning: () => | ||
within(this.getUserPriceForm()).getByTestId('approve-price-warnings'), | ||
confirm: () => | ||
within(this.getUserPriceForm()).getByTestId('set-overlapping-price'), | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { CreateOverlappingDriver } from './CreateOverlappingDriver'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export { | ||
marketRateHandler, | ||
tokenListHandlers, | ||
MockServer, | ||
tokens, | ||
} from './mock'; | ||
export { loadRouter } from './routing'; | ||
export { type RouterRenderParams } from './types'; |
Oops, something went wrong.