Dever v0.0.2
This commit is contained in:
commit
e6e175ebcf
816 files changed
+120349
No files matched your search
@@ -0,0 +1,20 @@
|
||||
flow discussion() ()
|
||||
| step | kind | do |
|
||||
| article | flow | app.create("讨论文章", "正文") |
|
||||
| - | flow | app.publish(article.id) |
|
||||
| first | flow | app.comment(article.id, "小明", "写得好") |
|
||||
| second | flow | app.comment(article.id, "小红", "广告内容") |
|
||||
| - | calc | assertEq(first.status, data.comment.Status.Pending) |
|
||||
| pending | flow | app.comments(article.id, 1) |
|
||||
| - | calc | assertEq(pending.total, 0) |
|
||||
| - | flow | app.moderate(first.id, true) |
|
||||
| - | flow | app.moderate(second.id, false) |
|
||||
| visible | flow | app.comments(article.id, 1) |
|
||||
| - | calc | assertEq(visible.total, 1) |
|
||||
| category | flow | app.createCategory("新闻") |
|
||||
| - | flow | app.assignCategory(article.id, category.id) |
|
||||
| assigned | flow | app.detail(article.id) |
|
||||
| - | calc | assertEq(assigned.category_id, category.id) |
|
||||
| - | flow | app.unpublish(article.id) |
|
||||
| hidden | flow | app.browse(1) |
|
||||
| - | calc | assertEq(hidden.total, 0) |
|
||||
@@ -0,0 +1,21 @@
|
||||
flow publishing() ()
|
||||
| step | kind | do |
|
||||
| created | flow | app.create(" 第一篇 ", "原始正文") |
|
||||
| - | calc | assertEq(created.title, "第一篇") |
|
||||
| - | calc | assertEq(created.status, data.Status.Draft) |
|
||||
| drafts | flow | app.browse(1) |
|
||||
| - | calc | assertEq(drafts.total, 0) |
|
||||
| - | flow | app.edit(created.id, "修改后的标题", "修改后的正文") |
|
||||
| - | flow | app.publish(created.id) |
|
||||
| published | flow | app.detail(created.id) |
|
||||
| - | calc | assertEq(published.status, data.Status.Published) |
|
||||
| - | calc | assertEq(published.title, "修改后的标题") |
|
||||
| - | calc | assert(published.published_at != null) |
|
||||
| visible | flow | app.browse(1) |
|
||||
| - | calc | assertEq(visible.total, 1) |
|
||||
| - | flow | app.unpublish(created.id) |
|
||||
| hidden | flow | app.browse(1) |
|
||||
| - | calc | assertEq(hidden.total, 0) |
|
||||
| - | flow | app.remove(created.id) |
|
||||
| remaining | flow | app.list(1) |
|
||||
| - | calc | assertEq(remaining.total, 0) |
|
||||
Reference in new issue
Block a user