Skip to content

Commit 496515d

Browse files
authored
Merge pull request #113 from rackerlabs/upgrade-svr-again
Put travis-ci back
2 parents 1ad361b + 732d0e1 commit 496515d

File tree

17 files changed

+373
-402
lines changed

17 files changed

+373
-402
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
sudo: false
1+
sudo: required
22
dist: trusty
33
language: node_js
44
node_js:
55
- '8'
66
addons:
7-
firefox: '54.0'
7+
firefox: '56.0'
88
chrome: stable
99
branch:
1010
only:
@@ -16,6 +16,7 @@ before_script:
1616
- export DISPLAY=:99.0
1717
- sh -e /etc/init.d/xvfb start
1818
- jdk_switcher use oraclejdk8
19+
- yarn rollup
1920
- yarn start > /dev/null 2>&1 &
2021
- sleep 5
2122
script:

docs/_templates/partials/app_nav.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<hx-disclosure
2727
aria-controls="{{revealId}}"
2828
{% if isCurrentCategory %}class="current"{% endif %}>
29+
{{ section.label }}
2930
<hx-icon class="toggle-icon" type="angle-down"></hx-icon>
30-
{{ section.label | capitalize }}
3131
</hx-disclosure>
3232
<hx-reveal id="{{revealId}}" {% if isCurrentCategory %}open{% endif %}>
3333
{% for child in section.children %}

test/artifacts/domSnapshots/built/functional/hx-reveal.js.md

Lines changed: 0 additions & 23 deletions
This file was deleted.
-225 Bytes
Binary file not shown.

test/artifacts/domSnapshots/built/regression/generateRegressionTests.js.md

Lines changed: 0 additions & 222 deletions
This file was deleted.
Binary file not shown.

test/common/util.ts

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
/*
2-
* Helper functions for the tests in `../visreg/` and `../functional/`.
2+
* Helper functions for the tests in `../visreg/`.
33
*/
4-
import {By, ISize, WebDriver, WebElement, WebElementPromise} from "selenium-webdriver";
4+
import {By, ISize, WebDriver, WebElement, WebElementPromise} from "snappit-visual-regression";
55
import {TestContext} from "ava";
66

77
export const baseUrl = "http://localhost:3000/helix-ui";
88

99
export async function go(driver: WebDriver, component: string) {
10-
await driver.get(`${baseUrl}/components/${component}`);
10+
await driver.get(`${baseUrl}/${component}`);
1111
}
1212

13-
export async function snapshot(t: TestContext, element: WebElement) {
14-
t.snapshot(await element.getAttribute("outerHTML"));
13+
export async function sleep(ms = 1500) {
14+
return new Promise((resolve, reject) => {
15+
setTimeout(resolve, ms);
16+
});
1517
}
1618

17-
export async function setViewportSize (
18-
driver: WebDriver,
19-
size: ISize,
20-
) {
21-
const jsGetPadding: string = `return {
22-
width: window.outerWidth - window.innerWidth,
23-
height: window.outerHeight - window.innerHeight
24-
}`;
25-
26-
const padding: ISize = await driver.executeScript(jsGetPadding) as ISize;
27-
return driver.manage().window().setSize(
28-
size.width + padding.width,
29-
size.height + padding.height,
30-
);
19+
export async function snapshot(t: TestContext, element: WebElement) {
20+
if (process.env.TRAVIS) {
21+
const ready = async () => (await element.getDriver().executeScript("return window.WebComponents.ready")) as boolean;
22+
while (!(await ready())) {
23+
await sleep(100);
24+
}
25+
}
26+
27+
t.snapshot(await element.getAttribute("outerHTML"));
3128
}
3229

3330
export function $x(
@@ -44,7 +41,7 @@ export function $x(
4441

4542
/* A "starter page object" until there's a greater need for something more robust.
4643
* For now this only contains common CSS selectors used throughout tests in the
47-
* visreg/functional directories, but may also contain functions in the future.
44+
* visreg directory, but may also contain functions in the future.
4845
*
4946
* Once that happens, pull this out of `util.ts` and move it someplace more page-object-y.
5047
*/

test/functional/hx-reveal.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)