-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into issue-#1448
- Loading branch information
Showing
41 changed files
with
482 additions
and
54 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
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,34 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
build: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: actions/cache@v4 | ||
id: yarn-cache | ||
with: | ||
path: | | ||
**/node_modules | ||
${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Lint | ||
run: yarn lint |
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,63 @@ | ||
name: Update Browserslist DB | ||
on: | ||
schedule: | ||
- cron: '0 0 * * 0' # Runs every week at 00:00 on Sunday | ||
workflow_dispatch: # Allows manual triggering of the workflow | ||
jobs: | ||
update-browserslist-db: | ||
name: 'Run Browserlist update' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
repository-projects: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Update Browserslist DB | ||
id: update-browserslist-db | ||
run: | | ||
OUTPUT=$(yarn update-browserslist) | ||
CLEAN_OUTPUT=$(echo "$OUTPUT" | sed 's/\x1b\[[0-9;]*m//g') | ||
{ | ||
echo 'update_output<<EOF' | ||
echo "$CLEAN_OUTPUT" | ||
echo EOF | ||
} >> "$GITHUB_OUTPUT" | ||
LATEST_VERSION=$(yarn info caniuse-lite version | sed -n '2p' | sed 's/\x1b\[[0-9;]*m//g') | ||
echo "latest_version=$LATEST_VERSION" >> "$GITHUB_OUTPUT" | ||
- name: Import GPG key | ||
id: import-gpg | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
env: | ||
HUSKY: '0' | ||
with: | ||
token: ${{ secrets.PR_OPEN_KEY }} | ||
committer: ${{ steps.import-gpg.outputs.name }} <${{ steps.import-gpg.outputs.email }}> | ||
author: ${{ steps.import-gpg.outputs.name }} <${{ steps.import-gpg.outputs.email }}> | ||
commit-message: '[CI] Update browserslist DB to ${{ steps.update-browserslist-db.outputs.latest_version }}' | ||
title: 'Bump browserslist DB to ${{ steps.update-browserslist-db.outputs.latest_version }}' | ||
body: | | ||
Bumps caniuse-lite to ${{ steps.update-browserslist-db.outputs.latest_version }}. | ||
Update output: | ||
${{ steps.update-browserslist-db.outputs.update_output }} | ||
labels: 'dependencies' | ||
branch: 'update-browserslist-db/${{ steps.update-browserslist-db.outputs.latest_version }}' | ||
delete-branch: true | ||
base: 'main' |
Binary file modified
BIN
+7.42 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
-7.54 KB
(86%)
e2e/screenshots/simulator/recurring/Recurring_limit_range/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
+848 Bytes
(100%)
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
+4 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
+0 Bytes
(100%)
e2e/screenshots/strategy/disposable/Disposable_buy_range/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
-1.42 KB
(97%)
e2e/screenshots/strategy/disposable/Disposable_buy_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
+148 Bytes
(100%)
e2e/screenshots/strategy/disposable/Disposable_sell_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
+1 Byte
(100%)
e2e/screenshots/strategy/overlapping/Overlapping/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
+3 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring_limit_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
-615 Bytes
(99%)
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
+1.36 KB
(100%)
e2e/screenshots/strategy/recurring/Recurring_limit_limit/duplicate/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
-396 Bytes
(99%)
e2e/screenshots/strategy/recurring/Recurring_limit_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
+494 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring_limit_limit/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
+705 Bytes
(100%)
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
+1.3 KB
(100%)
e2e/screenshots/strategy/recurring/Recurring_limit_range/duplicate/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
-388 Bytes
(99%)
e2e/screenshots/strategy/recurring/Recurring_limit_range/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
+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
+1.31 KB
(100%)
e2e/screenshots/strategy/recurring/Recurring_limit_range/undercut/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
-901 Bytes
(98%)
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
+1.29 KB
(100%)
e2e/screenshots/strategy/recurring/Recurring_range_limit/duplicate/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.29 KB
(100%)
e2e/screenshots/strategy/recurring/Recurring_range_limit/undercut/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
+863 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.
Binary file modified
BIN
-132 Bytes
(100%)
e2e/screenshots/strategy/recurring/Recurring_range_range/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.
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 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
111 changes: 111 additions & 0 deletions
111
src/libs/testing-library/drivers/EditStrategyDriver.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,111 @@ | ||
import { | ||
Screen, | ||
waitForElementToBeRemoved, | ||
within, | ||
} from '@testing-library/dom'; | ||
|
||
export class EditStrategyDriver { | ||
constructor(private screen: Screen) {} | ||
|
||
async findForm() { | ||
return this.screen.findByTestId('edit-form'); | ||
} | ||
|
||
async findDisposableForm() { | ||
const form = await this.findForm(); | ||
return { | ||
element: form, | ||
min: () => within(form).getByTestId('input-min'), | ||
max: () => within(form).getByTestId('input-max'), | ||
price: () => within(form).getByTestId('input-price'), | ||
tabSell: () => within(form).getByTestId('tab-sell'), | ||
tabBuy: () => within(form).getByTestId('tab-buy'), | ||
limit: () => within(form).getByTestId('tab-limit'), | ||
range: () => within(form).getByTestId('tab-range'), | ||
budget: () => within(form).getByTestId('input-budget'), | ||
marketPriceIndicators: () => | ||
within(form).queryAllByTestId('market-price-indication'), | ||
approveWarnings: () => within(form).queryByTestId('approve-warnings'), | ||
submit: () => within(form).getByTestId('edit-submit'), | ||
}; | ||
} | ||
|
||
async findRecurringForm() { | ||
const form = await this.findForm(); | ||
const buySection = within(form).getByTestId('buy-section'); | ||
const sellSection = within(form).getByTestId('sell-section'); | ||
return { | ||
element: form, | ||
buy: { | ||
min: () => within(buySection).getByTestId('input-min'), | ||
max: () => within(buySection).getByTestId('input-max'), | ||
price: () => within(buySection).getByTestId('input-price'), | ||
limit: () => within(buySection).getByTestId('tab-limit'), | ||
range: () => within(buySection).getByTestId('tab-range'), | ||
budget: () => within(buySection).getByTestId('input-budget'), | ||
marketPriceIndicators: () => | ||
within(buySection).queryAllByTestId('market-price-indication'), | ||
}, | ||
sell: { | ||
min: () => within(sellSection).getByTestId('input-min'), | ||
max: () => within(sellSection).getByTestId('input-max'), | ||
price: () => within(sellSection).getByTestId('input-price'), | ||
limit: () => within(sellSection).getByTestId('tab-limit'), | ||
range: () => within(sellSection).getByTestId('tab-range'), | ||
budget: () => within(sellSection).getByTestId('input-budget'), | ||
marketPriceIndicators: () => | ||
within(sellSection).queryAllByTestId('market-price-indication'), | ||
}, | ||
approveWarnings: () => within(form).queryByTestId('approve-warnings'), | ||
submit: () => within(form).getByTestId('edit-submit'), | ||
}; | ||
} | ||
|
||
async findOverlappingForm() { | ||
const form = await this.findForm(); | ||
return { | ||
element: form, | ||
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).queryAllByTestId('market-price-indication'), | ||
approveWarnings: () => within(form).queryByTestId('approve-warnings'), | ||
submit: () => within(form).getByTestId('edit-submit'), | ||
}; | ||
} | ||
|
||
async findUserPriceForm() { | ||
return this.screen.findByTestId('user-price-form'); | ||
} | ||
|
||
async findEditMarketPrice() { | ||
return this.screen.findByTestId('edit-market-price'); | ||
} | ||
|
||
async findUserPriceInput() { | ||
const priceForm = await this.findUserPriceForm(); | ||
return { | ||
editPrice: () => within(priceForm).getByTestId('input-price'), | ||
approveWarning: () => | ||
within(priceForm).getByTestId('approve-price-warnings'), | ||
confirm: () => within(priceForm).getByTestId('set-overlapping-price'), | ||
}; | ||
} | ||
|
||
waitForLoading(parent: HTMLElement) { | ||
const loadings = parent.querySelectorAll('.loading-message'); | ||
const waitForAll = Array.from(loadings).map((loading) => { | ||
return waitForElementToBeRemoved(() => loading); | ||
}); | ||
return Promise.all(waitForAll); | ||
} | ||
} |
Oops, something went wrong.