From e20de5f1d7895f2052e844df5c73465d08e8adc0 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:22:18 -0500 Subject: [PATCH] Allow 'should be able to cancel a snap' test to pass when a cancel successfully occurs (backport #7351) [release/4.10.x] (#7362) Co-authored-by: Nick Tessier <22119573+nick4598@users.noreply.github.com> --- .../nick-fix-flaky-test_2024-11-13-14-57.json | 10 ++++++++++ .../src/frontend/IModelConnection.test.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 common/changes/@itwin/rpcinterface-full-stack-tests/nick-fix-flaky-test_2024-11-13-14-57.json diff --git a/common/changes/@itwin/rpcinterface-full-stack-tests/nick-fix-flaky-test_2024-11-13-14-57.json b/common/changes/@itwin/rpcinterface-full-stack-tests/nick-fix-flaky-test_2024-11-13-14-57.json new file mode 100644 index 000000000000..724ee9bcb71b --- /dev/null +++ b/common/changes/@itwin/rpcinterface-full-stack-tests/nick-fix-flaky-test_2024-11-13-14-57.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/rpcinterface-full-stack-tests", + "comment": "change the assert in the test 'should be able to cancel a snap' to match the error message thrown on the frontend when a snap is successfully cancelled.", + "type": "none" + } + ], + "packageName": "@itwin/rpcinterface-full-stack-tests" +} \ No newline at end of file diff --git a/full-stack-tests/rpc-interface/src/frontend/IModelConnection.test.ts b/full-stack-tests/rpc-interface/src/frontend/IModelConnection.test.ts index 10c5aeb442e6..a9488d68851f 100644 --- a/full-stack-tests/rpc-interface/src/frontend/IModelConnection.test.ts +++ b/full-stack-tests/rpc-interface/src/frontend/IModelConnection.test.ts @@ -409,7 +409,7 @@ describe("Snapping", () => { expect(snap.status).not.to.be.undefined; } catch (err: any) { // This is what we expect if the cancellation occurs in time to really cancel the snap. - expect(err.message).to.equal("aborted"); + expect(err.message).to.equal("Unknown server response code."); } }); });