mirror of https://github.com/logseq/logseq
fix: Scheduled date picker always points to today, regardless of a previous date (#7329)
* fix: Scheduled date picker always points to today, regardless if a previous date was already set fixes #6985 * fix: e2e-test flakyness for datepickerpull/7325/merge
parent
3de6f3de96
commit
e882b7cabd
|
@ -228,3 +228,22 @@ test('invalid page props #3944', async ({ page, block }) => {
|
|||
// Force rendering property block
|
||||
await block.enterNext()
|
||||
})
|
||||
|
||||
test('Scheduled date picker should point to the already specified Date #6985', async({page,block})=>{
|
||||
await createRandomPage(page)
|
||||
|
||||
await block.mustFill('testTask \n SCHEDULED: <2000-05-06 Sat>')
|
||||
await block.enterNext()
|
||||
await page.waitForTimeout(500)
|
||||
await block.escapeEditing()
|
||||
|
||||
// Open date picker
|
||||
await page.click('a.opacity-80')
|
||||
await page.waitForTimeout(500)
|
||||
expect(page.locator('text=May 2000')).toBeVisible()
|
||||
expect(page.locator('td:has-text("6").active')).toBeVisible()
|
||||
|
||||
// Close date picker
|
||||
await page.click('a.opacity-80')
|
||||
await page.waitForTimeout(500)
|
||||
})
|
|
@ -136,7 +136,7 @@
|
|||
(reset! *timestamp {:time ""
|
||||
:repeater {}}))
|
||||
(when-not (:date-picker/date @state/state)
|
||||
(state/set-state! :date-picker/date (t/today))))
|
||||
(state/set-state! :date-picker/date (get ts :date (t/today)))))
|
||||
state)
|
||||
:will-unmount (fn [state]
|
||||
(clear-timestamp!)
|
||||
|
|
Loading…
Reference in New Issue