summaryrefslogtreecommitdiff
path: root/subplot/jt.yaml
blob: a121ddf1d3b7a327cb5223d3f1d0b3f84f2fab45 (plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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