diff --git a/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php b/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php index 7c978ad0fc5c1920fc0a0cd7aa7fd8705ea31167..25e19149ddb40f1a93c8a663305b00df768f27be 100644 --- a/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php +++ b/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php @@ -147,8 +147,8 @@ class ProjectBrowserUiTest extends WebDriverTestBase { // Click 'Media' checkbox. $this->clickWithWait('#67'); - // Click 'Commerce/Advertising' checkbox. - $this->clickWithWait('#55'); + // Click 'E-commerce' checkbox. + $this->clickWithWait('#104'); // Make sure the 'Media' module category filter is applied. $this->assertEquals('Media', $this->getElementText('p.filter-applied:nth-child(2) .filter-applied__label')); @@ -167,7 +167,7 @@ class ProjectBrowserUiTest extends WebDriverTestBase { 'Kangaroo', '9 Starts With a Higher Number', ]); - $this->assertTrue($assert_session->waitForText('23 Results')); + $this->assertTrue($assert_session->waitForText('20 Results')); } /** @@ -286,11 +286,11 @@ class ProjectBrowserUiTest extends WebDriverTestBase { // Click 'Media' checkbox. $this->clickWithWait('#67', '', TRUE); - // Click 'Commerce/Advertising' checkbox. - $this->clickWithWait('#55', '', TRUE); + // Click 'E-commerce' checkbox. + $this->clickWithWait('#104', '', TRUE); // Click 'E-commerce' checkbox. - $this->clickWithWait('#104', '24 Results'); + $this->clickWithWait('#104', '18 results'); $this->assertPagerItems(['1', '2', 'Next', 'Last']); $this->clickWithWait('[aria-label="Next page"]'); @@ -611,31 +611,32 @@ class ProjectBrowserUiTest extends WebDriverTestBase { $assert_session->waitForElementVisible('css', '#developmentStatusactive'); $this->clickWithWait('#developmentStatusactive'); - // Select the Commerce/Advertising filter. - $this->clickWithWait('#55', '', TRUE); + // Select the E-commerce filter. + $assert_session->waitForElementVisible('css', '#104'); + $this->clickWithWait('#104', '', TRUE); // Select the Media filter. + $assert_session->waitForElementVisible('css', '#67'); $this->clickWithWait('#67', '', TRUE); - $this->assertTrue($assert_session->waitForText('16 Results')); + $this->assertTrue($assert_session->waitForText('15 Results')); $this->assertProjectsVisible([ 'Octopus', 'No Scrubs', 'Mad About You', - 'Looper', 'Kangaroo', 'Jazz', + 'Helvetica', 'Grapefruit', - 'Fire', 'Eggman', 'Doomer', 'Dancing Queen', 'Cream cheese on a bagel', + 'Become a Banana', ]); $this->clickWithWait('[aria-label="Next page"]'); $this->assertProjectsVisible([ - 'Become a Banana', 'Astronaut Simulator', '9 Starts With a Higher Number', '1 Starts With a Number', @@ -644,15 +645,14 @@ class ProjectBrowserUiTest extends WebDriverTestBase { // Should still be on second results page. $this->svelteInitHelper('css', '#project-browser .pb-project'); $this->assertProjectsVisible([ - 'Become a Banana', 'Astronaut Simulator', '9 Starts With a Higher Number', '1 Starts With a Number', ]); - $this->assertTrue($assert_session->waitForText('16 Results')); + $this->assertTrue($assert_session->waitForText('15 Results')); $this->assertEquals('Active', $this->getElementText('p.filter-applied:nth-child(1) .filter-applied__label')); - $this->assertEquals('Commerce/Advertising', $this->getElementText('p.filter-applied:nth-child(2) .filter-applied__label')); + $this->assertEquals('E-commerce', $this->getElementText('p.filter-applied:nth-child(2) .filter-applied__label')); $this->assertEquals('Media', $this->getElementText('p.filter-applied:nth-child(3) .filter-applied__label')); $this->clickWithWait('[aria-label="First page"]'); @@ -660,19 +660,19 @@ class ProjectBrowserUiTest extends WebDriverTestBase { 'Octopus', 'No Scrubs', 'Mad About You', - 'Looper', 'Kangaroo', 'Jazz', + 'Helvetica', 'Grapefruit', - 'Fire', 'Eggman', 'Doomer', 'Dancing Queen', 'Cream cheese on a bagel', - ]); + 'Become a Banana', + ], TRUE); $this->assertEquals('Active', $this->getElementText('p.filter-applied:nth-child(1) .filter-applied__label')); - $this->assertEquals('Commerce/Advertising', $this->getElementText('p.filter-applied:nth-child(2) .filter-applied__label')); + $this->assertEquals('E-commerce', $this->getElementText('p.filter-applied:nth-child(2) .filter-applied__label')); $this->assertEquals('Media', $this->getElementText('p.filter-applied:nth-child(3) .filter-applied__label')); } @@ -889,8 +889,9 @@ class ProjectBrowserUiTest extends WebDriverTestBase { $grid_text = $this->getElementText('#project-browser .pb-layout__main ul li:nth-child(7) .pb-project-categories ul li:nth-child(1)'); $this->assertEquals('E-commerce', $grid_text); $assert_session->elementsCount('css', '#project-browser .pb-layout__main ul li:nth-child(9) .pb-project-categories ul li', 2); - $grid_text = $this->getElementText('#project-browser .pb-layout__main ul li:nth-child(9) .pb-project-categories ul li:nth-child(1)'); - $this->assertEquals('Commerce/Advertising', $grid_text); + $x = 1; + $grid_text = $this->getElementText('#project-browser .pb-layout__main ul li:nth-child(7) .pb-project-categories ul li:nth-child(1)'); + $this->assertEquals('E-commerce', $grid_text); $grid_text = $this->getElementText('#project-browser .pb-layout__main ul li:nth-child(9) .pb-project-categories ul li:nth-child(2)'); $this->assertEquals('E-commerce', $grid_text); }