-
Notifications
You must be signed in to change notification settings - Fork 666
Scheduler: delete Appointment enhancements #32633
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
Merged
+364
−62
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
aa4c78f
fix: fix bug
sjbur 64271bf
test: try to add test
sjbur e34db03
test: try to fix test
sjbur c960d85
fix: fix test
sjbur 6a133ad
css: fix active color state for list item in collector
sjbur 421678b
refactor: improve appointment deletion logic in tooltip strategy
sjbur 0f53edd
refactor: create isDeletingAllowed method
sjbur 2b1a00a
test: add test for disabled appointment
sjbur b4f1e8c
css: revert list colors
sjbur ff9174d
css: update focus color for appointment in tooltip
sjbur f0b3332
feat: update test to support all themes
sjbur afb88c8
fix: fix build
sjbur 1678acd
refactor: standardize method visibility and naming conventions in too…
sjbur cfe1143
fix: fix build
sjbur 4afd4e9
test: add tests
sjbur 59b2061
test: cancel edits in testcafe tests
sjbur 01cbee5
test: create pom for tooltip
sjbur e3f213e
refactor: rename test file
sjbur 393fdeb
test: fix naming in test
sjbur 65b7a24
test: fix test
sjbur fd57ba8
test: add test for delete button tabindex
sjbur 5055c5d
test: add test for allowDelete = false
sjbur 7f2de0e
test: add test for deleting appointment on button click
sjbur 68a4882
test: remove pressDeleteOnItem method
sjbur cd20f51
test: updated tests
sjbur 205aa85
test: update tests
sjbur 6cec4b3
Merge branch '26_1' into v2_issue_308_26_1
sjbur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+43 KB
...ipBehaviour/etalons/collector-tooltip-focused-list-item (fluent.blue.light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+42.2 KB
...ooltipBehaviour/etalons/collector-tooltip-focused-list-item (generic.light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.6 KB
...Behaviour/etalons/collector-tooltip-focused-list-item (material.blue.light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
packages/devextreme/js/__internal/scheduler/__tests__/__mock__/model/tooltip.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import { within } from '@testing-library/dom'; | ||
|
|
||
| const TOOLTIP_WRAPPER_SELECTOR = '.dx-overlay-wrapper.dx-scheduler-appointment-tooltip-wrapper'; | ||
|
|
||
| export class TooltipModel { | ||
| private get element(): HTMLElement | null { | ||
| return document.querySelector<HTMLElement>(TOOLTIP_WRAPPER_SELECTOR); | ||
| } | ||
|
|
||
| isVisible(): boolean { | ||
| return this.element !== null; | ||
| } | ||
|
|
||
| getScrollableContent(): Element | null { | ||
| return this.element?.querySelector('.dx-scrollable .dx-scrollview-content') ?? null; | ||
| } | ||
|
|
||
| getDeleteButton(index = 0): HTMLElement { | ||
| const tooltip = this.element; | ||
| const buttons = tooltip | ||
| ? within(tooltip).queryAllByRole('button').filter((btn) => btn.classList.contains('dx-tooltip-appointment-item-delete-button')) | ||
| : []; | ||
|
|
||
| if (buttons.length === 0) { | ||
| throw new Error('Tooltip delete button not found'); | ||
| } | ||
|
|
||
| return buttons[index]; | ||
| } | ||
|
|
||
| getAppointmentItem(index = 0): HTMLElement | null { | ||
| const tooltip = this.element; | ||
| if (!tooltip) { | ||
| return null; | ||
| } | ||
| return within(tooltip).queryAllByRole('option')[index] ?? null; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.