From 3c998771296cae2e952eee6407d4f920a1d6b559 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 8 Jun 2023 11:21:28 +0545 Subject: [PATCH] adjust compare oc:tags lists --- tests/acceptance/features/bootstrap/SpacesContext.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 30bdfe0270..4918c9e46a 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -3153,6 +3153,15 @@ class SpacesContext implements Context { case "oc:privatelink": Assert::assertEquals($this->getPrivateLink($user, $spaceNameOrMountPoint), $responseValue, 'cannot find private link for space or resource in the response'); break; + case "oc:tags": + // The value should be a comma-separated string of tag names. + // We do not care what order they happen to be in, so compare as sorted lists. + $expectedTags = \explode(",", $value); + $expectedTags = \sort($expectedTags); + $actualTags = \explode(",", $responseValue); + $actualTags = \sort($actualTags); + Assert::assertEquals($expectedTags, $actualTags, "wrong $findItem in the response"); + break; default: Assert::assertEquals($value, $responseValue, "wrong $findItem in the response"); break;