git.iko.soy/typeable/elm-ui
on master help sign in
fix automatic test runner
commit7ed3ecb9359e3864fe1bf7773db95ad45ed95af7 authormdgriffith <mdgriffith@users.noreply.github.com> dateSat 23 May 2020, 08:46 (6 years ago) parentd674a8d
7 files changed+67−63
package-lock.json+19−31 package.json+3−3 tests-rendering/automation/run.js+9−3 tests-rendering/automation/templates/gather-styles.html+3 tests-rendering/cases/resolved/SafariBugIssue147.elm → tests-rendering/cases/resolved/Layout/SafariBugIssue147.elm+1−1 tests-rendering/elm.json+1−1 tests-rendering/src/Tests/All.elm+31−24
package-lock.json+19−31
@@ -734,9 +734,9 @@
734734 }
735735 },
736736 "jszip": {
737− "version": "3.2.2",
738− "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.2.tgz",
739− "integrity": "sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA==",
737+ "version": "3.4.0",
738+ "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.4.0.tgz",
739+ "integrity": "sha512-gZAOYuPl4EhPTXT0GjhI3o+ZAz3su6EhLrKUoAivcKqyqC7laS5JEv4XWZND9BgcDcF83vI85yGbDmDR6UhrIg==",
740740 "requires": {
741741 "lie": "~3.3.0",
742742 "pako": "~1.0.2",
@@ -1002,20 +1002,24 @@
10021002 "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
10031003 "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
10041004 },
1005− "sax": {
1006− "version": "1.2.4",
1007− "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
1008− "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
1009− },
10101005 "selenium-webdriver": {
1011− "version": "4.0.0-alpha.4",
1012− "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.0.0-alpha.4.tgz",
1013− "integrity": "sha512-etJt20d8qInkxMAHIm5SEpPBSS+CdxVcybnxzSIB/GlWErb8pIWrArz/VA6VfUW0/6tIcokepXQ5ufvdzqqk1A==",
1006+ "version": "4.0.0-alpha.7",
1007+ "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.0.0-alpha.7.tgz",
1008+ "integrity": "sha512-D4qnTsyTr91jT8f7MfN+OwY0IlU5+5FmlO5xlgRUV6hDEV8JyYx2NerdTEqDDkNq7RZDYc4VoPALk8l578RBHw==",
10141009 "requires": {
1015− "jszip": "^3.1.5",
1016− "rimraf": "^2.6.3",
1017− "tmp": "0.0.30",
1018− "xml2js": "^0.4.19"
1010+ "jszip": "^3.2.2",
1011+ "rimraf": "^2.7.1",
1012+ "tmp": "0.0.30"
1013+ },
1014+ "dependencies": {
1015+ "rimraf": {
1016+ "version": "2.7.1",
1017+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
1018+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
1019+ "requires": {
1020+ "glob": "^7.1.3"
1021+ }
1022+ }
10191023 }
10201024 },
10211025 "semver": {
@@ -1217,22 +1221,6 @@
12171221 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
12181222 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
12191223 },
1220− "xml2js": {
1221− "version": "0.4.19",
1222− "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
1223− "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
1224− "requires": {
1225− "sax": ">=0.6.0",
1226− "xmlbuilder": "~9.0.1"
1227− },
1228− "dependencies": {
1229− "xmlbuilder": {
1230− "version": "9.0.7",
1231− "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
1232− "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
1233− }
1234− }
1235− },
12361224 "xmlbuilder": {
12371225 "version": "13.0.2",
12381226 "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz",
package.json+3−3
@@ -7,8 +7,8 @@
77 "test": "elm-test",
88 "view-test": "node tests-rendering/automation/view.js",
99 "test-render": "node tests-rendering/automation/run.js --chrome",
10− "test-render-sauce": "source sauce.env; node tests-rendering/automation/run.js --sauce",
11− "test-render-sauce-automated": "node tests-rendering/automation/run.js --sauce",
10+ "test-render-sauce": "source sauce.env; node tests-rendering/automation/run.js --sauce --headless",
11+ "test-render-sauce-automated": "node tests-rendering/automation/run.js --sauce --headless",
1212 "test-doc-preview": "bash tests-rendering/automation/doc-preview.sh",
1313 "bench": "node benchmarks/runtime/index.js",
1414 "list-issues": "hub issue -f \"%i,%U,%t,'%L'%n\" > issues.csv"
@@ -29,6 +29,6 @@
2929 "elm": "^0.19.1-3",
3030 "elm-test": "^0.19.1-revision2",
3131 "node-elm-compiler": "^5.0.4",
32− "selenium-webdriver": "^4.0.0-alpha.4"
32+ "selenium-webdriver": "^4.0.0-alpha.7"
3333 }
3434}
tests-rendering/automation/run.js+9−3
@@ -17,6 +17,7 @@ program
1717 .option("--build [value]", "Set build number for sauce labs")
1818 .option("--name [value]", "Set run name for sauce labs")
1919 .option("--verbose", "Print out all test results")
20+ .option("--headless", "run tests without showing the browser")
2021 .parse(process.argv);
2122
2223// 'Windows 10'
@@ -126,8 +127,13 @@ function prepare_sauce_driver(env) {
126127}
127128
128129async function prepare_local_driver(env) {
129− const firefoxOptions = new firefox.Options().headless();
130− const chromeOptions = new chrome.Options().headless();
130+ const firefoxOptions = new firefox.Options();
131+ const chromeOptions = new chrome.Options();
132+
133+ if (program.headless) {
134+ firefoxOptions.headless();
135+ chromeOptions.headless();
136+ }
131137
132138 let driver = await new Builder()
133139 .forBrowser(env.browser)
@@ -163,7 +169,7 @@ async function run_test(driver, url) {
163169 await compile_and_embed({
164170 template: "./tests-rendering/automation/templates/gather-styles.html",
165171 target: "./tmp/test.html",
166− elm: "src/Tests/Run.elm",
172+ elm: "src/Tests/All.elm",
167173 elmOptions: { cwd: "./tests-rendering" },
168174 });
169175 console.log("Done compiling");
tests-rendering/automation/templates/gather-styles.html+3
@@ -149,6 +149,9 @@
149149
150150 app.ports.report.subscribe(function (results) {
151151 test_results = results;
152+ // NOTE - this is the signal to the automation that it is cool to retrieve results now
153+ // So don't remove this like you did before :D
154+ document.title = "tests finished";
152155 });
153156
154157 app.ports.analyze.subscribe(function (ids) {
tests-rendering/cases/resolved/SafariBugIssue147.elm → tests-rendering/cases/resolved/Layout/SafariBugIssue147.elmrenamed+1−1
@@ -1,4 +1,4 @@
1−module SafariBugIssue147 exposing (view)
1+module Layout.SafariBugIssue147 exposing (view)
22
33{-|
44
tests-rendering/elm.json+1−1
@@ -1,6 +1,6 @@
11{
22 "type": "application",
3− "source-directories": ["src", "../src", "cases/open"],
3+ "source-directories": ["src", "../src", "cases/open", "cases/resolved"],
44 "elm-version": "0.19.1",
55 "dependencies": {
66 "direct": {
tests-rendering/src/Tests/All.elm+31−24
@@ -5,8 +5,8 @@ module Tests.All exposing (main)
55import ClippedElInFixedWidthColumn
66import ElInFixedHeightColumn
77import InFrontSize
8+import Layout.SafariBugIssue147
89import NestedParagraphs
9−import SafariBugIssue147
1010import StackedScrollingColumnsHeight
1111import Testable.Generator
1212import Testable.Runner
@@ -25,31 +25,38 @@ import WeirdCentering
2525main : Testable.Runner.TestableProgram
2626main =
2727 (Testable.Runner.program << List.concat)
28− [ --Testable.Generator.element "Basics"
29− --[]
30− -- , Testable.Generator.element "Align " []
31− -- Tuple.pair "Basic Element" Tests.Basic.view
32− -- , Tuple.pair "Nearby" Tests.Nearby.view
33− -- , Tuple.pair "Element Alignment" Tests.ElementAlignment.view
34− -- , Tuple.pair "Transparency" Tests.Transparency.view
35− -- , Tuple.pair "Column Alignment" Tests.ColumnAlignment.view
36− -- -- This has 12k cases, so it runs slow and sometimes crashes IE
37− -- , Tuple.pair "Row Alignment" Tests.RowAlignment.view
38− -- , Tuple.pair "Column Spacing" Tests.ColumnSpacing.view
39− -- , Tuple.pair "Row Spacing" Tests.RowSpacing.view
40− -- [ Tuple.pair "Paragraph wrapping" Tests.TextWrapping.view
41− -- ]
42− -- ,
43− issues
28+ [ Testable.Generator.element "Basics"
29+ []
30+
31+ -- , Testable.Generator.element "Align "
32+ -- []
33+ -- , [ Tuple.pair
34+ -- "Basic Element"
35+ -- Tests.Basic.view
36+ -- , Tuple.pair "Nearby" Tests.Nearby.view
37+ -- , Tuple.pair "Element Alignment" Tests.ElementAlignment.view
38+ -- , Tuple.pair "Transparency" Tests.Transparency.view
39+ -- , Tuple.pair "Column Alignment" Tests.ColumnAlignment.view
40+ -- -- This has 12k cases, so it runs slow and sometimes crashes IE
41+ -- , Tuple.pair "Row Alignment" Tests.RowAlignment.view
42+ -- , Tuple.pair "Column Spacing" Tests.ColumnSpacing.view
43+ -- , Tuple.pair "Row Spacing"
44+ -- Tests.RowSpacing.view
45+ -- ]
46+ -- , [ Tuple.pair "Paragraph wrapping" Tests.TextWrapping.view
47+ -- ]
48+ -- , issues
4449 ]
4550
4651
4752issues =
48− [ Testable.Runner.rename "Weird Centering" WeirdCentering.view
49− , Testable.Runner.rename "Stacked scrolling columns height" StackedScrollingColumnsHeight.view
50− , Testable.Runner.rename "Safari bug issue147" SafariBugIssue147.view
51− , Testable.Runner.rename "Nested paragraphs" NestedParagraphs.view
52− , Testable.Runner.rename "In front size" InFrontSize.view
53− , Testable.Runner.rename "El in fixed height column" ElInFixedHeightColumn.view
54− , Testable.Runner.rename "Clipped el in fixed width column" ClippedElInFixedWidthColumn.view
53+ [ -- Testable.Runner.rename "Weird Centering" WeirdCentering.view
54+ -- , Testable.Runner.rename "Stacked scrolling columns height" StackedScrollingColumnsHeight.view
55+ -- ,
56+ Testable.Runner.rename "Safari bug issue147" Layout.SafariBugIssue147.view
57+
58+ -- , Testable.Runner.rename "Nested paragraphs" NestedParagraphs.view
59+ -- , Testable.Runner.rename "In front size" InFrontSize.view
60+ -- , Testable.Runner.rename "El in fixed height column" ElInFixedHeightColumn.view
61+ -- , Testable.Runner.rename "Clipped el in fixed width column" ClippedElInFixedWidthColumn.view
5562 ]