Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test(android): fix tests to use cordova-android 10.x default https scheme #518

Merged
merged 2 commits into from
Mar 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
root: true
extends: '@cordova/eslint-config/browser'
globals:
cordova: true

overrides:
- files: [tests/**/*.js]
extends: '@cordova/eslint-config/node-tests'
- files: [tests/**/*.js]
extends: '@cordova/eslint-config/node-tests'
globals:
cordova: true
11 changes: 8 additions & 3 deletions tests/tests.js
Original file line number Diff line number Diff line change
@@ -3435,9 +3435,14 @@ exports.defineAutoTests = function () {
/* These specs verify that FileEntries have a toNativeURL method
* which appears to be sane.
*/
var pathExpect = cordova.platformId === 'windowsphone' ? '//nativ' : 'file://'; // eslint-disable-line no-undef

if (isChrome) {
var pathExpect = 'file://';

if (cordova.platformId === 'android') {
// Starting from Cordova-Android 10.x, the app content is served from the https scheme
pathExpect = 'https://';
} else if (cordova.platformId === 'windowsphone') {
pathExpect = '//nativ';
} else if (isChrome) {
pathExpect = 'filesystem:http://';
}