Skip to content

TC-14 | Added locators for governance #28

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 10 additions & 3 deletions components/governance/CreateProposal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="proposal">
<div class="proposal" data-test="proposal_page">
<h1 class="title">{{ $t('createProposal') }}</h1>

<div class="columns is-multiline">
Expand All @@ -9,7 +9,7 @@
:message="isValidTitle ? '' : $t('proposal.error.title')"
:type="{ 'is-warning': !isValidTitle }"
>
<b-input v-model="validTitle" :placeholder="$t('title')"></b-input>
<b-input v-model="validTitle" :placeholder="$t('title')" data-test="input_proposal_title"></b-input>
</b-field>
</div>
<div class="column is-6">
Expand All @@ -22,6 +22,7 @@
v-model="address"
:placeholder="$t('proposalAddress')"
:size="!address ? '' : hasValidAddress ? '' : 'is-warning'"
data-test="input_proposal_address"
></b-input>
</b-field>
</div>
Expand All @@ -31,13 +32,19 @@
:type="{ 'is-warning': !isValidDescription }"
:label="$t('proposalDescription')"
>
<b-input v-model="validDescription" maxlength="2000" type="textarea"></b-input>
<b-input
v-model="validDescription"
maxlength="2000"
type="textarea"
data-test="input_proposal_description"
></b-input>
</b-field>
</div>
</div>
<b-tooltip :label="`${$t('onlyOneProposalErr')}`" position="is-top" :active="cannotCreate" multilined>
<b-button
:disabled="cannotCreate"
data-test="button_create_proposal"
type="is-primary"
:icon-left="isFetchingBalances ? '' : 'plus'"
outlined
Expand Down
2 changes: 2 additions & 0 deletions components/governance/manage/tabs/DelegateTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<b-field :label="$t('recipient')">
<b-input
v-model="delegatee"
data-test="input_recipient_address"
:placeholder="$t('address')"
:size="!delegatee ? '' : isValidAddress ? 'is-primary' : 'is-warning'"
></b-input>
Expand All @@ -27,6 +28,7 @@
<b-button
:disabled="!canDelegate || !isValidAddress"
type="is-primary is-fullwidth"
data-test="button_delegate"
outlined
@click="onDelegate"
>
Expand Down
10 changes: 8 additions & 2 deletions components/governance/manage/tabs/RewardTab.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<template>
<b-tab-item :label="$t('stakingReward.label.tab')">
<b-tab-item :label="$t('stakingReward.label.tab')" header-class="claim_tab">
<div class="p">
{{ $t('stakingReward.description') }}
</div>
<div class="label-with-value">
{{ $t('stakingReward.label.input') }}:
<span><number-format :value="reward" /> TORN</span>
</div>
<b-button :disabled="notAvailableClaim" type="is-primary is-fullwidth" outlined @click="onClaim">
<b-button
:disabled="notAvailableClaim"
data-test="button_claim"
type="is-primary is-fullwidth"
outlined
@click="onClaim"
>
{{ $t('stakingReward.action') }}
</b-button>
</b-tab-item>
Expand Down
10 changes: 8 additions & 2 deletions components/governance/manage/tabs/UndelegateTab.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<b-tab-item :label="$t('undelegate')">
<b-tab-item :label="$t('undelegate')" header-class="undelegate_tab">
<div class="p">
{{ $t('undelegateTabDesc') }}
</div>
Expand All @@ -16,7 +16,13 @@
:active="!canUndelegate"
multilined
>
<b-button :disabled="!canUndelegate" type="is-primary is-fullwidth" outlined @click="onUndelegate">
<b-button
:disabled="!canUndelegate"
data-test="button_undelegate"
type="is-primary is-fullwidth"
outlined
@click="onUndelegate"
>
{{ $t('undelegate') }}
</b-button>
</b-tooltip>
Expand Down