From d7a646b40050b7474c1be4285cd5a0cef92c2deb Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Mon, 1 Jul 2024 10:40:28 -0300 Subject: [PATCH] Add parameterisedTestIdentifier to remaining tests that use private API ones that aren't covered by the big helpers TODO this actually only covers ones that had private API usage as of the previous commit (702a49b); need to check other stuff if this is gonna go into main --- test/realtime/crypto.test.js | 5 +++++ test/realtime/failure.test.js | 4 ++-- test/rest/presence.test.js | 2 +- test/rest/request.test.js | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test/realtime/crypto.test.js b/test/realtime/crypto.test.js index dd548cf0c..1d83a233f 100644 --- a/test/realtime/crypto.test.js +++ b/test/realtime/crypto.test.js @@ -408,6 +408,9 @@ define(['ably', 'shared_helper', 'async', 'chai'], function (Ably, Helper, async } function single_send(done, helper, realtimeOpts, keyLength) { + // the _128 and _256 variants both call this so it makes more sense for this to be the parameterisedTestTitle instead of that set by testOnAllTransports + helper = helper.withParameterisedTestTitle('single_send'); + if (!Crypto) { done(new Error('Encryption not supported')); return; @@ -467,6 +470,8 @@ define(['ably', 'shared_helper', 'async', 'chai'], function (Ably, Helper, async }); function _multiple_send(done, helper, text, iterations, delay) { + helper = helper.withParameterisedTestTitle('multiple_send'); + if (!Crypto) { done(new Error('Encryption not supported')); return; diff --git a/test/realtime/failure.test.js b/test/realtime/failure.test.js index 4d98dd31a..5dcd1c152 100644 --- a/test/realtime/failure.test.js +++ b/test/realtime/failure.test.js @@ -447,7 +447,7 @@ define(['ably', 'shared_helper', 'async', 'chai'], function (Ably, Helper, async function nack_on_connection_failure(failureFn, expectedRealtimeState, expectedNackCode) { return function (done) { /* Use one transport because stubbing out transport#onProtocolMesage */ - var helper = this.test.helper, + var helper = this.test.helper.withParameterisedTestTitle('nack_on_connection_failure'), realtime = helper.AblyRealtime({ transports: [helper.bestTransport] }), channel = realtime.channels.get('nack_on_connection_failure'); @@ -489,7 +489,7 @@ define(['ably', 'shared_helper', 'async', 'chai'], function (Ably, Helper, async }); helper.recordPrivateApi('call.Platform.nextTick'); Ably.Realtime.Platform.Config.nextTick(function () { - failureFn(realtime, helper); + failureFn(realtime, helper.withParameterisedTestTitle(null)); }); }, ], diff --git a/test/rest/presence.test.js b/test/rest/presence.test.js index c55b7c377..fb97af0cb 100644 --- a/test/rest/presence.test.js +++ b/test/rest/presence.test.js @@ -35,7 +35,7 @@ define(['ably', 'shared_helper', 'async', 'chai'], function (Ably, Helper, async function presence_simple(operation) { return async function () { - const helper = this.test.helper; + const helper = this.test.helper.withParameterisedTestTitle('presence_simple'); var cipherParams = cipherParamsFromConfig(cipherConfig, helper); var channel = rest.channels.get('persisted:presence_fixtures', { cipher: cipherParams }); var resultPage = await channel.presence[operation](); diff --git a/test/rest/request.test.js b/test/rest/request.test.js index 78c9af404..6c858b797 100644 --- a/test/rest/request.test.js +++ b/test/rest/request.test.js @@ -176,7 +176,7 @@ define(['ably', 'shared_helper', 'async', 'chai'], function (Ably, Helper, async ['put', 'patch', 'delete'].forEach(function (method) { it('check' + method, async function () { - const helper = this.test.helper; + const helper = this.test.helper.withParameterisedTestTitle('check'); var restEcho = helper.AblyRest({ useBinaryProtocol: false, restHost: echoServerHost, tls: true }); helper.recordPrivateApi('read.Defaults.protocolVersion'); var res = await restEcho.request(method, '/methods', Defaults.protocolVersion, {}, {}, {});