chore(trading): staking reward card e2e (#5915)
This commit is contained in:
parent
6504912284
commit
de2b79416e
@ -57,6 +57,16 @@ def setup_market_with_reward_program(vega: VegaServiceNull):
|
||||
)
|
||||
|
||||
next_epoch(vega=vega)
|
||||
vega.recurring_transfer(
|
||||
from_key_name=PARTY_A.name,
|
||||
from_account_type=vega_protos.vega.ACCOUNT_TYPE_GENERAL,
|
||||
to_account_type=vega_protos.vega.ACCOUNT_TYPE_GLOBAL_REWARD,
|
||||
asset=tDAI_asset_id,
|
||||
amount=100,
|
||||
factor=1.0,
|
||||
)
|
||||
vega.wait_fn(1)
|
||||
vega.wait_for_total_catchup()
|
||||
vega.recurring_transfer(
|
||||
from_key_name=PARTY_A.name,
|
||||
from_account_type=vega_protos.vega.ACCOUNT_TYPE_GENERAL,
|
||||
@ -171,4 +181,22 @@ def test_reward_history(
|
||||
page.get_by_test_id(EARNED_BY_ME_BUTTON).click()
|
||||
expect((page.get_by_role(ROW).locator(TOTAL_COL_ID)).nth(1)).to_have_text(
|
||||
"183.33333"
|
||||
)
|
||||
)
|
||||
|
||||
def test_staking_reward(
|
||||
page: Page,
|
||||
):
|
||||
expect(page.get_by_test_id("active-rewards-card")).to_have_count(2)
|
||||
staking_reward_card = page.get_by_test_id("active-rewards-card").nth(1)
|
||||
expect(staking_reward_card).to_be_visible()
|
||||
expect(staking_reward_card.get_by_test_id("entity-scope")).to_have_text("Individual")
|
||||
expect(staking_reward_card.get_by_test_id("locked-for")).to_have_text("0 epochs")
|
||||
expect(staking_reward_card.get_by_test_id("reward-value")).to_have_text("100.00")
|
||||
expect(staking_reward_card.get_by_test_id("distribution-strategy")).to_have_text("Pro rata")
|
||||
expect(staking_reward_card.get_by_test_id("dispatch-metric-info")).to_have_text(
|
||||
"Staking rewards"
|
||||
)
|
||||
expect(staking_reward_card.get_by_test_id("assessed-over")).to_have_text("1 epoch")
|
||||
expect(staking_reward_card.get_by_test_id("scope")).to_have_text("Individual")
|
||||
expect(staking_reward_card.get_by_test_id("staking-requirement")).to_have_text("1.00")
|
||||
expect(staking_reward_card.get_by_test_id("average-position")).to_have_text("0.00")
|
Loading…
Reference in New Issue
Block a user