testcentricity_web 4.1.6 → 4.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rspec +2 -1
- data/.ruby-version +1 -0
- data/.simplecov +5 -1
- data/CHANGELOG.md +43 -0
- data/README.md +14 -13
- data/Rakefile +99 -21
- data/config/cucumber.yml +32 -11
- data/config/locales/en-US.yml +56 -0
- data/config/test_data/LOCAL_data.json +15 -0
- data/config/test_data/LOCAL_data.xls +0 -0
- data/config/test_data/LOCAL_data.yml +11 -0
- data/config/test_data/data.json +25 -0
- data/config/test_data/data.xls +0 -0
- data/config/test_data/data.yml +20 -0
- data/{docker-compose-v3.yml → docker-compose.yml} +2 -2
- data/features/basic_form_page_css.feature +54 -0
- data/features/basic_form_page_xpath.feature +26 -0
- data/features/custom_controls.feature +29 -0
- data/features/media_players.feature +67 -0
- data/features/step_definitions/generic_steps.rb.rb +87 -0
- data/features/step_definitions/media_steps.rb +30 -0
- data/features/support/data/form_data.rb +43 -0
- data/features/support/env.rb +18 -10
- data/features/support/hooks.rb +26 -1
- data/features/support/pages/base_test_page.rb +22 -0
- data/features/support/pages/{basic_css_test_page.rb → basic_css_form_page.rb} +12 -8
- data/features/support/pages/{basic_test_page.rb → basic_form_page.rb} +227 -36
- data/features/support/pages/{basic_xpath_test_page.rb → basic_xpath_form_page.rb} +12 -7
- data/features/support/pages/custom_controls_page.rb +263 -0
- data/features/support/pages/indexed_sections_page.rb +57 -0
- data/features/support/pages/media_test_page.rb +207 -0
- data/features/support/sections/header_nav.rb +48 -0
- data/features/support/sections/product_card.rb +39 -0
- data/features/support/world_data.rb +12 -0
- data/features/support/world_pages.rb +5 -2
- data/lib/testcentricity_web/appium_server.rb +5 -0
- data/lib/testcentricity_web/browser_helper.rb +0 -6
- data/lib/testcentricity_web/data_objects/data_objects_helper.rb +7 -0
- data/lib/testcentricity_web/data_objects/environment.rb +14 -0
- data/lib/testcentricity_web/data_objects/excel_helper.rb +60 -59
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/drag_drop_helper.rb +4 -0
- data/lib/testcentricity_web/web_core/page_object.rb +1 -8
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +4 -2
- data/lib/testcentricity_web/web_core/page_section.rb +1 -1
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +60 -44
- data/lib/testcentricity_web/web_elements/checkbox.rb +49 -19
- data/lib/testcentricity_web/web_elements/file_field.rb +9 -5
- data/lib/testcentricity_web/web_elements/image.rb +2 -1
- data/lib/testcentricity_web/web_elements/media.rb +46 -12
- data/lib/testcentricity_web/web_elements/radio.rb +51 -16
- data/lib/testcentricity_web/web_elements/select_list.rb +12 -12
- data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +22 -9
- data/lib/testcentricity_web/web_elements/video.rb +2 -2
- data/spec/fixtures/page_object.rb +22 -0
- data/spec/fixtures/section_object.rb +21 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/testcentricity_web/browser_spec.rb +41 -0
- data/spec/testcentricity_web/elements/audio_spec.rb +68 -0
- data/spec/testcentricity_web/elements/button_spec.rb +18 -0
- data/spec/testcentricity_web/elements/checkbox_spec.rb +33 -0
- data/spec/testcentricity_web/elements/file_field_spec.rb +13 -0
- data/spec/testcentricity_web/elements/image_spec.rb +33 -0
- data/spec/testcentricity_web/elements/label_spec.rb +18 -0
- data/spec/testcentricity_web/elements/link_spec.rb +23 -0
- data/spec/testcentricity_web/elements/list_spec.rb +13 -0
- data/spec/testcentricity_web/elements/radio_spec.rb +28 -0
- data/spec/testcentricity_web/elements/ui_element_spec.rb +125 -0
- data/spec/testcentricity_web/elements/video_spec.rb +68 -0
- data/spec/testcentricity_web/helper_specs/object_helpers_spec.rb +39 -0
- data/spec/testcentricity_web/helper_specs/string_helpers_spec.rb +49 -0
- data/spec/testcentricity_web/page_object_spec.rb +90 -0
- data/spec/testcentricity_web/section_object_spec.rb +72 -0
- data/spec/testcentricity_web/version_spec.rb +7 -0
- data/spec/testcentricity_web/webdriver_connect/grid_webdriver_spec.rb +72 -0
- data/spec/testcentricity_web/webdriver_connect/local_webdriver_spec.rb +86 -0
- data/spec/testcentricity_web/webdriver_connect/mobile_webdriver_spec.rb +65 -0
- data/test_site/basic_test_page.html +51 -1
- data/test_site/chosen-sprite.png +0 -0
- data/test_site/chosen-sprite@2x.png +0 -0
- data/test_site/chosen.css +496 -0
- data/test_site/chosen.jquery.js +1359 -0
- data/test_site/chosen.jquery.min.js +3 -0
- data/test_site/chosen.min.css +11 -0
- data/test_site/chosen.proto.js +1399 -0
- data/test_site/chosen.proto.min.js +3 -0
- data/test_site/composer.json +36 -0
- data/test_site/custom_controls_page.html +629 -0
- data/test_site/docsupport/chosen.png +0 -0
- data/test_site/docsupport/init.js +11 -0
- data/test_site/docsupport/init.proto.js +16 -0
- data/test_site/docsupport/jquery-1.12.4.min.js +5 -0
- data/test_site/docsupport/jquery-3.2.1.min.js +4 -0
- data/test_site/docsupport/oss-credit.png +0 -0
- data/test_site/docsupport/prism.css +108 -0
- data/test_site/docsupport/prism.js +9 -0
- data/test_site/docsupport/prototype-1.7.0.0.js +6082 -0
- data/test_site/docsupport/style.css +219 -0
- data/test_site/images/Blouse_Black.jpg +0 -0
- data/test_site/images/Printed_Dress.jpg +0 -0
- data/test_site/images/T-shirt.jpg +0 -0
- data/test_site/images/jeans3.jpg +0 -0
- data/test_site/indexed_sections_page.html +215 -0
- data/test_site/media/MIB2-subtitles-pt-BR.vtt +49 -0
- data/test_site/media/MIB2.mp4 +0 -0
- data/test_site/media/bbc_scotland_report.mp3 +0 -0
- data/test_site/media/count_and_bars.mp4 +0 -0
- data/test_site/media_page.html +60 -7
- data/testcentricity_web.gemspec +14 -8
- metadata +197 -25
- data/Gemfile.lock +0 -170
- data/features/basic_test_page_css.feature +0 -24
- data/features/basic_test_page_xpath.feature +0 -24
- data/features/support/pages/media_page.rb +0 -11
@@ -0,0 +1,108 @@
|
|
1
|
+
/**
|
2
|
+
* okaidia theme for JavaScript, CSS and HTML
|
3
|
+
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
|
4
|
+
* @author ocodia
|
5
|
+
*/
|
6
|
+
|
7
|
+
code[class*="language-"],
|
8
|
+
pre[class*="language-"] {
|
9
|
+
color: #f8f8f2;
|
10
|
+
text-shadow: 0 1px rgba(0,0,0,0.3);
|
11
|
+
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
12
|
+
direction: ltr;
|
13
|
+
text-align: left;
|
14
|
+
white-space: pre;
|
15
|
+
word-spacing: normal;
|
16
|
+
|
17
|
+
-moz-tab-size: 4;
|
18
|
+
-o-tab-size: 4;
|
19
|
+
tab-size: 4;
|
20
|
+
|
21
|
+
-webkit-hyphens: none;
|
22
|
+
-moz-hyphens: none;
|
23
|
+
-ms-hyphens: none;
|
24
|
+
hyphens: none;
|
25
|
+
}
|
26
|
+
|
27
|
+
/* Code blocks */
|
28
|
+
pre[class*="language-"] {
|
29
|
+
padding: 1em;
|
30
|
+
margin: .5em 0;
|
31
|
+
overflow: auto;
|
32
|
+
border-radius: 0.3em;
|
33
|
+
}
|
34
|
+
|
35
|
+
:not(pre) > code[class*="language-"],
|
36
|
+
pre[class*="language-"] {
|
37
|
+
background: #272822;
|
38
|
+
}
|
39
|
+
|
40
|
+
/* Inline code */
|
41
|
+
:not(pre) > code[class*="language-"] {
|
42
|
+
padding: .1em;
|
43
|
+
border-radius: .3em;
|
44
|
+
}
|
45
|
+
|
46
|
+
.token.comment,
|
47
|
+
.token.prolog,
|
48
|
+
.token.doctype,
|
49
|
+
.token.cdata {
|
50
|
+
color: slategray;
|
51
|
+
}
|
52
|
+
|
53
|
+
.token.punctuation {
|
54
|
+
color: #f8f8f2;
|
55
|
+
}
|
56
|
+
|
57
|
+
.namespace {
|
58
|
+
opacity: .7;
|
59
|
+
}
|
60
|
+
|
61
|
+
.token.property,
|
62
|
+
.token.tag {
|
63
|
+
color: #f92672;
|
64
|
+
}
|
65
|
+
|
66
|
+
.token.boolean,
|
67
|
+
.token.number{
|
68
|
+
color: #ae81ff;
|
69
|
+
}
|
70
|
+
|
71
|
+
.token.selector,
|
72
|
+
.token.attr-name,
|
73
|
+
.token.string {
|
74
|
+
color: #a6e22e;
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
.token.operator,
|
79
|
+
.token.entity,
|
80
|
+
.token.url,
|
81
|
+
.language-css .token.string,
|
82
|
+
.style .token.string {
|
83
|
+
color: #f8f8f2;
|
84
|
+
}
|
85
|
+
|
86
|
+
.token.atrule,
|
87
|
+
.token.attr-value
|
88
|
+
{
|
89
|
+
color: #e6db74;
|
90
|
+
}
|
91
|
+
|
92
|
+
|
93
|
+
.token.keyword{
|
94
|
+
color: #66d9ef;
|
95
|
+
}
|
96
|
+
|
97
|
+
.token.regex,
|
98
|
+
.token.important {
|
99
|
+
color: #fd971f;
|
100
|
+
}
|
101
|
+
|
102
|
+
.token.important {
|
103
|
+
font-weight: bold;
|
104
|
+
}
|
105
|
+
|
106
|
+
.token.entity {
|
107
|
+
cursor: help;
|
108
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
3
|
+
* MIT license http://www.opensource.org/licenses/mit-license.php/
|
4
|
+
* @author Lea Verou http://lea.verou.me
|
5
|
+
*/(function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.util.clone(e[i]));return r;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var i in n)r[i]=n[i];return r},insertBefore:function(e,n,r,i){i=i||t.languages;var s=i[e],o={};for(var u in s)if(s.hasOwnProperty(u)){if(u==n)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o[u]=s[u]}return i[e]=o},DFS:function(e,n){for(var r in e){n.call(e,r,e[r]);t.util.type(e)==="Object"&&t.languages.DFS(e[r],n)}}},highlightAll:function(e,n){var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');for(var i=0,s;s=r[i++];)t.highlightElement(s,e===!0,n)},highlightElement:function(r,i,s){var o,u,a=r;while(a&&!e.test(a.className))a=a.parentNode;if(a){o=(a.className.match(e)||[,""])[1];u=t.languages[o]}if(!u)return;r.className=r.className.replace(e,"").replace(/\s+/g," ")+" language-"+o;a=r.parentNode;/pre/i.test(a.nodeName)&&(a.className=a.className.replace(e,"").replace(/\s+/g," ")+" language-"+o);var f=r.textContent;if(!f)return;f=f.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ");var l={element:r,language:o,grammar:u,code:f};t.hooks.run("before-highlight",l);if(i&&self.Worker){var c=new Worker(t.filename);c.onmessage=function(e){l.highlightedCode=n.stringify(JSON.parse(e.data),o);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(l.element);t.hooks.run("after-highlight",l)};c.postMessage(JSON.stringify({language:l.language,code:l.code}))}else{l.highlightedCode=t.highlight(l.code,l.grammar,l.language);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(r);t.hooks.run("after-highlight",l)}},highlight:function(e,r,i){return n.stringify(t.tokenize(e,r),i)},tokenize:function(e,n,r){var i=t.Token,s=[e],o=n.rest;if(o){for(var u in o)n[u]=o[u];delete n.rest}e:for(var u in n){if(!n.hasOwnProperty(u)||!n[u])continue;var a=n[u],f=a.inside,l=!!a.lookbehind,c=0;a=a.pattern||a;for(var h=0;h<s.length;h++){var p=s[h];if(s.length>e.length)break e;if(p instanceof i)continue;a.lastIndex=0;var d=a.exec(p);if(d){l&&(c=d[1].length);var v=d.index-1+c,d=d[0].slice(c),m=d.length,g=v+m,y=p.slice(0,v+1),b=p.slice(g+1),w=[h,1];y&&w.push(y);var E=new i(u,f?t.tokenize(d,f):d);w.push(E);b&&w.push(b);Array.prototype.splice.apply(s,w)}}}return s},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e,r,i){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]")return e.map(function(t){return n.stringify(t,r,e)}).join("");var s={type:e.type,content:n.stringify(e.content,r,i),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:i};s.type=="comment"&&(s.attributes.spellcheck="true");t.hooks.run("wrap",s);var o="";for(var u in s.attributes)o+=u+'="'+(s.attributes[u]||"")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'" '+o+">"+s.content+"</"+s.tag+">"};if(!self.document){self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}})();;
|
6
|
+
Prism.languages.markup={comment:/<!--[\w\W]*?-->/g,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/&#?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});;
|
7
|
+
Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,ignore:/&(lt|gt|amp);/gi,punctuation:/[\{\};:]/g};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<|<)style[\w\W]*?(>|>)[\w\W]*?(<|<)\/style(>|>)/ig,inside:{tag:{pattern:/(<|<)style[\w\W]*?(>|>)|(<|<)\/style(>|>)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css}}});;
|
8
|
+
Prism.languages.clike={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/ig,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/ig,inside:{punctuation:/\(/}}, number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|<=?|>=?|={1,3}|(&){1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
|
9
|
+
Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(var|let|if|else|while|do|for|return|in|instanceof|function|new|with|typeof|try|catch|finally|null|break|continue)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g});Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}});Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<|<)script[\w\W]*?(>|>)[\w\W]*?(<|<)\/script(>|>)/ig,inside:{tag:{pattern:/(<|<)script[\w\W]*?(>|>)|(<|<)\/script(>|>)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript}}});;
|