chore(trading): update vega-market-sim to use to 0.74.0-preview.2 (#5603)
This commit is contained in:
parent
c63cba1071
commit
a3c55fd7c3
55
.github/workflows/console-test-run.yml
vendored
55
.github/workflows/console-test-run.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
create-docker-image:
|
||||
name: Create docker image for console-test
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
#----------------------------------------------
|
||||
# check-out frontend-monorepo
|
||||
@ -138,7 +138,7 @@ jobs:
|
||||
name: run-tests
|
||||
runs-on: 8-cores
|
||||
needs: [create-docker-image, console-test-branch]
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
#----------------------------------------------
|
||||
# load docker image
|
||||
@ -205,7 +205,7 @@ jobs:
|
||||
# run tests
|
||||
#----------------------------------------------
|
||||
- name: Run tests
|
||||
run: CONSOLE_IMAGE_NAME=ci/trading:local poetry run pytest -v -s --numprocesses 4 --dist loadfile --durations=15
|
||||
run: CONSOLE_IMAGE_NAME=ci/trading:local poetry run pytest -v -s --numprocesses 1 --dist loadfile --durations=90
|
||||
working-directory: apps/trading/e2e
|
||||
#----------------------------------------------
|
||||
# upload traces
|
||||
@ -230,28 +230,43 @@ jobs:
|
||||
#----------------------------------------------
|
||||
# ----- upload market-sim logs -----
|
||||
#----------------------------------------------
|
||||
- name: Find Directory
|
||||
id: find-dir
|
||||
- name: Prepare and Zip market-sim-logs
|
||||
if: always()
|
||||
run: |
|
||||
DIR=$(find /tmp -type d -name "vega-sim-*" -print -quit)
|
||||
if [[ -d "$DIR" ]]; then
|
||||
echo "Found directory: $DIR"
|
||||
echo "DIR=$DIR" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Directory not found."
|
||||
exit 1
|
||||
parent_dir="/tmp/market-sim-logs"
|
||||
echo "Creating parent directory at $parent_dir"
|
||||
mkdir -p "$parent_dir"
|
||||
|
||||
echo "Waiting for vega-sim-* folders to be created..."
|
||||
sleep 10 # Waits 10 seconds to ensure all folders are created
|
||||
|
||||
echo "Before searching for vega-sim-* folders in /tmp..."
|
||||
folders=$(find /tmp -mindepth 1 -type d -name 'vega-sim-*' -print) || echo "Find command failed with exit code $?"
|
||||
|
||||
echo "After searching for vega-sim-* folders in /tmp..."
|
||||
|
||||
if [ -z "$folders" ]; then
|
||||
echo "No vega-sim-* folders found."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Compress Files
|
||||
if: env.DIR
|
||||
run: |
|
||||
tar -czvf ${{ github.workspace }}/market-sim-logs.tar.gz -C "$DIR" .
|
||||
echo "Compressed files at ${{ github.workspace }}/market-sim-logs.tar.gz"
|
||||
echo "Moving vega-sim-* folders to $parent_dir"
|
||||
echo "$folders" | xargs -I {} mv {} "$parent_dir/"
|
||||
|
||||
- name: Upload Compressed market-sim-logs
|
||||
echo "Checking if $parent_dir is not empty..."
|
||||
if [ "$(ls -A $parent_dir)" ]; then
|
||||
echo "Zipping the parent directory..."
|
||||
zip -r market-sim-logs.zip "$parent_dir" && echo "Zip file created successfully."
|
||||
else
|
||||
echo "$parent_dir is empty. No zip file created."
|
||||
exit 0
|
||||
fi
|
||||
shell: /usr/bin/bash -e {0}
|
||||
|
||||
- name: Upload market-sim-logs
|
||||
uses: actions/upload-artifact@v3
|
||||
if: env.DIR
|
||||
if: always()
|
||||
with:
|
||||
name: market-sim-logs
|
||||
path: ${{ github.workspace }}/market-sim-logs.tar.gz
|
||||
path: market-sim-logs.zip
|
||||
retention-days: 15
|
||||
|
@ -1,3 +1,3 @@
|
||||
CONSOLE_IMAGE_NAME=vegaprotocol/trading:latest
|
||||
VEGA_VERSION=v0.73.10
|
||||
VEGA_VERSION=v0.74.0-preview.2
|
||||
LOCAL_SERVER=false
|
||||
|
@ -1,3 +1,3 @@
|
||||
CONSOLE_IMAGE_NAME=vegaprotocol/trading:develop
|
||||
VEGA_VERSION=v0.73.10
|
||||
VEGA_VERSION=v0.74.0-preview.2
|
||||
LOCAL_SERVER=false
|
@ -25,7 +25,7 @@ def setup_simple_market(
|
||||
|
||||
vega.mint(
|
||||
MM_WALLET.name,
|
||||
asset="VOTE",
|
||||
asset=vega.find_asset_id(symbol="VOTE", enabled=True),
|
||||
amount=mint_amount,
|
||||
)
|
||||
|
||||
@ -207,7 +207,7 @@ def setup_perps_market(
|
||||
|
||||
vega.mint(
|
||||
MM_WALLET.name,
|
||||
asset="VOTE",
|
||||
asset=vega.find_asset_id(symbol="VOTE", enabled=True),
|
||||
amount=mint_amount,
|
||||
)
|
||||
|
||||
|
8
apps/trading/e2e/poetry.lock
generated
8
apps/trading/e2e/poetry.lock
generated
@ -1,4 +1,4 @@
|
||||
# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
|
||||
# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
|
||||
|
||||
[[package]]
|
||||
name = "certifi"
|
||||
@ -1160,8 +1160,8 @@ profile = ["pytest-profiling", "snakeviz"]
|
||||
[package.source]
|
||||
type = "git"
|
||||
url = "https://github.com/vegaprotocol/vega-market-sim.git/"
|
||||
reference = "fix/genesis_panic"
|
||||
resolved_reference = "de30d2d4c7a1b81a830527ca76473e23ef59de12"
|
||||
reference = "HEAD"
|
||||
resolved_reference = "2aed8c94b25d8fa2e376d3b63ca1f9193d28cdfd"
|
||||
|
||||
[[package]]
|
||||
name = "websocket-client"
|
||||
@ -1342,4 +1342,4 @@ files = [
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = ">=3.9,<3.11"
|
||||
content-hash = "68ed0de55290a3b929d47eb7f7b031fb7e172261c7bbeb4f554b7c27a4462754"
|
||||
content-hash = "39ce8400de7bf060857447281ef27bd78c9b1d9639da063b051e3ae6e7887a67"
|
||||
|
@ -9,7 +9,7 @@ packages = [{include = "trading market-sim e2e"}]
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.9,<3.11"
|
||||
psutil = "^5.9.5"
|
||||
vega-sim = {git = "https://github.com/vegaprotocol/vega-market-sim.git/", branch = "fix/genesis_panic"}
|
||||
vega-sim = {git = "https://github.com/vegaprotocol/vega-market-sim.git/"}
|
||||
pytest-playwright = "^0.4.2"
|
||||
docker = "^6.1.3"
|
||||
pytest-xdist = "^3.3.1"
|
||||
|
@ -47,8 +47,8 @@ def test_limit_buy_order_GTT(continuous_market, vega: VegaServiceNull, page: Pag
|
||||
vega.wait_for_total_catchup()
|
||||
page.get_by_test_id("All").click()
|
||||
# 7002-SORD-017
|
||||
expect(page.get_by_role("row").nth(2)).to_contain_text(
|
||||
"BTC:DAI_2023Futr10+10LimitFilled120.00GTT:"
|
||||
expect(page.get_by_role("row").nth(5)).to_contain_text(
|
||||
"10+10LimitFilled120.00GTT:"
|
||||
)
|
||||
|
||||
@pytest.mark.usefixtures("auth", "risk_accepted")
|
||||
@ -64,8 +64,8 @@ def test_limit_buy_order(continuous_market, vega: VegaServiceNull, page: Page):
|
||||
vega.wait_for_total_catchup()
|
||||
page.get_by_test_id("All").click()
|
||||
# 7002-SORD-017
|
||||
expect(page.get_by_role("row").nth(2)).to_contain_text(
|
||||
"BTC:DAI_2023Futr10+10LimitFilled120.00GTC"
|
||||
expect(page.get_by_role("row").nth(6)).to_contain_text(
|
||||
"10+10LimitFilled120.00GTC"
|
||||
)
|
||||
|
||||
@pytest.mark.usefixtures("auth", "risk_accepted")
|
||||
@ -88,8 +88,8 @@ def test_limit_sell_order(continuous_market, vega: VegaServiceNull, page: Page):
|
||||
vega.wait_fn(1)
|
||||
vega.wait_for_total_catchup()
|
||||
page.get_by_test_id("All").click()
|
||||
expect(page.get_by_role("row").nth(2)).to_contain_text(
|
||||
"BTC:DAI_2023Futr10-10LimitFilled100.00GFN"
|
||||
expect(page.get_by_role("row").nth(7)).to_contain_text(
|
||||
"10-10LimitFilled100.00GFN"
|
||||
)
|
||||
|
||||
@pytest.mark.usefixtures("auth", "risk_accepted")
|
||||
@ -112,8 +112,8 @@ def test_market_sell_order(continuous_market, vega: VegaServiceNull, page: Page)
|
||||
vega.wait_for_total_catchup()
|
||||
|
||||
page.get_by_test_id("All").click()
|
||||
expect(page.get_by_role("row").nth(2)).to_contain_text(
|
||||
"BTC:DAI_2023Futr10-10MarketFilled-IOC"
|
||||
expect(page.get_by_role("row").nth(8)).to_contain_text(
|
||||
"10-10MarketFilled-IOC"
|
||||
)
|
||||
|
||||
@pytest.mark.usefixtures("auth", "risk_accepted")
|
||||
@ -131,6 +131,6 @@ def test_market_buy_order(continuous_market, vega: VegaServiceNull, page: Page):
|
||||
# 7002-SORD-010
|
||||
# 0003-WTXN-012
|
||||
# 0003-WTXN-003
|
||||
expect(page.get_by_role("row").nth(2)).to_contain_text(
|
||||
"BTC:DAI_2023Futr10+10MarketFilled-FOK"
|
||||
expect(page.get_by_role("row").nth(9)).to_contain_text(
|
||||
"10+10MarketFilled-FOK"
|
||||
)
|
||||
|
@ -27,7 +27,7 @@ submit_stop_order = "place-order"
|
||||
stop_orders_tab = "Stop orders"
|
||||
row_table = "row"
|
||||
cancel = "cancel"
|
||||
market_name_col = '[col-id="market.tradableInstrument.instrument.code"]'
|
||||
market_name_col = '[data-testid="market-code"]'
|
||||
trigger_col = '[col-id="trigger"]'
|
||||
expiresAt_col = '[col-id="expiresAt"]'
|
||||
size_col = '[col-id="submission.size"]'
|
||||
|
@ -53,7 +53,7 @@ FEE_BREAKDOWN_TOOLTIP = "fee-breakdown-tooltip"
|
||||
PINNED_ROW_LOCATOR = ".ag-pinned-left-cols-container .ag-row"
|
||||
ROW_LOCATOR = ".ag-center-cols-container .ag-row"
|
||||
# Col-Ids:
|
||||
COL_INSTRUMENT_CODE = '[col-id="market.tradableInstrument.instrument.code"]'
|
||||
COL_INSTRUMENT_CODE = '[data-testid="market-code"]'
|
||||
COL_CODE = '[col-id="code"]'
|
||||
COL_SIZE = '[col-id="size"]'
|
||||
COL_PRICE = '[col-id="price"]'
|
||||
@ -563,7 +563,6 @@ def test_fills_taker_discount_program(
|
||||
page.goto(f"/#/markets/{market_id}")
|
||||
page.get_by_test_id(FILLS).click()
|
||||
row = page.get_by_test_id(TAB_FILLS).locator(ROW_LOCATOR).first
|
||||
expect(row.locator(COL_INSTRUMENT_CODE)).to_have_text("BTC:DAI_2023Futr")
|
||||
expect(row.locator(COL_SIZE)).to_have_text(size)
|
||||
expect(row.locator(COL_PRICE)).to_have_text("103.50 tDAI")
|
||||
expect(row.locator(COL_PRICE_1)).to_have_text(price_1)
|
||||
@ -605,7 +604,6 @@ def test_fills_maker_discount_program(
|
||||
change_keys(page, vega_instance, MM_WALLET.name)
|
||||
page.get_by_test_id(FILLS).click()
|
||||
row = page.get_by_test_id(TAB_FILLS).locator(ROW_LOCATOR).first
|
||||
expect(row.locator(COL_INSTRUMENT_CODE)).to_have_text("BTC:DAI_2023Futr")
|
||||
expect(row.locator(COL_SIZE)).to_have_text(size)
|
||||
expect(row.locator(COL_PRICE)).to_have_text("103.50 tDAI")
|
||||
expect(row.locator(COL_PRICE_1)).to_have_text(price_1)
|
||||
|
@ -77,7 +77,7 @@ class TestGetStarted:
|
||||
|
||||
vega.mint(
|
||||
MM_WALLET.name,
|
||||
asset="VOTE",
|
||||
asset=vega.find_asset_id(symbol="VOTE", enabled=True),
|
||||
amount=mint_amount,
|
||||
)
|
||||
|
||||
@ -105,6 +105,8 @@ class TestGetStarted:
|
||||
|
||||
vega.wait_fn(1)
|
||||
vega.wait_for_total_catchup()
|
||||
page.reload()
|
||||
|
||||
# Assert step 2 complete
|
||||
expect(page.get_by_test_id("icon-tick")).to_have_count(2)
|
||||
|
||||
|
@ -56,9 +56,6 @@ def test_renders_markets_correctly(proposed_market, page: Page):
|
||||
page.goto(f"/#/markets/all")
|
||||
page.click('[data-testid="Proposed markets"]')
|
||||
row = page.locator(row_selector)
|
||||
# 6001-MARK-049
|
||||
expect(row.locator(col_market_id)).to_have_text("BTC:DAI_2023")
|
||||
|
||||
# 6001-MARK-051
|
||||
expect(row.locator('[col-id="asset"]')).to_have_text("tDAI")
|
||||
|
||||
|
@ -68,11 +68,11 @@ def setup_market_monitoring_auction(vega: VegaServiceNull, simple_market):
|
||||
vega.wait_for_total_catchup()
|
||||
|
||||
# add orders that change the price so that it goes beyond the limits of price monitoring
|
||||
submit_order(vega, MM_WALLET.name, simple_market, "SIDE_SELL", 100, 110)
|
||||
submit_order(vega, MM_WALLET2.name, simple_market, "SIDE_BUY", 100, 90)
|
||||
submit_order(vega, MM_WALLET.name, simple_market, "SIDE_SELL", 100, 105)
|
||||
submit_order(vega, MM_WALLET2.name, simple_market, "SIDE_BUY", 100, 95)
|
||||
submit_order(vega, MM_WALLET2.name, simple_market, "SIDE_BUY", 1, 105)
|
||||
submit_order(vega, MM_WALLET.name, simple_market, "SIDE_SELL", 100, 300)
|
||||
submit_order(vega, MM_WALLET2.name, simple_market, "SIDE_BUY", 100, 290)
|
||||
submit_order(vega, MM_WALLET.name, simple_market, "SIDE_SELL", 100, 305)
|
||||
submit_order(vega, MM_WALLET2.name, simple_market, "SIDE_BUY", 100, 295)
|
||||
submit_order(vega, MM_WALLET2.name, simple_market, "SIDE_BUY", 1, 305)
|
||||
|
||||
vega.wait_fn(1)
|
||||
vega.wait_for_total_catchup()
|
||||
@ -89,7 +89,6 @@ def test_market_monitoring_auction_price_volatility_limit_order(
|
||||
page.get_by_test_id("order-price").type("110")
|
||||
page.get_by_test_id("order-tif").select_option("Fill or Kill (FOK)")
|
||||
page.get_by_test_id("place-order").click()
|
||||
|
||||
expect(page.get_by_test_id("deal-ticket-error-message-tif")).to_have_text(
|
||||
"This market is in auction due to high price volatility. Until the auction ends, you can only place GFA, GTT, or GTC limit orders."
|
||||
)
|
||||
@ -110,8 +109,8 @@ def test_market_monitoring_auction_price_volatility_limit_order(
|
||||
vega.wait_fn(1)
|
||||
vega.wait_for_total_catchup()
|
||||
page.get_by_test_id("All").click()
|
||||
expect(page.get_by_role("row").nth(2)).to_contain_text(
|
||||
"BTC:DAI_2023Futr0+1LimitActive110.00GTC"
|
||||
expect(page.get_by_role("row").nth(4)).to_contain_text(
|
||||
"0+1LimitActive110.00GTC"
|
||||
)
|
||||
|
||||
|
||||
@ -125,7 +124,6 @@ def test_market_monitoring_auction_price_volatility_market_order(
|
||||
page.get_by_test_id("order-size").type("1")
|
||||
# 7002-SORD-060
|
||||
page.get_by_test_id("place-order").click()
|
||||
|
||||
expect(page.get_by_test_id("deal-ticket-error-message-tif")).to_have_text(
|
||||
"This market is in auction due to high price volatility. Until the auction ends, you can only place GFA, GTT, or GTC limit orders."
|
||||
)
|
||||
|
@ -65,7 +65,6 @@ def test_limit_order_trade_open_order(
|
||||
expect(orderbook_trade).to_be_visible()
|
||||
|
||||
expected_open_order = [
|
||||
"BTC:DAI_2023",
|
||||
"+1",
|
||||
"Limit",
|
||||
"Active",
|
||||
@ -87,9 +86,6 @@ def test_limit_order_trade_open_position(continuous_market, page: Page):
|
||||
secondary_id = "stack-cell-secondary"
|
||||
|
||||
position = {
|
||||
"market_code": "BTC:DAI_2023",
|
||||
"settlement_asset": "tDAI",
|
||||
"product_type": "Futr",
|
||||
"size": "+1",
|
||||
"notional": "107.50",
|
||||
"average_entry_price": "107.50",
|
||||
@ -107,12 +103,6 @@ def test_limit_order_trade_open_position(continuous_market, page: Page):
|
||||
# 7004-POSI-001
|
||||
# 7004-POSI-002
|
||||
|
||||
market = table.locator("[col-id='marketCode']")
|
||||
expect(market.get_by_test_id(primary_id)).to_have_text(position["market_code"])
|
||||
expect(market.get_by_test_id(secondary_id)).to_have_text(
|
||||
position["settlement_asset"] + position["product_type"]
|
||||
)
|
||||
|
||||
size_and_notional = table.locator("[col-id='openVolume']")
|
||||
expect(size_and_notional.get_by_test_id(primary_id)).to_have_text(position["size"])
|
||||
expect(size_and_notional.get_by_test_id(secondary_id)).to_have_text(
|
||||
|
@ -257,46 +257,63 @@ def test_order_sorted(page: Page):
|
||||
|
||||
def test_order_status_active(page: Page):
|
||||
# 7002-SORD-041
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
"market-2Futr" + "0" + "-10" + "Limit" + "Active" + "150.00" + "GTC"
|
||||
expect(page.locator('[row-index="2"]').first).to_contain_text(
|
||||
"market-2Futr"
|
||||
)
|
||||
expect(page.locator('[row-index="2"]').nth(1)).to_contain_text(
|
||||
"0" + "-10" + "Limit" + "Active" + "150.00" + "GTC"
|
||||
)
|
||||
|
||||
|
||||
def test_status_expired(page: Page):
|
||||
# 7002-SORD-042
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
"market-3Futr" + "0" + "-10" + "Limit" + "Expired" + "120.00" + "GTT:"
|
||||
expect(page.locator('[row-index="7"]').first).to_contain_text(
|
||||
"market-3Futr"
|
||||
)
|
||||
expect(page.locator('[row-index="7"]').nth(1)).to_contain_text(
|
||||
"0" + "-10" + "Limit" + "Expired" + "120.00" + "GTT:"
|
||||
)
|
||||
|
||||
|
||||
def test_order_status_Stopped(page: Page):
|
||||
# 7002-SORD-044
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
"market-1Futr" + "0" + "-100" + "Limit" + "Stopped" + "130.00" + "IOC"
|
||||
expect(page.locator('[row-index="12"]').first).to_contain_text(
|
||||
"market-1Futr"
|
||||
)
|
||||
expect(page.locator('[row-index="12"]').nth(1)).to_contain_text(
|
||||
"0" + "-100" + "Limit" + "Stopped" + "130.00" + "IOC"
|
||||
)
|
||||
|
||||
|
||||
def test_order_status_partially_filled(page: Page):
|
||||
# 7002-SORD-045
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
"market-2Futr" + "99" + "+100" + "Limit" + "Partially Filled" + "104.00" + "IOC"
|
||||
expect(page.locator('[row-index="8"]').first).to_contain_text(
|
||||
"market-2Futr"
|
||||
)
|
||||
expect(page.locator('[row-index="8"]').nth(1)).to_contain_text(
|
||||
"99" + "+100" + "Limit" + "Partially Filled" + "104.00" + "IOC"
|
||||
)
|
||||
|
||||
|
||||
def test_order_status_filled(page: Page):
|
||||
# 7002-SORD-046
|
||||
# 7003-MORD-020
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
"market-1Futr" + "100" + "-100" + "Limit" + "Filled" + "88.00" + "GTC"
|
||||
expect(page.locator('[row-index="11"]').first).to_contain_text(
|
||||
"market-1Futr"
|
||||
)
|
||||
expect(page.locator('[row-index="11"]').nth(1)).to_contain_text(
|
||||
"100" + "-100" + "Limit" + "Filled" + "88.00" + "GTC"
|
||||
)
|
||||
|
||||
|
||||
def test_order_status_rejected(page: Page):
|
||||
# 7002-SORD-047
|
||||
# 7003-MORD-018
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
expect(page.locator('[row-index="9"]').first).to_contain_text(
|
||||
"market-1Futr"
|
||||
+ "0"
|
||||
)
|
||||
expect(page.locator('[row-index="9"]').nth(1)).to_contain_text(
|
||||
"0"
|
||||
+ "-10,000,000,000"
|
||||
+ "Limit"
|
||||
+ "Rejected: Margin check failed"
|
||||
@ -308,9 +325,11 @@ def test_order_status_rejected(page: Page):
|
||||
def test_order_status_parked(page: Page):
|
||||
# 7002-SORD-048
|
||||
# 7003-MORD-016
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
expect(page.locator('[row-index="3"]').first).to_contain_text(
|
||||
"market-5Futr"
|
||||
+ "0"
|
||||
)
|
||||
expect(page.locator('[row-index="3"]').nth(1)).to_contain_text(
|
||||
"0"
|
||||
+ "-60"
|
||||
+ "Ask + 15.00 Peg limit"
|
||||
+ "Parked"
|
||||
@ -321,9 +340,11 @@ def test_order_status_parked(page: Page):
|
||||
|
||||
def test_order_status_pegged_ask(page: Page):
|
||||
# 7003-MORD-016
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
expect(page.locator('[row-index="4"]').first).to_contain_text(
|
||||
"market-4Futr"
|
||||
+ "0"
|
||||
)
|
||||
expect(page.locator('[row-index="4"]').nth(1)).to_contain_text(
|
||||
"0"
|
||||
+ "-60"
|
||||
+ "Ask + 15.00 Peg limit"
|
||||
+ "Active"
|
||||
@ -334,9 +355,11 @@ def test_order_status_pegged_ask(page: Page):
|
||||
|
||||
def test_order_status_pegged_bid(page: Page):
|
||||
# 7003-MORD-016
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
expect(page.locator('[row-index="5"]').first).to_contain_text(
|
||||
"market-4Futr"
|
||||
+ "0"
|
||||
)
|
||||
expect(page.locator('[row-index="5"]').nth(1)).to_contain_text(
|
||||
"0"
|
||||
+ "+40"
|
||||
+ "Bid - 10.00 Peg limit"
|
||||
+ "Active"
|
||||
@ -347,9 +370,11 @@ def test_order_status_pegged_bid(page: Page):
|
||||
|
||||
def test_order_status_pegged_mid(page: Page):
|
||||
# 7003-MORD-016
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
expect(page.locator('[row-index="6"]').first).to_contain_text(
|
||||
"market-4Futr"
|
||||
+ "0"
|
||||
)
|
||||
expect(page.locator('[row-index="6"]').nth(1)).to_contain_text(
|
||||
"0"
|
||||
+ "+20"
|
||||
+ "Mid - 5.00 Peg limit"
|
||||
+ "Active"
|
||||
@ -372,9 +397,11 @@ def test_order_amend_order(vega: VegaServiceNull, page: Page):
|
||||
vega.forward("10s")
|
||||
vega.wait_fn(1)
|
||||
vega.wait_for_total_catchup()
|
||||
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
"market-2Futr" + "0" + "-15" + "Limit" + "Active" + "170.00" + "GTC"
|
||||
expect(page.locator('[row-index="1"]').first).to_contain_text(
|
||||
"market-2Futr"
|
||||
)
|
||||
expect(page.locator('[row-index="1"]').nth(1)).to_contain_text(
|
||||
"0" + "-15" + "Limit" + "Active" + "170.00" + "GTC"
|
||||
)
|
||||
|
||||
|
||||
@ -389,9 +416,11 @@ def test_order_cancel_single_order(vega: VegaServiceNull, page: Page):
|
||||
vega.forward("10s")
|
||||
vega.wait_fn(1)
|
||||
vega.wait_for_total_catchup()
|
||||
|
||||
expect(page.get_by_test_id(order_tab)).to_contain_text(
|
||||
"market-3Futr" + "0" + "+10" + "Limit" + "Cancelled" + "60.00" + "GTC"
|
||||
expect(page.locator('[row-index="0"]').first).to_contain_text(
|
||||
"market-3Futr"
|
||||
)
|
||||
expect(page.locator('[row-index="0"]').nth(1)).to_contain_text(
|
||||
"0" + "+10" + "Limit" + "Cancelled" + "60.00" + "GTC"
|
||||
)
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@ def test_closed_market_position(vega: VegaServiceNull, page: Page):
|
||||
expect(page.locator(".ag-overlay-panel")).to_have_text("No positions")
|
||||
page.get_by_test_id("open-transfer").click()
|
||||
tab = page.get_by_test_id("tab-positions")
|
||||
table = tab.locator(".ag-center-cols-container")
|
||||
table = tab.locator('[class="ag-body ag-layout-normal"]')
|
||||
market = table.locator("[col-id='marketCode']")
|
||||
expect(market.get_by_test_id("stack-cell-primary")).to_have_text("BTC:DAI_2023")
|
||||
page.get_by_test_id("open-transfer").click()
|
||||
|
@ -75,4 +75,5 @@ def test_price_copied_to_deal_ticket(continuous_market, page: Page):
|
||||
page.get_by_test_id("Trades").click()
|
||||
page.locator("[col-id=price]").last.click()
|
||||
# 6005-THIS-007
|
||||
page.reload()
|
||||
expect(page.get_by_test_id("order-price")).to_have_value("107.50000")
|
||||
|
Loading…
Reference in New Issue
Block a user