summaryrefslogtreecommitdiff
path: root/subplot/jt.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'subplot/jt.yaml')
-rw-r--r--subplot/jt.yaml115
1 files changed, 115 insertions, 0 deletions
diff --git a/subplot/jt.yaml b/subplot/jt.yaml
new file mode 100644
index 0000000..a121ddf
--- /dev/null
+++ b/subplot/jt.yaml
@@ -0,0 +1,115 @@
+- given: "an installed jt"
+ impl:
+ python:
+ function: install_jt
+
+- given: "an executable script {filename}"
+ types:
+ filename: file
+ impl:
+ python:
+ function: create_script
+
+- when: I invoke jt init (?P<dirname>\S+) (?P<journalname>\S+) "(?P<title>.*)"
+ types:
+ dirname: word
+ journalname: word
+ title: text
+ regex: true
+ impl:
+ python:
+ function: run_jt_init
+
+- when: I invoke jt list-journals
+ impl:
+ python:
+ function: run_jt_list_journals
+
+- when: I invoke jt is-journal {dirname}
+ impl:
+ python:
+ function: run_jt_is_journal
+
+- when: I invoke jt new "{title:text}" --editor=none --dirname={dirname}
+ impl:
+ python:
+ function: run_jt_new
+
+- when: "I invoke jt edit --editor={editor} --dirname={dirname}"
+ regex: false
+ impl:
+ python:
+ function: run_jt_edit
+
+- when: I invoke jt finish --dirname={dirname}
+ impl:
+ python:
+ function: run_jt_finish
+
+- when: I edit draft {draftno} in {dirname} to also contain "{text}"
+ impl:
+ python:
+ function: edit_draft
+
+- then: output contains "(?P<pattern>.*)"
+ types:
+ pattern: text
+ regex: true
+ impl:
+ python:
+ function: output_contains
+
+- then: there are no drafts in {dirname}
+ impl:
+ python:
+ function: journal_has_no_drafts
+
+- then: there is one draft in {dirname}
+ impl:
+ python:
+ function: journal_has_one_draft
+
+- then: there are two drafts in {dirname}
+ impl:
+ python:
+ function: journal_has_two_drafts
+
+- then: draft {draftno} in {dirname} contains "{pattern:text}"
+ impl:
+ python:
+ function: draft_contains_string
+
+- then: draft {draftno} in {dirname} links to "{topic}"
+ impl:
+ python:
+ function: draft_links_to_topic
+
+- then: there are no journal entries in {dirname}
+ impl:
+ python:
+ function: journal_has_no_entries
+
+- then: there is one journal entry in {dirname}, at {variable}
+ impl:
+ python:
+ function: journal_has_one_entry
+
+- then: there are two journal entries in {dirname}, at {variable1} and {variable2}
+ impl:
+ python:
+ function: journal_has_two_entries
+
+- then: journal entry <{variable}> contains "{pattern:text}"
+ impl:
+ python:
+ function: file_contains
+
+- then: file name <{varname}> ends with {suffix}
+ impl:
+ python:
+ function: file_name_has_suffix
+
+- then: there are no uncommitted changes in {dirname}
+ impl:
+ python:
+ function: git_is_clean