chore: fix Android CI build

This commit is contained in:
Sefa Ilkimen
2025-12-02 05:15:45 +01:00
parent 41861aa2ec
commit 3678f5f6e1
6 changed files with 56 additions and 23 deletions

View File

@@ -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": {}
}
}
}
}

View File

@@ -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');
}
},
];

View File

@@ -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',

View File

@@ -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');
}
);