Skip to content

Commit

Permalink
Fix discount hasEndDate selector in tests (#4555)
Browse files Browse the repository at this point in the history
* Fix discount hasEndDate selector in tests

* Add changeset
  • Loading branch information
poulch committed Dec 19, 2023
1 parent 7994e59 commit 9208b3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/weak-planets-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Fix discount hasEndDate selector in tests
2 changes: 1 addition & 1 deletion cypress/elements/discounts/vouchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const VOUCHERS_SELECTORS = {
discountValueInputs: "[name='value']",
startDateInput: '[name="startDate"]',
endDateInput: '[name="endDate"]',
hasEndDateCheckbox: '[name="hasEndDate"]',
hasEndDateCheckbox: '[data-test-id="has-end-date"]',
endTimeInput: '[name="endTime"]',
assignCountryButton: '[data-test-id="assign-country"]',
countriesDropdownIcon: '[data-test-id="countries-drop-down-icon"]',
Expand Down
1 change: 1 addition & 0 deletions src/discounts/components/DiscountDates/DiscountDates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const DiscountDates = <ErrorCode,>({
<Checkbox
marginY={4}
checked={data.hasEndDate}
data-test-id="has-end-date"
name="hasEndDate"
disabled={disabled}
onCheckedChange={() => {
Expand Down

0 comments on commit 9208b3e

Please sign in to comment.