Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore (refs T34082): add E2E Props. #443

Merged
merged 5 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Since v0.0.10, this Changelog is formatted according to the [Common Changelog][c

### Added

- ([#443](https://github.com/demos-europe/demosplan-ui/pull/443)) Add E2E Props ([@ahmad-demos](https://github.com/@ahmad-demos))
- ([#437](https://github.com/demos-europe/demosplan-ui/pull/437)) Add missing Hooks/Selectors ([@ahmad-demos](https://github.com/@ahmad-demos))
ahmad-demos marked this conversation as resolved.
Show resolved Hide resolved

## 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
7 changes: 6 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,11 @@ export default {
default: 0
},

dataCy: {
type: String,
required: false,
Comment on lines +29 to +30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if required false, we should add a default datepicker

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 46a46e8

},

disabled: {
type: Boolean,
required: false,
Expand Down