Commit 859e1050 authored by Walmyr Lima's avatar Walmyr Lima

Update view to add testability into it

And prettify it to avoid static analysis failure
parent e34a67b9
...@@ -165,6 +165,7 @@ export default { ...@@ -165,6 +165,7 @@ export default {
<a <a
v-if="editable" v-if="editable"
class="float-right js-weight-edit-link" class="float-right js-weight-edit-link"
data-qa-selector="edit_weight_link"
href="#" href="#"
@click="onEditClick(!shouldShowEditField)" @click="onEditClick(!shouldShowEditField)"
>{{ __('Edit') }}</a >{{ __('Edit') }}</a
...@@ -175,6 +176,7 @@ export default { ...@@ -175,6 +176,7 @@ export default {
ref="editableField" ref="editableField"
:value="weight" :value="weight"
class="form-control" class="form-control"
data-qa-selector="weight_input_field"
type="text" type="text"
:placeholder="__('Enter a number')" :placeholder="__('Enter a number')"
@blur="onSubmit" @blur="onSubmit"
...@@ -192,12 +194,18 @@ export default { ...@@ -192,12 +194,18 @@ export default {
}}</strong> }}</strong>
<span v-if="editable"> <span v-if="editable">
- -
<a class="btn-default-hover-link js-weight-remove-link" href="#" @click="removeWeight">{{ <a
__('remove weight') class="btn-default-hover-link js-weight-remove-link"
}}</a> data-qa-selector="remove_weight_link"
href="#"
@click="removeWeight"
>{{ __('remove weight') }}</a
>
</span> </span>
</span> </span>
<span v-else class="no-value">{{ noValueLabel }}</span> <span v-else class="no-value" data-qa-selector="weight_no_value_content">{{
noValueLabel
}}</span>
</div> </div>
</div> </div>
</template> </template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment