Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

fix: percentage formatting #187

Merged
merged 5 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CONSOLE_IMAGE_NAME=vegaprotocol/trading:develop
VEGA_VERSION=v0.73.0-rc.2
VEGA_VERSION=v0.73.1
2 changes: 1 addition & 1 deletion .env.develop
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CONSOLE_IMAGE_NAME=vegaprotocol/trading:develop
VEGA_VERSION=v0.73.0-rc.2
VEGA_VERSION=v0.73.1
2 changes: 1 addition & 1 deletion .env.main
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CONSOLE_IMAGE_NAME=vegaprotocol/trading:main
VEGA_VERSION=v0.72.14
VEGA_VERSION=v0.73.1
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
VEGA_VERSION:
description: "Vega version to test"
required: true
default: v0.73.0-rc.2
default: v0.73.1
CONSOLE_IMAGE_NAME:
description: "Console image name"
required: true
Expand Down
1,089 changes: 563 additions & 526 deletions poetry.lock

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions tests/market/test_closed_markets.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def vega():


@pytest.fixture(scope="class")
def create_settled_market(vega):
def create_settled_market(vega: VegaService):
market_id = setup_continuous_market(vega)
vega.settle_market(
vega.submit_termination_and_settlement_data(
settlement_key="FJMKnwfZdd48C8NqvYrG",
settlement_price=110,
market_id=market_id,
Expand Down Expand Up @@ -115,11 +115,10 @@ def test_settled_rows(self, page: Page, create_settled_market):
@pytest.mark.usefixtures("risk_accepted", "auth")
def test_terminated_market_no_settlement_date(page: Page, vega: VegaService):
setup_continuous_market(vega)
governance.settle_oracle(
wallet=vega.wallet,
oracle_name="INVALID_ORACLE",
settlement_price=110,
governance.submit_oracle_data(
key_name="FJMKnwfZdd48C8NqvYrG",
payload={"trading.terminated": "true"},
wallet=vega.wallet
)
vega.forward("60s")
vega.wait_fn(10)
Expand Down
6 changes: 3 additions & 3 deletions tests/market/test_market_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def test_market_info_current_fees(page: Page):
# 6002-MDET-101
page.get_by_test_id(market_title_test_id).get_by_text("Current fees").click()
fields = [
["Maker Fee", "10.00%"],
["Maker Fee", "10%"],
["Infrastructure Fee", "0.05%"],
["Liquidity Fee", "0.00%"],
["Liquidity Fee", "0%"],
["Total Fees", "10.05%"],
]
validate_info_section(page, fields)
Expand Down Expand Up @@ -253,7 +253,7 @@ def test_market_info_liquidity_price_range(page: Page):
"Liquidity price range"
).click()
fields = [
["Liquidity Price Range", "100.00% of mid price"],
["Liquidity Price Range", "100% of mid price"],
["Lowest Price", "0.00 BTC"],
["Highest Price", "205.00 BTC"],
]
Expand Down
23 changes: 11 additions & 12 deletions tests/market_lifecycle/test_market_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from fixtures.market import setup_continuous_market
from datetime import datetime
from datetime import timedelta
from vega_sim.service import MarketStateUpdateType

# Defined namedtuples
WalletConfig = namedtuple("WalletConfig", ["name", "passphrase"])
Expand Down Expand Up @@ -98,30 +99,28 @@ def test_market_lifecycle(proposed_market, vega: VegaService, page: Page):
# check market state is now active and trading mode is continuous
expect(trading_mode).to_have_text("Continuous")
expect(market_state).to_have_text("Active")

# put invalid oracle to trigger market termination
governance.settle_oracle(
wallet=vega.wallet,
oracle_name="INVALID_ORACLE",
settlement_price=1,
governance.submit_oracle_data(
key_name=TERMINATE_WALLET.name,
payload={"trading.terminated": "true"},
wallet=vega.wallet
)

vega.forward("60s")
vega.wait_fn(1)
vega.wait_fn(10)
vega.wait_for_total_catchup()

# market state should be changed to "Trading Terminated" because of the invalid oracle
expect(trading_mode).to_have_text("No trading")
expect(market_state).to_have_text("Trading Terminated")

# settle market
vega.settle_market(
vega.submit_termination_and_settlement_data(
settlement_key=TERMINATE_WALLET.name,
settlement_price=100,
market_id=market_id,
)
vega.forward("10s")
vega.wait_fn(1)
vega.forward("60s")
vega.wait_fn(10)
vega.wait_for_total_catchup()

# check market state is now settled
Expand All @@ -136,7 +135,7 @@ def test_market_closing_banners(page: Page, continuous_market, vega: VegaService
proposalID = vega.update_market_state(
continuous_market,
"mm",
vega_protos.governance.MarketStateUpdateType.MARKET_STATE_UPDATE_TYPE_TERMINATE,
MarketStateUpdateType.Terminate,
approve_proposal=False,
vote_enactment_time = datetime.now() + timedelta(weeks=1),
forward_time_to_enactment = False,
Expand All @@ -149,7 +148,7 @@ def test_market_closing_banners(page: Page, continuous_market, vega: VegaService
vega.update_market_state(
continuous_market,
"mm",
vega_protos.governance.MarketStateUpdateType.MARKET_STATE_UPDATE_TYPE_TERMINATE,
MarketStateUpdateType.Terminate,
approve_proposal=False,
vote_enactment_time = datetime.now() + timedelta(weeks=1),
forward_time_to_enactment = False,
Expand Down
2 changes: 1 addition & 1 deletion tests/positions/test_positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def test_closed_market_position(vega: VegaService, page: Page):
market_id = setup_continuous_market(vega)

vega.settle_market(
vega.submit_termination_and_settlement_data(
settlement_key="FJMKnwfZdd48C8NqvYrG",
settlement_price=110,
market_id=market_id,
Expand Down
2 changes: 1 addition & 1 deletion tests/successor_market/test_succession_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def successor_market(vega: VegaService):
successor_market_id = setup_simple_successor_market(
vega, parent_market_id, tdai_id, "successor_market"
)
vega.settle_market(
vega.submit_termination_and_settlement_data(
settlement_key="FJMKnwfZdd48C8NqvYrG",
settlement_price=110,
market_id=parent_market_id,
Expand Down
4 changes: 2 additions & 2 deletions tests/transfer/test_transfer_key_to_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def test_transfer_submit(continuous_market, vega: VegaService, page: Page):
page.goto('/#/portfolio')

expect(page.get_by_test_id('transfer-form')).to_be_visible
page.select_option('[data-testid=transfer-form] [name="toAddress"]', index=1)

page.select_option('[data-testid=transfer-form] [name="toVegaKey"]', index=2)
page.select_option('[data-testid=transfer-form] [name="fromAccount"]', index=1)
page.get_by_test_id('select-asset').click()
expect(page.get_by_test_id('rich-select-option')).to_have_count(1)

Expand Down