lazylead 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.docs/accuracy.md +2 -2
  3. data/.docs/duedate_expired.md +3 -3
  4. data/.docs/propagate_down.md +3 -3
  5. data/.gitattributes +1 -0
  6. data/Rakefile +2 -0
  7. data/bin/lazylead +1 -1
  8. data/lazylead.gemspec +2 -2
  9. data/lib/lazylead/exchange.rb +15 -8
  10. data/lib/lazylead/model.rb +35 -1
  11. data/lib/lazylead/opts.rb +12 -0
  12. data/lib/lazylead/schedule.rb +16 -15
  13. data/lib/lazylead/system/jira.rb +39 -0
  14. data/lib/lazylead/task/accuracy/accuracy.rb +4 -8
  15. data/lib/lazylead/task/accuracy/affected_build.rb +2 -6
  16. data/lib/lazylead/task/accuracy/attachment.rb +44 -0
  17. data/lib/lazylead/task/accuracy/environment.rb +39 -0
  18. data/lib/lazylead/task/accuracy/logs.rb +40 -0
  19. data/lib/lazylead/task/accuracy/records.rb +45 -0
  20. data/lib/lazylead/task/accuracy/requirement.rb +9 -0
  21. data/lib/lazylead/task/accuracy/servers.rb +50 -0
  22. data/lib/lazylead/task/accuracy/stacktrace.rb +63 -0
  23. data/lib/lazylead/task/accuracy/testcase.rb +75 -0
  24. data/lib/lazylead/task/accuracy/wiki.rb +41 -0
  25. data/lib/lazylead/task/echo.rb +18 -0
  26. data/lib/lazylead/task/fix_version.rb +9 -2
  27. data/lib/lazylead/task/touch.rb +23 -8
  28. data/lib/lazylead/version.rb +1 -1
  29. data/lib/messages/svn_log.erb +117 -0
  30. data/license.txt +1 -1
  31. data/readme.md +5 -5
  32. data/test/lazylead/cli/app_test.rb +11 -11
  33. data/test/lazylead/system/jira_test.rb +30 -0
  34. data/test/lazylead/task/accuracy/accuracy_test.rb +1 -1
  35. data/test/lazylead/task/accuracy/affected_build_test.rb +2 -2
  36. data/test/lazylead/task/accuracy/attachment_test.rb +50 -0
  37. data/test/lazylead/task/accuracy/environment_test.rb +42 -0
  38. data/test/lazylead/task/accuracy/logs_test.rb +78 -0
  39. data/test/lazylead/task/accuracy/records_test.rb +60 -0
  40. data/test/lazylead/task/accuracy/servers_test.rb +66 -0
  41. data/test/lazylead/task/accuracy/stacktrace_test.rb +113 -0
  42. data/test/lazylead/task/accuracy/testcase_test.rb +205 -0
  43. data/test/lazylead/task/accuracy/wiki_test.rb +40 -0
  44. data/test/lazylead/task/touch_test.rb +28 -1
  45. data/test/test.rb +16 -0
  46. data/upgrades/sqlite/001-install-main-lazylead-tables.sql +1 -5
  47. data/upgrades/sqlite/999.testdata.sql +12 -17
  48. metadata +28 -4
  49. data/.travis.yml +0 -16
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The MIT License
4
+ #
5
+ # Copyright (c) 2019-2020 Yurii Dubinka
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"),
9
+ # to deal in the Software without restriction, including without limitation
10
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
+ # and/or sell copies of the Software, and to permit persons to whom
12
+ # the Software is furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included
15
+ # in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
+ # OR OTHER DEALINGS IN THE SOFTWARE.
24
+
25
+ require_relative "../../../test"
26
+ require_relative "../../../../lib/lazylead/task/accuracy/records"
27
+
28
+ module Lazylead
29
+ class RecordsTest < Lazylead::Test
30
+ test "file has .mp4 extension" do
31
+ assert Records.new.passed(
32
+ OpenStruct.new(
33
+ attachments: [
34
+ OpenStruct.new(attrs: { "filename" => "failed case 1.mp4" })
35
+ ]
36
+ )
37
+ )
38
+ end
39
+
40
+ test "file has .avi extension" do
41
+ assert Records.new.passed(
42
+ OpenStruct.new(
43
+ attachments: [
44
+ OpenStruct.new(attrs: { "filename" => "failed case 2.avi" })
45
+ ]
46
+ )
47
+ )
48
+ end
49
+
50
+ test "file has .txt extension" do
51
+ refute Records.new.passed(
52
+ OpenStruct.new(
53
+ attachments: [
54
+ OpenStruct.new(attrs: { "filename" => "failed case 2.txt" })
55
+ ]
56
+ )
57
+ )
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The MIT License
4
+ #
5
+ # Copyright (c) 2019-2020 Yurii Dubinka
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"),
9
+ # to deal in the Software without restriction, including without limitation
10
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
+ # and/or sell copies of the Software, and to permit persons to whom
12
+ # the Software is furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included
15
+ # in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
+ # OR OTHER DEALINGS IN THE SOFTWARE.
24
+
25
+ require_relative "../../../test"
26
+ require_relative "../../../../lib/lazylead/task/accuracy/servers"
27
+
28
+ module Lazylead
29
+ class ServersTest < Lazylead::Test
30
+ class Task
31
+ def initialize(desc)
32
+ @desc = desc
33
+ end
34
+
35
+ def [](_)
36
+ ""
37
+ end
38
+
39
+ def description
40
+ @desc
41
+ end
42
+ end
43
+
44
+ test "url to failed entity found in description" do
45
+ assert Servers.new(envs: [%r{(http|https):\/\/\w+\:\d+\/.{10,}}]).passed(
46
+ Task.new(
47
+ "1. Open the dedicated app
48
+ 2. Click on https://server:6900/object?id=2000
49
+ ER: Object has no failed status
50
+ AR: Object has failed status"
51
+ )
52
+ )
53
+ end
54
+
55
+ test "url to failed entity not present in description" do
56
+ refute Servers.new(envs: [%r{(http|https):\/\/\w+\:\d+\/.{10,}}]).passed(
57
+ Task.new(
58
+ "1. Open the dedicated app
59
+ 2. Click on https://server:6900/
60
+ ER: Object has no failed status
61
+ AR: Object has failed status"
62
+ )
63
+ )
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,113 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The MIT License
4
+ #
5
+ # Copyright (c) 2019-2020 Yurii Dubinka
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"),
9
+ # to deal in the Software without restriction, including without limitation
10
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
+ # and/or sell copies of the Software, and to permit persons to whom
12
+ # the Software is furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included
15
+ # in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
+ # OR OTHER DEALINGS IN THE SOFTWARE.
24
+
25
+ require_relative "../../../test"
26
+ require_relative "../../../../lib/lazylead/task/accuracy/stacktrace"
27
+
28
+ module Lazylead
29
+ class StacktraceTest < Lazylead::Test
30
+ test "java stacktrace is found" do
31
+ assert Stacktrace.new.passed(
32
+ OpenStruct.new(
33
+ description: "
34
+ XXXXXX env: http://xxxx.xxx.com:00000/
35
+ WL log [^clust1.log]
36
+ http://xxx.xxx.com/display/xxx/SQLException+No+more+data+to+read+from+socket
37
+
38
+ During call we found in clust1.log the following error
39
+ {noformat}
40
+ at xxx.xxx.xxx.xxx.wrapper.XxxXxxXxxxXxx.xxxxXxxxXxxx(XxxXxxXxxxXxx.java:233)
41
+ at xxx.xxx.xxx.xxx.wrapper.XxxXxxXxxxXxx.xxxxXxxxXxxx(XxxXxxXxxxXxx.java:343)
42
+ ... 318 more
43
+ Caused by: javax.transaction.TransactionRolledbackException: EJB Exception: ; nested exception is:
44
+ javax.ejb.TransactionRolledbackLocalException: EJB Exception:
45
+ at weblogic.utils.StackTraceDisabled.unknownMethod()
46
+ Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception:
47
+ ... 1 more
48
+ Caused by: javax.ejb.EJBException: java.sql.SQLRecoverableException: No more data to read from socket
49
+ ... 1 more
50
+ Caused by: java.sql.SQLRecoverableException: No more data to read from socket
51
+ ... 1 more
52
+ {noformat}
53
+
54
+ The investigation is required.
55
+ More details here: XXXXX-xxxxxx"
56
+ )
57
+ )
58
+ end
59
+
60
+ test "stacktrace is found" do
61
+ assert Stacktrace.new.passed(
62
+ OpenStruct.new(
63
+ description: "
64
+ Stack Trace
65
+ {noformat}
66
+ javax.transaction.TransactionRolledbackException: EJB Exception: ; nested exception is:
67
+ java.lang.IllegalArgumentException: Unknown xxxx-xxx xxx \"xxx.xxx.xxx.configuration\"
68
+ at weblogic.ejb.container.internal.EJBRuntimeUtils.asTxRollbackException(EJBRuntimeUtils.java:134)
69
+ at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:595)
70
+ at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:537)
71
+ at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:365)
72
+ at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:20)
73
+ at weblogic.ejb.container.internal.BaseRemoteObject.__WL_postInvokeTxRetry(BaseRemoteObject.java:307)
74
+ at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invokeInternal(SessionRemoteMethodInvoker.java:67)
75
+ at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:21)
76
+ at xxx.xxxx.xxxxxx.xxx.xxx.XxxxXxxxXxxxXxxxxxx.xxxxXxxxXXxxxx(Unknown Source)
77
+ at xxxx.xxxxxx.xxxxx.xxx.xxxxxx.xxx.xxxxxxxx.xxxx.xxxxxx.XxxxxXxxxx.xxxXxxxXxxxx(XxxxXxxxXxxx.java:677)
78
+ at xxxx.xxxxxx.xxxxx.xxx.xxxxxx.xxx.xxxxxxxx.xxxx.xxxxxx.XxxxxXxxxx.xxxXxxxXxxxx(XxxxXxxxXxxx.java:304)
79
+ at xxxx.xxxxxx.xxxxx.xxx.xxxxxx.xxx.xxxxxxxx.xxxx.xxxxxx.XxxxxXxxxx.xxxXxxxXxxxx(XxxxXxxxXxxx.java:75)
80
+ at xxxx.xxxxxx.xxxxx.xxx.xxxxxx.xxx.xxxxxxxx.xxxx.xxxxxx.XxxxxXxxxx.xxxXxxxXxxxx(XxxxXxxxXxxx.java:138)
81
+ at sun.reflect.GeneratedMethodAccessor2010.invoke(Unknown Source)
82
+ {noformat}
83
+
84
+ Log file - [^clust3.log]
85
+
86
+ Path to log file
87
+ {noformat}
88
+ \\ftp.server.com\\logs.tgz
89
+ {noformat}
90
+
91
+ Server link - http://xxxxxXxxXxxx:0000
92
+
93
+ !214.png|thumbnail!"
94
+ )
95
+ )
96
+ end
97
+
98
+ test "ORA error is found" do
99
+ assert Stacktrace.new.passed(
100
+ OpenStruct.new(
101
+ description: "
102
+ {noformat}
103
+ @XXXX/xxx/xxx/xxxx_xxx_xxxxx_xxx_xx.sql
104
+ ORA-02291: 1 integrity constraint (XXX_XXX_XXX.XX_xxx) violated - xx xxx not found for xx_xx=xx xxxxx_xx=XXXXXXX xxxxx=XXXXXXXX xxx_xx=xxx xx_xxx=xxxx.xxx.xxx.xxxxx.xxx.xxx.xxxxx
105
+ XXXX-xxx-xxxx: xxxxx xxxxx Xxxxx xxxx Xxxx
106
+ {noformat}
107
+
108
+ XXXX - XXX_XXX.X.XXXX.XXXX.XXXX.XxxxxxXX.X_xxxXXXXXX"
109
+ )
110
+ )
111
+ end
112
+ end
113
+ end
@@ -0,0 +1,205 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The MIT License
4
+ #
5
+ # Copyright (c) 2019-2020 Yurii Dubinka
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"),
9
+ # to deal in the Software without restriction, including without limitation
10
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
+ # and/or sell copies of the Software, and to permit persons to whom
12
+ # the Software is furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included
15
+ # in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
+ # OR OTHER DEALINGS IN THE SOFTWARE.
24
+
25
+ require_relative "../../../test"
26
+ require_relative "../../../../lib/lazylead/task/accuracy/testcase"
27
+
28
+ module Lazylead
29
+ class TestcaseTest < Lazylead::Test
30
+ test "test case header is absent" do
31
+ refute testcase? "1. Lorem Ipsum is
32
+ 2. Text of the printing (and typesetting industry. Lorem Ipsum)
33
+ 3. has been the industry's standard dummy text ever since the 1500s
34
+ 4. When an unknown
35
+ 5. Printer took a galley of type and scrambled it to make a type specimen book
36
+ ER: It has survived not only five centuries
37
+ AR: but also the leap into electronic typesetting, remaining essentially unchanged -
38
+ {code:java}
39
+ xxx.xxxxx.xxxxxx.xxxx.xxx.XxxxXxxxXxxXX: xxxx xxx xxx XX xxxxxx xxxxx XXXxxxXXxxXxxXxx]
40
+ {code}"
41
+ end
42
+
43
+ test "er on the next line" do
44
+ assert testcase? "TC:
45
+ 1. It was popularised in the 1960s ;
46
+ 2. With the release of Letraset sheets containing 'Lorem Ipsum passages'
47
+ !xxxx-xxx.png|thumbnail!
48
+
49
+ 3. and more recently with desktop 'publishing software li'ke Aldus PageMaker including version;
50
+
51
+ ER:
52
+ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots.
53
+
54
+ AR:
55
+
56
+ {code:java}
57
+ Xxxxxx
58
+ Xxxxx xxx xxx xxxx xxxx xx xxx.
59
+ {code}
60
+
61
+ !xxxx-x-x-x-x-x-xxx.png|thumbnail!"
62
+ end
63
+
64
+ test "tc ar er case 1" do
65
+ assert testcase? "*Preconditions:*
66
+ # XXX+ Xxxxx Xxxxxxx XX[http://xxx.xxx.xxx:0000/xx/xxx.jsp?xx=_xxx]
67
+ # Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia,
68
+
69
+ *Test steps:*
70
+ # Lorem Ipsum comes from sections 1.10.32 and 1.10.33
71
+ # This book is a treatise on the theory of ethics (very popular )
72
+ !xxx.png|width=514,height=262!
73
+ # The first line of Lorem Ipsum, 'Lorem ipsum dolor sit amet..'
74
+ *ER: The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those intereste*
75
+ *!xxx-xx-xx.png|width=535,height=61!*
76
+ # Sections 1.10.32 and 1.10.33 from 'de Finibus Bonorum et Malorum' by Cicero are also > xxxx
77
+ *ER: It is a long established fact that a reader will be distracted by the
78
+ *!xxxxxxxx-xxx-x-xx.png|width=826,height=167!*
79
+ *!xxxxxx-xxx-xx-xxx.png|width=373,height=59!*
80
+ #  The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters,
81
+
82
+ *ER: As opposed to using 'Content here, content here', making *
83
+ *AR: it look like readable English *
84
+ *!xxxxx-xx-x-x-xxx.png|width=1062,height=272!*
85
+
86
+ *[^xxx-xxxx.log]*
87
+
88
+ [^xxxxxx.LOG]"
89
+ end
90
+
91
+ test "tc ar er case 2" do
92
+ assert testcase? "*Pre-requisites:*
93
+ Many desktop publishing packages.
94
+
95
+ *TC:*
96
+ # Various versions have evolved over the years,
97
+ # sometimes by accident,
98
+ # sometimes on purpose (injected humour and the like).
99
+
100
+ *ER:*  !ER.png|thumbnail!
101
+
102
+ *AR:* There are many variations of passages of Lorem Ipsum available,
103
+
104
+ !AR.png|thumbnail!
105
+
106
+ *LOGS [^xXXxxx.zip]*
107
+
108
+ Randomised words which don't look even slightly believable: http://xxx.xxx.xxx:0000/xxx/xxx.jsp#!board;xxxxxXx=xxxxx;xxxxXxx=xxx;xxxxXx=xxxxxx
109
+ If you are going to use a passage: http://xxx.xxx.xxx:0000"
110
+ end
111
+
112
+ test "tc ar er case 3" do
113
+ assert testcase? "*Preconditions:*
114
+ # All the Lorem Ipsum generators on the Internet
115
+ # tend to repeat predefined chunks as necessary, (x xx xxxx)
116
+ # making this the first true generator on the Internet.
117
+ # It uses a dictionary of over 200 Latin words,
118
+ # combined with a handful of model sentence structures,
119
+
120
+ *Test case:*
121
+ 1. to generate Lorem Ipsum which looks reasonable -> generated Lorem Ipsum -> is therefore always free from repetition (xxx xxxx)
122
+ 2. [injected humour], or non-characteristic words etc.
123
+ 3. Lorem ipsum dolor sit amet, consectetur [adipiscing] elit
124
+ 4. sed do eiusmod [tempor] incididunt ut 'labore' et dolore magna aliqua
125
+ 5. Ut enim ad minim veniam,
126
+ 6. Quis nostrud exercitation ullamco laboris
127
+
128
+ *ER =* Duis aute irure dolor in reprehenderit: [Voluptate Velit].[dolore] = eu fugiat nulla pariatur
129
+
130
+ *AR =* Excepteur sint occaecat Cupidatat
131
+
132
+   !image-2020-09-04-18-24-26-052.png|thumbnail!
133
+
134
+ !image-2020-09-04-18-24-51-729.png|thumbnail!
135
+
136
+ !image-2020-09-04-18-26-01-262.png|thumbnail!
137
+
138
+ XXX_XXX.x.XXXX.XXXX.XX.XxxxXX_xxxXXXXX
139
+
140
+ [http://xxxx.xxx:0000/xxx/xx.jsp#xxxXxx=xxxx;xxxXxx=xxx]"
141
+ end
142
+
143
+ test "tc ar er case 4" do
144
+ assert testcase? "*Preconditions*
145
+ 1. Sed ut perspiciatis unde omnis iste
146
+ 2. Natus error sit voluptatem accusantium doloremque
147
+
148
+ *Test Steps*
149
+ 1. laudantium, totam → rem aperiam → eaque ipsa → 'quae ab illo ' 
150
+ 2. inventore veritatis et quasi architecto beatae
151
+
152
+ *ER* = Nemo enim ipsam voluptatem
153
+
154
+ *AR* = Neque porro quisquam est, qui dolorem ipsum quia dolor sit
155
+
156
+ !image-2020-09-04-18-45-10-682.png|thumbnail!
157
+
158
+ [http://xxxx.xxx:0000/xxx/xxx.jsp?xxx=xxxx#xxxXxx=xxx;xxxXxx=xxxxxx]
159
+ Ut enim ad minima veniam, quis nostrum exercitationem"
160
+ end
161
+
162
+ test "tc ar er case 5" do
163
+ assert testcase? "*Preconditions*
164
+ 1. But I must explain to you how all
165
+ 2. this mistaken idea of denouncing pleasure
166
+
167
+ *Test Steps*
168
+ 1. And praising → pain was → born and I will give
169
+ 2. Nor again is there anyone who loves or pursues or desires to obtain pain
170
+
171
+ *ER* = To take a trivial example,
172
+
173
+ *AR* = Which of us ever undertakes laborious physical exercise
174
+
175
+ !image-2020-xx-xx-xx-xx-xx-xxx.png|thumbnail!
176
+
177
+ [http://xxx.xxx:0000/xxx/xxx.jsp?xxx=xxxx;xxxXx=4428;xxxXx=xxxx]
178
+ except to obtain some advantage from it? "
179
+ end
180
+
181
+ test "tc ar er case 6" do
182
+ assert testcase? "[https://xxxx.xxxx.xxx.com/]
183
+
184
+ *Precondition:* But who has any right to find fault with a man who chooses
185
+
186
+ *TC:*
187
+ # njoy a pleasure that has no annoying consequences, : [yyyyyy.zzz.com|https://xxx.yyyy.com/]
188
+ # At vero eos et accusamus et iusto odio dignissimos: 8443286573113926860
189
+ # ducimus qui blanditiis [praesentium]
190
+ # Et harum quidem rerum facilis est et expedita distinctio.
191
+ # Nam libero tempore, cum soluta nobis est eligendi
192
+
193
+ *ER:* omnis voluptas assumenda est,
194
+
195
+ *AR:* omnis dolor repellendus.
196
+
197
+ [^screenshot-1.png]"
198
+ end
199
+
200
+ # ensure that issue description has a test case, AR and ER
201
+ def testcase?(desc)
202
+ Testcase.new.passed(OpenStruct.new(description: desc))
203
+ end
204
+ end
205
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The MIT License
4
+ #
5
+ # Copyright (c) 2019-2020 Yurii Dubinka
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"),
9
+ # to deal in the Software without restriction, including without limitation
10
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
+ # and/or sell copies of the Software, and to permit persons to whom
12
+ # the Software is furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included
15
+ # in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
+ # OR OTHER DEALINGS IN THE SOFTWARE.
24
+
25
+ require_relative "../../../test"
26
+ require_relative "../../../../lib/lazylead/task/accuracy/wiki"
27
+
28
+ module Lazylead
29
+ class WikiTest < Lazylead::Test
30
+ test "wiki reference is present" do
31
+ assert Wiki.new.passed(
32
+ OpenStruct.new(
33
+ remote_links: [
34
+ OpenStruct.new(attrs: { "relationship" => "Wiki Page" })
35
+ ]
36
+ )
37
+ )
38
+ end
39
+ end
40
+ end