Skip to content

Commit 2660924

Browse files
committed
Add smoke test docs
1 parent 3a16d5f commit 2660924

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

β€Ždocs/Other Plugins/QuickAdd.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
publish: true
33
aliases:
4-
- Advanced/Quickadd
4+
- Advanced/Quickadd
55
---
66

77
# QuickAdd
88

99
<span class="related-pages">#plugin/quickadd</span>
1010

11-
## Launching the Edit task modal via QuickAdd
11+
## Launching the Create task modal via QuickAdd
1212

1313
This section shows how to use QuickAdd with the [[Create or edit Task]] modal to automatically add tasks to a specific file.
1414

@@ -24,7 +24,7 @@ Or if you would like a newline character to be added after your new task line, u
2424

2525
````markdown
2626
```js quickadd
27-
return await this.app.plugins.plugins['obsidian-tasks-plugin'].apiV1.createTaskLineModal() + '\n';
27+
return (await this.app.plugins.plugins['obsidian-tasks-plugin'].apiV1.createTaskLineModal()) + '\n';
2828
```
2929
````
3030

β€Žresources/sample_vaults/Tasks-Demo/Manual Testing/QuickAdd Tasks API Demo.mdβ€Ž

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,43 @@ It's modified to:
1111
## New Tasks
1212

1313
- [ ] #task Test task added via the API!
14+
15+
# Smoke Testing the Edit Task API
16+
17+
You can quickly verify that the `editTaskLineModal()` API works as expected using the Obsidian developer console.
18+
19+
You can test the API directly in the Obsidian console
20+
21+
1. Open the developer console in Obsidian (Cmd+Opt+I on Mac).
22+
2. Get access to the Tasks API by typing `this.app.plugins.plugins['obsidian-tasks-plugin'].apiV1` in the console.
23+
3. Use the `editTaskLineModal()` method to open the edit task modal with a sample task text.
24+
25+
## Edit Tasks
26+
27+
Edit Task Command:
28+
29+
```js
30+
const tasksApi = this.app.plugins.plugins['obsidian-tasks-plugin'].apiV1;
31+
let editedTaskLine = await tasksApi.editTaskLineModal('- [ ] #task Do every day πŸ”Ό πŸ” every day βž• 2025-07-06 ⏳ 2025-07-06');
32+
console.log(editedTaskLine);
33+
```
34+
35+
- [ ] #task Test Populated Values in Modal
36+
37+
1. Open modal with the sample task text above.
38+
2. Verify that the task properties are populated in the modal.
39+
3. Mark Task Done
40+
4. Expected
41+
42+
> - [ ] #task Do every day πŸ”Ό πŸ” every day ⏳ 2025-07-07
43+
> - [x] #task Do every day πŸ”Ό πŸ” every day βž• 2025-07-06 ⏳ 2025-07-06 βœ… 2025-07-06
44+
45+
- [ ] #task Reverse the order of Recurring tasks in the Tasks settings
46+
47+
1. Reverse the order of Recurring tasks in the Tasks settings
48+
2. Open modal with the sample task text above.
49+
3. Change the Status to Done
50+
4. Expected
51+
52+
> - [x] #task Do every day πŸ”Ό πŸ” every day βž• 2025-07-06 ⏳ 2025-07-06 βœ… 2025-07-06
53+
> - [ ] #task Do every day πŸ”Ό πŸ” every day ⏳ 2025-07-07

0 commit comments

Comments
Β (0)