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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
# File 'lib/htmlcuke/formatter.rb', line 71
def inline_js_content
"\n SCENARIOS = \"h3[id^='scenario_'],h3[id^=background_]\";\n FAILED_SCENARIOS = \"h3[style*='rgb(196, 13, 13)']\";\n PENDING_SCENARIOS = \"h3[style*='rgb(250, 248, 52)']\";\n PASSED_SCENARIOS = \"h3[style^='cursor:']\";\n BACKGROUND_SCENARIOS = \"h3[id^=background_]\";\n var box_color = \"#666\"\n var button_color = \"#2DB6CF\"\n var hover_button_color = \"#46b98a\"\n var click_button_color = \"#294A4F\"\n var $box_style = \"text-align: right; padding-bottom: 1em; background-color:\" + box_color + \"; background-position: initial initial; background-repeat: initial initial;\";\n var $button_style = \"margin-right: 1em; border: 0 none; border-radius: 6px 6px 6px 6px; color: #FFFFFF; cursor: pointer; display: inline-block; font-family: Arial,sans-serif; font-size: 12px; font-weight: bold; line-height: 20px; margin-bottom: 0; margin-top: 10px; padding: 7px 10px; text-transform: none; transition: all 0.3s ease 0s; -moz-transition: all 0.3s ease 0s; -webkit-transition: all 0.3s ease 0s; width: auto; text-align: center; background: none repeat scroll 0 0\" + button_color + \";\";\n var $hover_button_style = \"margin-right: 1em; border: 0 none; border-radius: 6px 6px 6px 6px; color: #FFFFFF; cursor: pointer; display: inline-block; font-family: Arial,sans-serif; font-size: 12px; font-weight: bold; line-height: 20px; margin-bottom: 0; margin-top: 10px; padding: 7px 10px; text-transform: none; transition: all 0.3s ease 0s; -moz-transition: all 0.3s ease 0s; -webkit-transition: all 0.3s ease 0s; width: auto; text-align: center; background: none repeat scroll 0 0\" + hover_button_color + \";\";\n var $click_button_style = \"margin-right: 1em; border: 0 none; border-radius: 6px 6px 6px 6px; color: #FFFFFF; cursor: pointer; display: inline-block; font-family: Arial,sans-serif; font-size: 12px; font-weight: bold; line-height: 20px; margin-bottom: 0; margin-top: 10px; padding: 7px 10px; text-transform: none; transition: all 0.3s ease 0s; -moz-transition: all 0.3s ease 0s; -webkit-transition: all 0.3s ease 0s; width: auto; text-align: center; background: none repeat scroll 0 0\" + click_button_color + \";\";\n\n $(document).ready(function() {\n $(SCENARIOS).css('cursor', 'pointer');\n $(SCENARIOS).click(function() {\n$(this).siblings().toggle(250);\n });\n\n $(\"#expand-collapse\").attr(\"style\", $box_style);\n\n $(\"#hide_pending\").attr(\"style\", $button_style);\n\n $(\"#hide_pending\").hover(function() {\n $(\"#hide_pending\").attr(\"style\", $hover_button_style)}, function() {\n $(\"#hide_pending\").attr(\"style\", $button_style);\n });\n\n $(\"#hide_pending\").click(function() {\nvar $this = $(this);\n$this.toggleClass('hide_pending');\nif($this.hasClass('hide_pending')){\n $this.text('Hide Pending');\n $(PENDING_SCENARIOS).siblings().show();\n $this.hover(function() {\n $this.attr(\"style\", $hover_button_style)}, function() {\n $this.attr(\"style\", $button_style);\n });\n} else {\n $this.text('Show Pending');\n $(PENDING_SCENARIOS).siblings().hide();\n $this.hover(function() {\n $this.attr(\"style\", $hover_button_style)}, function() {\n $this.attr(\"style\", $click_button_style);\n });\n}\n });\n\n $(\"#hide_failing\").attr(\"style\", $button_style);\n\n $(\"#hide_failing\").hover(function() {\n$(\"#hide_failing\").attr(\"style\", $hover_button_style)}, function() {\n$(\"#hide_failing\").attr(\"style\", $button_style);\n });\n\n $(\"#hide_failing\").click(function() {\nvar $this = $(this);\n$this.toggleClass('hide_failing');\nif($this.hasClass('hide_failing')){\n $this.text('Hide Failing');\n $(FAILED_SCENARIOS).siblings().show();\n $this.hover(function() {\n $this.attr(\"style\", $hover_button_style)}, function() {\n $this.attr(\"style\", $button_style);\n });\n} else {\n $this.text('Show Failing');\n $(FAILED_SCENARIOS).siblings().hide();\n $this.hover(function() {\n $this.attr(\"style\", $hover_button_style)}, function() {\n $this.attr(\"style\", $click_button_style);\n });\n}\n });\n\n $(\"#hide_passing\").attr(\"style\", $button_style);\n\n $(\"#hide_passing\").hover(function() {\n$(\"#hide_passing\").attr(\"style\", $hover_button_style)}, function() {\n$(\"#hide_passing\").attr(\"style\", $button_style);\n });\n\n $(\"#hide_passing\").click(function() {\nvar $this = $(this);\n$this.toggleClass('hide_passing');\nif($this.hasClass('hide_passing')){\n $this.text('Hide Passing');\n $(PASSED_SCENARIOS).siblings().show();\n $this.hover(function() {\n $this.attr(\"style\", $hover_button_style)}, function() {\n $this.attr(\"style\", $button_style);\n });\n} else {\n $this.text('Show Passing');\n $(PASSED_SCENARIOS).siblings().hide();\n $this.hover(function() {\n $this.attr(\"style\", $hover_button_style)}, function() {\n $this.attr(\"style\", $click_button_style);\n });\n}\n });\n\n })\n\n function moveProgressBar(percentDone) {\n $(\"cucumber-header\").css('width', percentDone +\"%\");\n }\n function makeRed(element_id) {\n $('#'+element_id).css('background', '#C40D0D');\n $('#'+element_id).css('color', '#FFFFFF');\n }\n function makeYellow(element_id) {\n $('#'+element_id).css('background', '#FAF834');\n $('#'+element_id).css('color', '#000000');\n }\n\n EOF\nend\n"
|