mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-01-31 00:00:03 +08:00
chore: fix Android CI build
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
"author": "Sefa Ilkimen",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"cordova": "11.0.0",
|
||||
"cordova-android": "10.1.1",
|
||||
"cordova-browser": "6.0.0",
|
||||
"cordova-ios": "6.2.0",
|
||||
"cordova": "12.0.0",
|
||||
"cordova-android": "12.0.1",
|
||||
"cordova-browser": "7.0.0",
|
||||
"cordova-ios": "7.1.1",
|
||||
"cordova-plugin-device": "2.0.3"
|
||||
},
|
||||
"cordova": {
|
||||
@@ -26,4 +26,4 @@
|
||||
"cordova-plugin-device": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,6 @@ const helpers = {
|
||||
};
|
||||
|
||||
const messageFactory = {
|
||||
handshakeFailed: function() { return 'TLS connection could not be established: javax.net.ssl.SSLHandshakeException: Handshake failed' },
|
||||
sslTrustAnchor: function () { return 'TLS connection could not be established: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.' },
|
||||
invalidCertificate: function (domain) { return 'The certificate for this server is invalid. You might be connecting to a server that is pretending to be “' + domain + '” which could put your confidential information at risk.' }
|
||||
}
|
||||
@@ -612,7 +611,9 @@ const tests = [
|
||||
},
|
||||
validationFunc: function (driver, result, targetInfo) {
|
||||
result.type.should.be.equal('rejected');
|
||||
result.data.should.be.eql({ status: -2, error: targetInfo.isAndroid ? messageFactory.sslTrustAnchor() : messageFactory.invalidCertificate('sha512.badssl.com') });
|
||||
result.data.status.should.be.equal(-2);
|
||||
result.data.error.should.include(targetInfo.isAndroid ? 'javax.net.ssl.SSLHandshakeException' : 'The certificate for this server is invalid');
|
||||
// result.data.should.be.eql({ status: -2, error: targetInfo.isAndroid ? messageFactory.s^slTrustAnchor() : messageFactory.invalidCertificate('sha512.badssl.com') });
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1175,7 +1176,8 @@ const tests = [
|
||||
},
|
||||
validationFunc: function (driver, result) {
|
||||
result.type.should.be.equal('rejected');
|
||||
result.data.should.be.eql({ status: -2, error: messageFactory.handshakeFailed() });
|
||||
result.data.status.should.be.equal(-2);
|
||||
result.data.error.should.include('UNSUPPORTED_PROTOCOL');
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
@@ -70,8 +70,8 @@ const configs = {
|
||||
},
|
||||
browserstackAndroidDevice: {
|
||||
'appium-version': '1.22.0',
|
||||
device: 'Samsung Galaxy S8',
|
||||
os_version: '7.0',
|
||||
device: 'Samsung Galaxy S22 Ultra',
|
||||
os_version: '12.0',
|
||||
project: 'HTTP Test App',
|
||||
autoWebview: true,
|
||||
app: 'HttpTestAppAndroid',
|
||||
|
||||
@@ -536,7 +536,7 @@ describe('Common helpers', function () {
|
||||
null,
|
||||
(response) => {
|
||||
response.status.should.be.equal(errorCodes.POST_PROCESSING_FAILED);
|
||||
response.error.should.include('Unexpected token N in JSON at position 0');
|
||||
response.error.should.include('Unexpected token');
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user