From b14e00853d51562964177d9f91c22b059ede4a43 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 30bdfe02708..d77202f3f5b 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -3153,6 +3153,13 @@ public function theResponseShouldContain(string $method, string $user, string $s 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 = \sort(\explode(",", $value)); + $actualTags = \sort(\explode(",",$responseValue)); + Assert::assertEquals($expectedTags, $actualTags, "wrong $findItem in the response"); + break; default: Assert::assertEquals($value, $responseValue, "wrong $findItem in the response"); break;