This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new c9943e1 Tests for JS libraries use Chrome or Firefox on macOS, if
available
c9943e1 is described below
commit c9943e1b4d92b6c48d6bbc7af2aa04e17b84d6c8
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed May 22 15:05:51 2019 -0700
Tests for JS libraries use Chrome or Firefox on macOS, if available
Previously, tried to use Safari, but opening a file for the first time
requests permission. Not exactly what you want when running automated tests...
---
.../js/projects/BasicJS/src/test/royale/build.xml | 24 ++++++++++++++++++----
.../js/projects/CoreJS/src/test/royale/build.xml | 24 ++++++++++++++++++----
.../RoyaleUnitJS/src/test/royale/build.xml | 24 ++++++++++++++++++----
3 files changed, 60 insertions(+), 12 deletions(-)
diff --git a/frameworks/js/projects/BasicJS/src/test/royale/build.xml
b/frameworks/js/projects/BasicJS/src/test/royale/build.xml
index b65f991..5bd0fde 100644
--- a/frameworks/js/projects/BasicJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/BasicJS/src/test/royale/build.xml
@@ -30,9 +30,9 @@
<property name="target.name" value="BasicJS-${release.version}.swc" />
<!--
- Windows:
+ Windows browser:
try chrome first because it's the most popular browser
- then, fall back to firefox
+ otherwise, try to fall back to firefox
DON'T use internet explorer! it cannot run scripts in local pages
-->
<condition property="browser" value="C:/Program Files
(x86)/Google/Chrome/Application/chrome.exe">
@@ -47,8 +47,24 @@
<available file="C:/Program Files/Mozilla Firefox/firefox.exe"/>
</and>
</condition>
- <condition property="browser"
value="/Applications/Safari.app/Contents/MacOS/Safari">
- <os family="mac"/>
+
+ <!--
+ macOS browser:
+ try chrome first because it's the most popular browser
+ otherwise, try to fall back to firefox
+ DON'T use safari! it asks the user to confirm opening local pages
+ -->
+ <condition property="browser" value="/Applications/Google
Chrome.app/Contents/MacOS/Google Chrome">
+ <and>
+ <os family="mac"/>
+ <available file="/Applications/Google
Chrome.app/Contents/MacOS/Google Chrome"/>
+ </and>
+ </condition>
+ <condition property="browser"
value="/Applications/Firefox.app/Contents/MacOS/firefox">
+ <and>
+ <os family="mac"/>
+ <available
file="/Applications/Firefox.app/Contents/MacOS/firefox"/>
+ </and>
</condition>
<property name="report.dir" value="${basedir}/out" />
diff --git a/frameworks/js/projects/CoreJS/src/test/royale/build.xml
b/frameworks/js/projects/CoreJS/src/test/royale/build.xml
index 20ef544..cbde986 100644
--- a/frameworks/js/projects/CoreJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/CoreJS/src/test/royale/build.xml
@@ -30,9 +30,9 @@
<property name="target.name" value="CoreJS-${release.version}.swc" />
<!--
- Windows:
+ Windows browser:
try chrome first because it's the most popular browser
- then, fall back to firefox
+ otherwise, try to fall back to firefox
DON'T use internet explorer! it cannot run scripts in local pages
-->
<condition property="browser" value="C:/Program Files
(x86)/Google/Chrome/Application/chrome.exe">
@@ -47,8 +47,24 @@
<available file="C:/Program Files/Mozilla Firefox/firefox.exe"/>
</and>
</condition>
- <condition property="browser"
value="/Applications/Safari.app/Contents/MacOS/Safari">
- <os family="mac"/>
+
+ <!--
+ macOS browser:
+ try chrome first because it's the most popular browser
+ otherwise, try to fall back to firefox
+ DON'T use safari! it asks the user to confirm opening local pages
+ -->
+ <condition property="browser" value="/Applications/Google
Chrome.app/Contents/MacOS/Google Chrome">
+ <and>
+ <os family="mac"/>
+ <available file="/Applications/Google
Chrome.app/Contents/MacOS/Google Chrome"/>
+ </and>
+ </condition>
+ <condition property="browser"
value="/Applications/Firefox.app/Contents/MacOS/firefox">
+ <and>
+ <os family="mac"/>
+ <available
file="/Applications/Firefox.app/Contents/MacOS/firefox"/>
+ </and>
</condition>
<property name="report.dir" value="${basedir}/out" />
diff --git a/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml
b/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml
index a434f4e..dd69c5a 100644
--- a/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml
@@ -30,9 +30,9 @@
<property name="target.name" value="RoyaleUnitJS-${release.version}.swc" />
<!--
- Windows:
+ Windows browser:
try chrome first because it's the most popular browser
- then, fall back to firefox
+ otherwise, try to fall back to firefox
DON'T use internet explorer! it cannot run scripts in local pages
-->
<condition property="browser" value="C:/Program Files
(x86)/Google/Chrome/Application/chrome.exe">
@@ -47,8 +47,24 @@
<available file="C:/Program Files/Mozilla Firefox/firefox.exe"/>
</and>
</condition>
- <condition property="browser"
value="/Applications/Safari.app/Contents/MacOS/Safari">
- <os family="mac"/>
+
+ <!--
+ macOS browser:
+ try chrome first because it's the most popular browser
+ otherwise, try to fall back to firefox
+ DON'T use safari! it asks the user to confirm opening local pages
+ -->
+ <condition property="browser" value="/Applications/Google
Chrome.app/Contents/MacOS/Google Chrome">
+ <and>
+ <os family="mac"/>
+ <available file="/Applications/Google
Chrome.app/Contents/MacOS/Google Chrome"/>
+ </and>
+ </condition>
+ <condition property="browser"
value="/Applications/Firefox.app/Contents/MacOS/firefox">
+ <and>
+ <os family="mac"/>
+ <available
file="/Applications/Firefox.app/Contents/MacOS/firefox"/>
+ </and>
</condition>
<property name="report.dir" value="${basedir}/out" />