diff --git a/bower.json b/bower.json index 2b836b8..96b9781 100644 --- a/bower.json +++ b/bower.json @@ -20,7 +20,8 @@ "polymer": "Polymer/polymer#1.9 - 2" }, "devDependencies": { - "d2l-demo-template": "0.0.12 - 1.0.1" + "d2l-demo-template": "0.0.12 - 1.0.1", + "web-component-tester": "Polymer/web-component-tester#^6.0.0" }, "variants": { "1.x": { @@ -28,7 +29,8 @@ "polymer": "Polymer/polymer#1.9" }, "devDependencies": { - "d2l-demo-template": "^0.0.12" + "d2l-demo-template": "^0.0.12", + "web-component-tester": "Polymer/web-component-tester#^4.0.0" }, "resolutions": { "webcomponentsjs": "^0.7" diff --git a/d2l-offscreen-shared-styles.html b/d2l-offscreen-shared-styles.html index 2551c21..c269bc1 100644 --- a/d2l-offscreen-shared-styles.html +++ b/d2l-offscreen-shared-styles.html @@ -11,14 +11,8 @@ white-space: nowrap; left: -10000px; }; - } - :host(:dir(rtl)) { - --d2l-offscreen: { - position: absolute !important; - overflow: hidden; - width: 1px; - height: 1px; - white-space: nowrap; + --d2l-offscreen-rtl { + left: 0; right: -10000px; }; } diff --git a/d2l-offscreen.html b/d2l-offscreen.html index daa4f84..753d168 100644 --- a/d2l-offscreen.html +++ b/d2l-offscreen.html @@ -5,7 +5,13 @@ diff --git a/demo/index.html b/demo/index.html index 600ee0d..476cf8e 100644 --- a/demo/index.html +++ b/demo/index.html @@ -10,7 +10,7 @@ -
+
Some offscreen content: this should be offscreenthis should be offscreen
diff --git a/test/.eslintrc b/test/.eslintrc new file mode 100644 index 0000000..4f283c8 --- /dev/null +++ b/test/.eslintrc @@ -0,0 +1,13 @@ +{ + "globals": { + "WCT": false, + "suite": false, + "setup": false, + "teardown": false, + "test": false, + "fixture": false, + "a11ySuite": false, + "expect": false, + "sinon": false + } +} diff --git a/test/a11y.html b/test/a11y.html new file mode 100644 index 0000000..4733de8 --- /dev/null +++ b/test/a11y.html @@ -0,0 +1,28 @@ + + + + + + + d2l-offscreen test + + + + + + + + + + + + + + + diff --git a/test/d2l-offscreen.html b/test/d2l-offscreen.html new file mode 100644 index 0000000..70ed36f --- /dev/null +++ b/test/d2l-offscreen.html @@ -0,0 +1,37 @@ + + + + + + + d2l-offscreen test + + + + + + + + + + + + + + diff --git a/test/index.html b/test/index.html new file mode 100644 index 0000000..c2832b9 --- /dev/null +++ b/test/index.html @@ -0,0 +1,21 @@ + + + + + + d2l-button-group tests + + + + + + + diff --git a/wct.conf.json b/wct.conf.json new file mode 100644 index 0000000..c33e1ce --- /dev/null +++ b/wct.conf.json @@ -0,0 +1,46 @@ +{ + "plugins": { + "local": { + "browsers": ["chrome"] + }, + "sauce": { + "browsers": [ + { + "browserName": "chrome", + "platform": "OS X 10.12", + "version": "" + }, + { + "browserName": "chrome", + "platform": "Windows 10", + "version": "" + }, + { + "browserName": "firefox", + "platform": "OS X 10.12", + "version": "" + }, + { + "browserName": "firefox", + "platform": "Windows 10", + "version": "" + }, + { + "browserName": "safari", + "platform": "OS X 10.12", + "version": "10.0" + }, + { + "browserName": "microsoftedge", + "platform": "Windows 10", + "version": "" + }, + { + "browserName": "internet explorer", + "platform": "Windows 10", + "version": "11" + } + ] + } + } +}