From 3557b0ce063e543b5761ceb2a487e4210300e44f Mon Sep 17 00:00:00 2001 From: Christine Zoglmeier Date: Mon, 9 Dec 2024 12:56:30 +0100 Subject: [PATCH] [TEST] Adjust UidClashTest to include all 3 use cases from https://projekte.in2code.de/issues/68581 --- Tests/Browser/UidClashTest.php | 39 ++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/Tests/Browser/UidClashTest.php b/Tests/Browser/UidClashTest.php index 47f3c5694..d58840a05 100644 --- a/Tests/Browser/UidClashTest.php +++ b/Tests/Browser/UidClashTest.php @@ -9,23 +9,58 @@ use CoStack\StackTest\WebDriver\Remote\WebDriver; use Facebook\WebDriver\WebDriverBy; +/** + * Testparcours in2publish_core - 24 + */ class UidClashTest extends AbstractBrowserTestCase { /** - * Testparcours in2publish_core - 24 + * Use Case 1 + * + * Page 24 only is published in Overview Module + * Result as expected: Page is published, both categories are published, only the 2 mm-Records for page/category are published */ - public function testRelationToCategoryCanBePublishedForNewsAndPagesWithSameUid(): void + public function testUseCase1(): void { + $localDriver = WebDriverFactory::createChromeDriver(); + $foreignDriver = WebDriverFactory::createChromeDriver(); + + $this->publishPage76($localDriver); + $this->assertPage76HasBeenPublished($foreignDriver); + $this->assertBothCategoriesHaveBeenPublished($foreignDriver); + } + /** + * Use Case 2 + * + * News folder with News 24 is published in Overview Module + * Result as expected: News 24 is published, Page 24 is not published, only Category 1 is published, only the news mm-Records is published + */ + public function testUseCase2(): void + { $localDriver = WebDriverFactory::createChromeDriver(); $foreignDriver = WebDriverFactory::createChromeDriver(); $this->publishNews76($localDriver); $this->assertNews76HasBeenPublished($foreignDriver); $this->assertOnlyCategory1HasBeenPublished($foreignDriver); + } + + /** + * Use Case 3 + * + * Page 24 is published first, then News 24 + * Result as expected: first only the page, categories and 2 page mm-records are published, then the news and the news mm-record + */ + public function testUseCase3(): void + { + $localDriver = WebDriverFactory::createChromeDriver(); + $foreignDriver = WebDriverFactory::createChromeDriver(); $this->publishPage76($localDriver); + $this->publishNews76($localDriver); $this->assertPage76HasBeenPublished($foreignDriver); + $this->assertNews76HasBeenPublished($foreignDriver); $this->assertBothCategoriesHaveBeenPublished($foreignDriver); }