-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for launching the local web server for component testin…
…g from the android emulator (#3460)
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const assert = require('assert'); | ||
const common = require('../../common.js'); | ||
const NightwatchClient = common.require('index.js'); | ||
|
||
|
||
describe('Mobile Component Testing in Android Emulator', function () { | ||
it('test baseUrl - localhost', function(){ | ||
const client = NightwatchClient.client({ | ||
baseUrl: 'http://localhost:3000', | ||
webdriver: { | ||
start_process: true | ||
}, | ||
desiredCapabilities: { | ||
avd: 'nightwatch-android-11', | ||
real_mobile: false | ||
} | ||
}); | ||
|
||
assert.strictEqual(client.api.baseUrl, 'http://10.0.2.2:3000'); | ||
}); | ||
|
||
it('test baseUrl - 127.0.0.1', function(){ | ||
const client = NightwatchClient.client({ | ||
baseUrl: 'http://127.0.0.1:3000', | ||
webdriver: { | ||
start_process: true | ||
}, | ||
desiredCapabilities: { | ||
avd: 'nightwatch-android-11', | ||
real_mobile: false | ||
} | ||
}); | ||
|
||
assert.strictEqual(client.api.baseUrl, 'http://10.0.2.2:3000'); | ||
}); | ||
}); |