From 85efd2ac6e99e720dc9858cc86a40feae62b0c5a Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Wed, 9 Oct 2024 22:22:23 +0300 Subject: [PATCH] match step expected content after replacing actual data --- test_engine/menu_traversal_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_engine/menu_traversal_test.go b/test_engine/menu_traversal_test.go index dc55782..98f36a2 100644 --- a/test_engine/menu_traversal_test.go +++ b/test_engine/menu_traversal_test.go @@ -160,6 +160,7 @@ func TestSendWithInvalidInputs(t *testing.T) { // Replace placeholder {public_key} with the actual dynamic public key expectedContent := bytes.Replace([]byte(step.ExpectedContent), []byte("{public_key}"), []byte(publicKey), -1) + step.ExpectedContent = string(expectedContent) match, err := step.MatchesExpectedContent(b) if err != nil { t.Fatalf("Error compiling regex for step '%s': %v", step.Input, err) @@ -338,6 +339,7 @@ func TestMyAccount_MyAddress(t *testing.T) { publicKey := extractPublicKey(b) expectedContent := bytes.Replace([]byte(step.ExpectedContent), []byte("{public_key}"), []byte(publicKey), -1) + step.ExpectedContent = string(expectedContent) match, err := step.MatchesExpectedContent(b) if err != nil { t.Fatalf("Error compiling regex for step '%s': %v", step.Input, err)