silence 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,298 @@
1
+
2
+ /* cucumber.css is generated from cucumber.sass */
3
+ /* Regenerate with rake sass */
4
+ body {
5
+ font-size: 0px;
6
+ color: white;
7
+ margin: 0px;
8
+ padding: 0px;
9
+ }
10
+
11
+ .cucumber, td, th {
12
+ font: normal 11px "Lucida Grande", Helvetica, sans-serif;
13
+ background: white;
14
+ color: black;
15
+ }
16
+ .cucumber #cucumber-header, td #cucumber-header, th #cucumber-header {
17
+ background: #65c400;
18
+ color: white;
19
+ height: 6em;
20
+ }
21
+ .cucumber #cucumber-header #expand-collapse p, td #cucumber-header #expand-collapse p, th #cucumber-header #expand-collapse p {
22
+ float: right;
23
+ margin: 0 0 0 10px;
24
+ }
25
+ .cucumber .scenario h3, td .scenario h3, th .scenario h3, .background h3 {
26
+ font-size: 11px;
27
+ padding: 3px;
28
+ margin: 2px 0;
29
+ background: #356600;
30
+ color: white;
31
+ font-weight: bold;
32
+ }
33
+
34
+ .background h3 {
35
+ font-size: 1.2em;
36
+ background: #666;
37
+ }
38
+
39
+ .cucumber h1, td h1, th h1 {
40
+ margin: 0px 10px 0px 10px;
41
+ padding: 10px;
42
+ font-family: "Lucida Grande", Helvetica, sans-serif;
43
+ font-size: 2em;
44
+ position: absolute;
45
+ }
46
+ .cucumber h4, td h4, th h4 {
47
+ margin-bottom: 2px;
48
+ }
49
+ .cucumber div.feature, td div.feature, th div.feature {
50
+ padding: 2px;
51
+ margin: 0px 10px 5px 10px;
52
+ }
53
+ .cucumber div.examples, td div.examples, th div.examples {
54
+ padding: 0em 0em 0em 1em;
55
+ }
56
+ .cucumber .stats, td .stats, th .stats {
57
+ margin: 2em;
58
+ }
59
+ .cucumber .summary ul.features li, td .summary ul.features li, th .summary ul.features li {
60
+ display: inline;
61
+ }
62
+ .cucumber .step_name, td .step_name, th .step_name {
63
+ float: left;
64
+ }
65
+ .cucumber .step_file, td .step_file, th .step_file {
66
+ text-align: right;
67
+ color: #999999;
68
+ }
69
+ .cucumber .step_file a, td .step_file a, th .step_file a {
70
+ color: #999999;
71
+ }
72
+ .cucumber .scenario_file, td .scenario_file, th .scenario_file {
73
+ float: right;
74
+ color: #999999;
75
+ }
76
+ .cucumber .tag, td .tag, th .tag {
77
+ font-weight: bold;
78
+ color: #246ac1;
79
+ }
80
+ .cucumber .backtrace, td .backtrace, th .backtrace {
81
+ margin-top: 0;
82
+ margin-bottom: 0;
83
+ margin-left: 0em;
84
+ color: black;
85
+ }
86
+ .cucumber a, td a, th a {
87
+ text-decoration: none;
88
+ color: #be5c00;
89
+ }
90
+ .cucumber a:hover, td a:hover, th a:hover {
91
+ text-decoration: underline;
92
+ }
93
+ .cucumber a:visited, td a:visited, th a:visited {
94
+ font-weight: normal;
95
+ }
96
+ .cucumber a div.examples, td a div.examples, th a div.examples {
97
+ margin: 5px 0px 5px 15px;
98
+ color: black;
99
+ }
100
+ .cucumber .outline table, td .outline table, th .outline table {
101
+ margin: 0px 0px 5px 10px;
102
+ }
103
+ .cucumber table, td table, th table {
104
+ border-collapse: collapse;
105
+ }
106
+ .cucumber table td, td table td, th table td {
107
+ padding: 3px 3px 3px 5px;
108
+ }
109
+ .cucumber table td.failed, .cucumber table td.passed, .cucumber table td.skipped, .cucumber table td.pending, .cucumber table td.undefined, td table td.failed, td table td.passed, td table td.skipped, td table td.pending, td table td.undefined, th table td.failed, th table td.passed, th table td.skipped, th table td.pending, th table td.undefined {
110
+ padding-left: 18px;
111
+ padding-right: 10px;
112
+ }
113
+ .cucumber table td.failed, td table td.failed, th table td.failed {
114
+ border-left: 5px solid #c20000;
115
+ border-bottom: 1px solid #c20000;
116
+ background: #fffbd3;
117
+ color: #c20000;
118
+ }
119
+ .cucumber table td.passed, td table td.passed, th table td.passed {
120
+ border-left: 5px solid #65c400;
121
+ border-bottom: 1px solid #65c400;
122
+ background: #dbffb4;
123
+ color: #3d7700;
124
+ }
125
+ .cucumber table td.skipped, td table td.skipped, th table td.skipped {
126
+ border-left: 5px solid aqua;
127
+ border-bottom: 1px solid aqua;
128
+ background: #e0ffff;
129
+ color: #001111;
130
+ }
131
+ .cucumber table td.pending, td table td.pending, th table td.pending {
132
+ border-left: 5px solid #faf834;
133
+ border-bottom: 1px solid #faf834;
134
+ background: #fcfb98;
135
+ color: #131313;
136
+ }
137
+ .cucumber table td.undefined, td table td.undefined, th table td.undefined {
138
+ border-left: 5px solid #faf834;
139
+ border-bottom: 1px solid #faf834;
140
+ background: #fcfb98;
141
+ color: #131313;
142
+ }
143
+ .cucumber table td.message, td table td.message, th table td.message {
144
+ border-left: 5px solid aqua;
145
+ border-bottom: 1px solid aqua;
146
+ background: #e0ffff;
147
+ color: #001111;
148
+ }
149
+ .cucumber ol, td ol, th ol {
150
+ list-style: none;
151
+ margin: 0px;
152
+ padding: 0px;
153
+ }
154
+ .cucumber ol li.step, td ol li.step, th ol li.step {
155
+ padding: 3px 3px 3px 18px;
156
+ margin: 5px 0px 5px 5px;
157
+ }
158
+ .cucumber ol li, td ol li, th ol li {
159
+ margin: 0em 0em 0em 1em;
160
+ padding: 0em 0em 0em 0.2em;
161
+ }
162
+ .cucumber ol li span.param, td ol li span.param, th ol li span.param {
163
+ font-weight: bold;
164
+ }
165
+ .cucumber ol li.failed, td ol li.failed, th ol li.failed {
166
+ border-left: 5px solid #c20000;
167
+ border-bottom: 1px solid #c20000;
168
+ background: #fffbd3;
169
+ color: #c20000;
170
+ }
171
+ .cucumber ol li.passed, td ol li.passed, th ol li.passed {
172
+ border-left: 5px solid #65c400;
173
+ border-bottom: 1px solid #65c400;
174
+ background: #dbffb4;
175
+ color: #3d7700;
176
+ }
177
+ .cucumber ol li.skipped, td ol li.skipped, th ol li.skipped {
178
+ border-left: 5px solid aqua;
179
+ border-bottom: 1px solid aqua;
180
+ background: #e0ffff;
181
+ color: #001111;
182
+ }
183
+ .cucumber ol li.pending, td ol li.pending, th ol li.pending {
184
+ border-left: 5px solid #faf834;
185
+ border-bottom: 1px solid #faf834;
186
+ background: #fcfb98;
187
+ color: #131313;
188
+ }
189
+ .cucumber ol li.undefined, td ol li.undefined, th ol li.undefined {
190
+ border-left: 5px solid #faf834;
191
+ border-bottom: 1px solid #faf834;
192
+ background: #fcfb98;
193
+ color: #131313;
194
+ }
195
+ .cucumber ol li.message, td ol li.message, th ol li.message {
196
+ border-left: 5px solid aqua;
197
+ border-bottom: 1px solid aqua;
198
+ background: #e0ffff;
199
+ color: #001111;
200
+ margin-left: 10px;
201
+ white-space: pre;
202
+ }
203
+ .cucumber #summary, td #summary, th #summary {
204
+ margin: 0px;
205
+ padding: 5px 10px;
206
+ text-align: right;
207
+ top: 0px;
208
+ right: 0px;
209
+ float: right;
210
+ }
211
+ .cucumber #summary p, td #summary p, th #summary p {
212
+ margin: 0 0 0 2px;
213
+ }
214
+ .cucumber #summary #totals, td #summary #totals, th #summary #totals {
215
+ font-size: 1.2em;
216
+ }
217
+
218
+ .ruby {
219
+ font-size: 12px;
220
+ font-family: monospace;
221
+ color: white;
222
+ background: black;
223
+ padding: 0.1em 0 0.2em 0;
224
+ }
225
+ .ruby .keyword {
226
+ color: #ff6600;
227
+ }
228
+ .ruby .constant {
229
+ color: #339999;
230
+ }
231
+ .ruby .attribute {
232
+ color: white;
233
+ }
234
+ .ruby .global {
235
+ color: white;
236
+ }
237
+ .ruby .module {
238
+ color: white;
239
+ }
240
+ .ruby .class {
241
+ color: white;
242
+ }
243
+ .ruby .string {
244
+ color: #66ff00;
245
+ }
246
+ .ruby .ident {
247
+ color: white;
248
+ }
249
+ .ruby .method {
250
+ color: #ffcc00;
251
+ }
252
+ .ruby .number {
253
+ color: white;
254
+ }
255
+ .ruby .char {
256
+ color: white;
257
+ }
258
+ .ruby .comment {
259
+ color: #9933cc;
260
+ }
261
+ .ruby .symbol {
262
+ color: white;
263
+ }
264
+ .ruby .regex {
265
+ color: #44b4cc;
266
+ }
267
+ .ruby .punct {
268
+ color: white;
269
+ }
270
+ .ruby .escape {
271
+ color: white;
272
+ }
273
+ .ruby .interp {
274
+ color: white;
275
+ }
276
+ .ruby .expr {
277
+ color: white;
278
+ }
279
+ .ruby .offending {
280
+ background: #333333;
281
+ }
282
+ .ruby .linenum {
283
+ width: 75px;
284
+ padding: 0.1em 1em 0.2em 0;
285
+ color: black;
286
+ background: #fffbd3;
287
+ }
288
+
289
+ .tag_in_title {
290
+ background: #FFFF66;
291
+ border-radius: 3px;
292
+ color: #000000;
293
+ padding: 0 2px;
294
+ margin: 0 2px;
295
+ }
296
+ .known_bug_title {
297
+ background: #B0B0B0 !important;
298
+ }
@@ -0,0 +1,314 @@
1
+ (function($){
2
+ $(document).ready(function() {
3
+ SagreHtmlReport.init()
4
+ $(SagreHtmlReport.SCENARIO_HEADER_LOCATOR).css('cursor', 'pointer');
5
+
6
+ $(SagreHtmlReport.SCENARIO_HEADER_LOCATOR).click(function() {
7
+ SagreHtmlReport.toggleScenarioDetails(this.parentNode)
8
+ });
9
+
10
+ $("#show-only-failed-scenarios-action").click(function() {
11
+ SagreHtmlReport.showOnlyFailedScenarios()
12
+ });
13
+
14
+ $(".steps-action").click(function() {
15
+ SagreHtmlReport.toggleScenarioSteps(this)
16
+ });
17
+
18
+ $("#show-only-passed-scenarios-action").click(function() {
19
+ SagreHtmlReport.showOnlyPassedScenarios()
20
+ SagreHtmlReport.setShowMode(SagreHtmlReport.SHOW_ONLY_PASSED)
21
+ });
22
+
23
+ $("#show-all-scenarios-action").click(function() {
24
+ SagreHtmlReport.showAllScenarios();
25
+ SagreHtmlReport.setShowMode(SagreHtmlReport.SHOW_ALL)
26
+ });
27
+
28
+ $("#expand-all-scenarios-action").click(function() {
29
+ SagreHtmlReport.expandAll()
30
+ });
31
+ $("#collapse-all-scenarios-action").click(function() {
32
+ SagreHtmlReport.collapseAll()
33
+ });
34
+ $("#expand-only-failed-scenarios-action").click(function() {
35
+ SagreHtmlReport.expandOnlyFailedScenarios()
36
+ });
37
+ $("#expand-only-pending-scenarios-action").click(function() {
38
+ SagreHtmlReport.expandOnlyPendingScenarios()
39
+ });
40
+ $("#expand-only-successful-scenarios-action").click(function() {
41
+ SagreHtmlReport.expandOnlySuccessfulScenarios();
42
+ });
43
+
44
+ $("#toggle-backtrace-action").click(function() {
45
+ return SagreHtmlReport.toggleAllBacktrace()
46
+ });
47
+
48
+ $(".backtrace-action").click(function() {
49
+ return SagreHtmlReport.toggleBacktrace(this)
50
+ });
51
+
52
+ $("#toggle-ruby-code-action").click(function() {
53
+ SagreHtmlReport.toggleAllRubyCode();
54
+ });
55
+
56
+ $(".ruby-action").click(function() {
57
+ SagreHtmlReport.toggleRubyCode(this)
58
+ });
59
+
60
+ $(SagreHtmlReport.onlyKnownFailsSelector).click(function() {
61
+ SagreHtmlReport.toggleKnownFails()
62
+ });
63
+
64
+ $(SagreHtmlReport.unknownFailsSelector).click(function() {
65
+ SagreHtmlReport.toggleUnknownFails()
66
+ });
67
+
68
+ SagreHtmlReport.collapseAll();
69
+ if (SagreHtmlReport.urlAnchor()) {
70
+ SagreHtmlReport.toggleScenarioDetails(jQuery(SagreHtmlReport.urlAnchor()).children('h3'))
71
+ }
72
+ })
73
+ })(jQuery);
74
+
75
+ function moveProgressBar(percentDone) {
76
+ // Current default functionality does not work correctly. Final width of header is is more than 100%
77
+ //SagreHtmlReport.moveProgressBar(percentDone)
78
+ }
79
+
80
+ SagreHtmlReport = {
81
+
82
+ // This method sets default values. It is like a constructor
83
+ init: function() {
84
+ this._showMode = this.SHOW_ALL;
85
+ },
86
+
87
+ SHOW_ALL: 'SHOW_ALL',
88
+ SHOW_ONLY_FAILED: 'SHOW_ONLY_FAILED',
89
+ SHOW_ONLY_PASSED: 'SHOW_ONLY_PASSED',
90
+
91
+ STATUS_TYPES: 'pending skipped failed',
92
+
93
+ rubyCodeSelector: 'div.scenario::visible pre.ruby, div.background::visible pre.ruby',
94
+
95
+ SCENARIOS_LOCATOR: "h3[id^='scenario_'],h3[id^=background_]",
96
+
97
+ SCENARIO_HEADER_LOCATOR: '.scenario_header, .background_header',
98
+
99
+ SCENARIO_DETAILS_LOCATOR: '.steps,.examples,.steps-action-container',
100
+
101
+ urlAnchor: function() {
102
+ return window.location.hash
103
+ },
104
+ goToBuild: function(buildUrl, pattern) {
105
+ if(buildUrl.search(pattern)) {
106
+ targetUrl=buildUrl;
107
+ } else {
108
+ // Removes '../' from buildUrl if report was opened in Jenkins from main page of a job.
109
+ targetUrl=buildUrl.substr(3);
110
+ }
111
+ window.location.href = targetUrl;
112
+ },
113
+
114
+ addTag: function(element_id, bug_id) {
115
+ var newTag = jQuery('<span>', {
116
+ class: 'tag known_bug'
117
+ });
118
+
119
+ var newTagLink = jQuery('<a>', {
120
+ class: 'tag',
121
+ target: '_blank',
122
+ href: 'http://prj.adyax.com/issues/' + bug_id,
123
+ text: '@known_bug_#' + bug_id
124
+ });
125
+
126
+ jQuery(newTag).prepend(newTagLink)
127
+ jQuery('#'+element_id).prepend(newTag)
128
+ },
129
+
130
+ makeRed: function(element_id) {
131
+ jQuery('#'+element_id).removeClass(this.STATUS_TYPES).addClass('failed');
132
+ },
133
+ makeBlue: function(element_id) {
134
+ jQuery('#'+element_id+':not(.failed)').removeClass(this.STATUS_TYPES).addClass('skipped');
135
+ },
136
+ makeYellow: function(element_id) {
137
+ jQuery('#'+element_id+':not(.failed), #'+element_id+':not(.skipped)').removeClass(this.STATUS_TYPES).addClass('pending');
138
+ },
139
+ makeScenario: function(scenario_number, status) {
140
+ jQuery('#scenario_'+ scenario_number).removeClass(this.STATUS_TYPES).addClass(status)
141
+ },
142
+ makeBackground: function(scenario_number, status) {
143
+ jQuery('#background_'+ scenario_number).addClass(status)
144
+ },
145
+
146
+ moveProgressBar: function(percentDone) {
147
+ jQuery("#cucumber-header").css('width', percentDone +"%");
148
+ },
149
+
150
+ toggleScenarioDetails: function(scenario_item) {
151
+ jQuery(scenario_item).parent().children(this.SCENARIO_DETAILS_LOCATOR).toggle(250);
152
+ },
153
+
154
+ toggleScenarioSteps: function(steps_action) {
155
+ if (jQuery(steps_action).text() == 'Show Steps') {
156
+ jQuery(steps_action).text('Hide Steps');
157
+ jQuery(steps_action).parent().parent().children('ol.steps').removeClass('hide-steps');
158
+ } else {
159
+ jQuery(steps_action).text('Show Steps');
160
+ jQuery(steps_action).parent().parent().children('ol.steps').addClass('hide-steps');
161
+ }
162
+ },
163
+
164
+ getShowMode: function() {
165
+ return this._showMode;
166
+ },
167
+ setShowMode: function(showMode) {
168
+ this._showMode = showMode
169
+ },
170
+ showAllScenarios: function() {
171
+ jQuery('div.scenario').show();
172
+ this.setShowMode(SagreHtmlReport.SHOW_ALL)
173
+ },
174
+ showOnlyFailedScenarios: function() {
175
+ jQuery('div.scenario.failed').show();
176
+ jQuery('div.scenario:not(.failed)').hide();
177
+ this.setShowMode(SagreHtmlReport.SHOW_ONLY_FAILED)
178
+ },
179
+
180
+ showOnlyPassedScenarios: function() {
181
+ jQuery('div.scenario:not(.failed):not(.pending)').show();
182
+ jQuery('div.scenario.failed, div.scenario.pending').hide();
183
+ this.setShowMode(SagreHtmlReport.SHOW_ONLY_PASSED)
184
+ },
185
+
186
+ hideRubyCode: function() {
187
+ jQuery(this.rubyCodeSelector).hide()
188
+ },
189
+
190
+ showRubyCode: function() {
191
+ jQuery(this.rubyCodeSelector).show()
192
+ },
193
+
194
+ toggleAllRubyCode: function() {
195
+ var link_selector = "#toggle-ruby-code-action"
196
+
197
+ if (jQuery(link_selector).text() == 'Show Ruby code') {
198
+ jQuery(link_selector).text('Hide Ruby code');
199
+ jQuery(".ruby-action").text('Hide Ruby');
200
+ this.showRubyCode()
201
+ } else {
202
+ jQuery(link_selector).text('Show Ruby code');
203
+ jQuery(".ruby-action").text('Show Ruby');
204
+ this.hideRubyCode()
205
+ }
206
+ },
207
+
208
+ toggleRubyCode: function(ruby_action) {
209
+ if (jQuery(ruby_action).text() == 'Show Ruby') {
210
+ jQuery(ruby_action).text('Hide Ruby');
211
+ jQuery(ruby_action).parent().parent().children('.ruby').show();
212
+ } else {
213
+ jQuery(ruby_action).text('Show Ruby');
214
+ jQuery(ruby_action).parent().parent().children('.ruby').hide();
215
+ }
216
+ },
217
+
218
+ collapseAll: function() {
219
+ this.allScenariosDetails().hide();
220
+ },
221
+ expandAll: function() {
222
+ this.allScenariosDetails().show();
223
+ },
224
+
225
+ allScenariosDetails: function() {
226
+ return $(this.SCENARIOS_LOCATOR).parent().children(this.SCENARIO_DETAILS_LOCATOR)
227
+ },
228
+
229
+ expandOnlyFailedScenarios: function() {
230
+ jQuery('div.scenario:not(.failed)').children(this.SCENARIO_DETAILS_LOCATOR).hide();
231
+ jQuery('div.scenario.failed').children(this.SCENARIO_DETAILS_LOCATOR).show();
232
+ },
233
+ expandOnlyPendingScenarios: function() {
234
+ jQuery('div.scenario:not(.pending)').children(this.SCENARIO_DETAILS_LOCATOR).hide();
235
+ jQuery('div.scenario.pending').children(this.SCENARIO_DETAILS_LOCATOR).show();
236
+ },
237
+ expandOnlySuccessfulScenarios: function() {
238
+ jQuery('div.scenario.failed, div.scenario.pending').children(this.SCENARIO_DETAILS_LOCATOR).hide();
239
+ jQuery('div.scenario:not(.failed):not(.pending)').children(this.SCENARIO_DETAILS_LOCATOR).show();
240
+ },
241
+
242
+ backtraceSelector: 'div.scenario::visible div.backtrace, div.background::visible div.backtrace',
243
+ hideBacktrace: function() {
244
+ jQuery(this.backtraceSelector).hide()
245
+ },
246
+ showBacktrace: function() {
247
+ jQuery('div.scenario::visible div.backtrace, div.background::visible div.backtrace').show()
248
+ },
249
+
250
+ toggleAllBacktrace: function() {
251
+ var backtraceSelector = '#toggle-backtrace-action';
252
+ if (jQuery(backtraceSelector).text() == 'Show Backtrace') {
253
+ jQuery(backtraceSelector).text('Hide Backtrace');
254
+ jQuery(".backtrace-action").text('Hide Backtrace');
255
+ this.showBacktrace()
256
+ } else {
257
+ jQuery(backtraceSelector).text('Show Backtrace');
258
+ jQuery(".backtrace-action").text('Show Backtrace');
259
+ this.hideBacktrace()
260
+ }
261
+ return false
262
+ },
263
+
264
+ toggleBacktrace: function(backtrace_action) {
265
+ if (jQuery(backtrace_action).text() == 'Show Backtrace') {
266
+ jQuery(backtrace_action).text('Hide Backtrace');
267
+ jQuery(backtrace_action).parent().parent().children('.backtrace').show();
268
+ } else {
269
+ jQuery(backtrace_action).text('Show Backtrace');
270
+ jQuery(backtrace_action).parent().parent().children('.backtrace').hide();
271
+ }
272
+ },
273
+
274
+ showKnownFails: function() {
275
+ jQuery('div.scenario.failed:has(span.known_bug)').show();
276
+ },
277
+
278
+ hideKnownFails: function() {
279
+ jQuery('div.scenario.failed:has(span.known_bug)').hide();
280
+ },
281
+
282
+ onlyKnownFailsSelector: '#toggle-known-fails',
283
+
284
+ toggleKnownFails: function() {
285
+ if (jQuery(this.onlyKnownFailsSelector).text() == 'Hide known fails') {
286
+ jQuery(this.onlyKnownFailsSelector).text('Show known fails');
287
+ this.hideKnownFails()
288
+ } else {
289
+ jQuery(this.onlyKnownFailsSelector).text('Hide known fails');
290
+ this.showKnownFails()
291
+ }
292
+ },
293
+
294
+ showUnknownFails: function() {
295
+ jQuery('div.scenario.failed:not(:has(span.known_bug))').show();
296
+ },
297
+ hideUnknownFails: function() {
298
+ jQuery('div.scenario.failed:not(:has(span.known_bug))').hide();
299
+ },
300
+
301
+ unknownFailsSelector: '#toggle-unknown-fails',
302
+
303
+ toggleUnknownFails: function() {
304
+ if (jQuery(this.unknownFailsSelector).text() == 'Hide unknown fails') {
305
+ jQuery(this.unknownFailsSelector).text('Show unknown fails');
306
+ this.hideUnknownFails()
307
+ } else {
308
+ jQuery(this.unknownFailsSelector).text('Hide unknown fails');
309
+ this.showUnknownFails()
310
+ }
311
+ }
312
+
313
+ };
314
+
@@ -0,0 +1,16 @@
1
+ module PageNameHelpers
2
+
3
+ # Revert page name string into page class name
4
+ # @param [String] page name
5
+ # @return[String] Return page class name
6
+ def generate_page_class_name(page_name)
7
+ "#{page_name.split.map(&:capitalize).join('')}Page"
8
+ end
9
+
10
+ def generate_page_name_key(page_name)
11
+ "#{page_name.split.map(&:downcase).join('_')}_page"
12
+ end
13
+
14
+ end
15
+
16
+ World PageNameHelpers
@@ -0,0 +1,9 @@
1
+ module Screenshot
2
+ def embed_screenshot(filename)
3
+ @browser.screenshot.save filename
4
+ embed filename, 'image/png'
5
+ end
6
+ end
7
+
8
+ World Screenshot
9
+
@@ -0,0 +1,11 @@
1
+ module UrlHelpers
2
+
3
+ # Return all defined project urls
4
+ # @return[Hash] project urls
5
+ def project_urls
6
+ DataMagic.load('urls.yml')[ENV["ENVIRONMENT"]]
7
+ end
8
+
9
+ end
10
+
11
+ World UrlHelpers