-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_day_modal.lua
More file actions
82 lines (74 loc) · 2.18 KB
/
test_day_modal.lua
File metadata and controls
82 lines (74 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
-- Test script for calendar day detail modal
vim.cmd("set runtimepath+=.")
-- Load the do-it module
local doit = require("doit")
-- Setup with calendar module
doit.setup({
modules = {
calendar = {
enabled = true,
default_view = "week",
}
}
})
-- Create some test events for today
local calendar_module = doit.get_module("calendar")
if calendar_module then
local today = os.date("%Y-%m-%d")
local tomorrow = calendar_module.state.add_days(today, 1)
-- Mock some events
local mock_events = {
{
date = today,
title = "Team Standup Meeting",
start_time = "09:00",
end_time = "09:30",
location = "Conference Room A",
calendar = "Work",
all_day = false,
},
{
date = today,
title = "Lunch with Client",
start_time = "12:00",
end_time = "13:30",
location = "Downtown Restaurant",
calendar = "Work",
all_day = false,
},
{
date = today,
title = "Birthday Party",
all_day = true,
calendar = "Personal",
},
{
date = tomorrow,
title = "Project Review",
start_time = "14:00",
end_time = "15:00",
tentative = true,
location = "Zoom",
calendar = "Work",
all_day = false,
},
}
-- Set the mock events
calendar_module.state.set_events(mock_events)
print("Calendar module setup complete")
print("Opening calendar in week view...")
-- Open the calendar
vim.defer_fn(function()
calendar_module.toggle()
print("Calendar opened. Testing keys:")
print("- Press '1' to see Sunday's events")
print("- Press '2' to see Monday's events")
print("- Press '3' to see Tuesday's events")
print("- etc...")
print("- Press 'q' to close the day detail modal")
print("- Press '3' to switch to 3-day view")
print("- In 3-day view, press 1-3 to see day details")
end, 100)
else
print("Failed to load calendar module")
end