Skip to content

Commit

Permalink
chore (refs T34082): add E2E Props. (#443)
Browse files Browse the repository at this point in the history
* chore (refs T34082): add E2E Props.

* chore (refs T34082): add CHANGELOG.

* Update CHANGELOG.md

Co-authored-by: salisdemos <40487461+salisdemos@users.noreply.github.com>

* chore (refs T34082): add default value for prop.

---------

Co-authored-by: salisdemos <40487461+salisdemos@users.noreply.github.com>
  • Loading branch information
ahmad-demos and salisdemos committed Oct 10, 2023
1 parent d3fc0e0 commit 232bb62
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Since v0.0.10, this Changelog is formatted according to the [Common Changelog][c

### Added

- ([#437](https://github.com/demos-europe/demosplan-ui/pull/437)) Add missing Hooks/Selectors ([@ahmad-demos](https://github.com/@ahmad-demos))
- ([#443](https://github.com/demos-europe/demosplan-ui/pull/443)), ([#437](https://github.com/demos-europe/demosplan-ui/pull/437)) Add E2E Props ([@ahmad-demos](https://github.com/@ahmad-demos))

## v0.1.11 - 2023-08-11

Expand Down
13 changes: 11 additions & 2 deletions src/components/DpDateRangePicker/DpDateRangePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:disabled="startDisabled"
:value="startValue"
:required="required || (endDate !== '' && endDate < currentDate)"
data-cy="startDateDescription"
:data-cy="dataCy.startDate"
@input="handleInputStartDate" />
<span>-</span>
<dp-datepicker
Expand All @@ -23,7 +23,7 @@
:disabled="endDisabled"
:value="endValue"
:required="required"
data-cy="endDateDescription"
:data-cy="dataCy.endDate"
@input="handleInputEndDate" />
</div>
</template>
Expand Down Expand Up @@ -52,6 +52,15 @@ export default {
default: 0
},
dataCy: {
type: Object,
required: false,
default: () => ({}),
validator: (prop) => {
return Object.keys(prop).every(key => ['endDate', 'startDate'].includes(key))
}
},
endDisabled: {
type: Boolean,
required: false,
Expand Down
8 changes: 7 additions & 1 deletion src/components/DpDatepicker/DpDatepicker.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div
:id="id"
data-cy="datepicker"
:data-cy="dataCy"
@input.stop.prevent="emitUpdate" />
</template>

Expand All @@ -25,6 +25,12 @@ export default {
default: 0
},
dataCy: {
type: String,
required: false,
default: 'datepicker'
},
disabled: {
type: Boolean,
required: false,
Expand Down

0 comments on commit 232bb62

Please sign in to comment.