Skip to content
This repository was archived by the owner on May 30, 2019. It is now read-only.

Commit 44f610a

Browse files
committed
e2e: use 'samplestack.local' domain for sauce
SauceLabs uses a not-fully-reliable, slow proxy solution to work around issues with testing remotely against localhost domain in Internet Explorer (and Safari). - Use 'samplestack.local' domain for Sauce-based e2e tests. - Configure this domain in travis. - Update readme with instruction. BREAKING CHANGE: users will need to configure such a domain, typically in their hosts file, to point to 127.0.0.1 Closes #452
1 parent 667ddcb commit 44f610a

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
language: java
22

3+
addons:
4+
hosts:
5+
- samplestack.local
6+
37
# for non-pull-requests, aka pushes, requires secure emvironment
48
# variables for access to MarkLogic nightlies (when applicable)
59
# and for SauceLabs integration. These are configured in

browser/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ Note on `~@broken`: always specify this flag unless you are interested in seeing
167167
are known to be broken. Such tests are also flagged in the feature files with issue id numbers, so
168168
that they may be executed individually based on the issue that covers the problem.
169169

170+
**Note: to use SauceLabs tests, please add a hosts file entry (or other domain resolution) that points "samplestack.local" to 127.0.0.1 on your machine.**
171+
The reasons for this are documented in https://support.saucelabs.com/entries/27401240-Testing-with-a-localhost-server-and-some-browsers-can-t-load-my-website .
172+
170173
## Node.js/npm Tips and Troubleshooting
171174

172175
Please see [Node.js and npm Tips for Samplestack Development](https://github.com/marklogic/marklogic-samplestack/wiki/Node.js-and-npm-Tips-for-Samplestack-Development).

browser/dev-tasks/e2e/protractor.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ var ptorConfig = {
3737

3838

3939
var go = function (args, cb) {
40+
// sauce/IE doens't like "localhost", so we punt.
41+
// running on Sauce now requires this hosts file entry
42+
if (args.sauce) {
43+
ptorConfig.baseUrl =
44+
ptorConfig.baseUrl.replace('localhost', 'samplestack.local');
45+
}
46+
4047
if (args.tags) {
4148
ptorConfig.cucumberOpts.tags = [args.tags];
4249
}

0 commit comments

Comments
 (0)