/**
  * @test
  */
 public function setFilter_TestFilters_ShouldFilterTags()
 {
     $salt = rand();
     $categoryName_1 = 'ABC_TEST_1' . $salt;
     $categoryName_2 = 'ABC_TEST_2' . $salt;
     $this->categoryManagerPage->addCategory($categoryName_1);
     $message = $this->categoryManagerPage->getAlertMessage();
     $this->assertTrue(strpos($message, 'Category successfully saved') >= 0, 'Category save should return success');
     $state = $this->categoryManagerPage->getState($categoryName_1);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->categoryManagerPage->addCategory($categoryName_2);
     $message = $this->categoryManagerPage->getAlertMessage();
     $this->assertTrue(strpos($message, 'Category successfully saved') >= 0, 'Category save should return success');
     $state = $this->categoryManagerPage->getState($categoryName_2);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->categoryManagerPage->changeCategoryState($categoryName_2, 'unpublished');
     $test = $this->categoryManagerPage->setFilter('filter_published', 'Unpublished');
     $this->assertFalse($this->categoryManagerPage->getRowNumber($categoryName_1), 'Category should not show');
     $this->categoryManagerPage->searchFor($categoryName_2);
     $this->assertEquals(1, $this->categoryManagerPage->getRowNumber($categoryName_2), 'Category should be in row 1');
     $test = $this->categoryManagerPage->setFilter('filter_published', 'Published');
     $this->assertFalse($this->categoryManagerPage->getRowNumber($categoryName_2), 'Category should not show');
     $this->categoryManagerPage->searchFor($categoryName_1);
     $this->assertEquals(1, $this->categoryManagerPage->getRowNumber($categoryName_1), 'Category should be in row 1');
     $this->categoryManagerPage->setFilter('Select Status', 'Select Status');
     $this->categoryManagerPage->trashAndDelete('ABC_TEST');
 }
 /**
  * @test
  */
 public function changeCategoryState_ChangeEnabledUsingToolbar_EnabledChanged()
 {
     $salt = rand();
     $this->categoryManagerPage = $this->getPageObject('CategoryManagerPage');
     $this->categoryManagerPage->addCategory('ABC_Test', $salt);
     $state = $this->categoryManagerPage->getState('ABC_Test');
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->categoryManagerPage->changeCategoryState('ABC_Test', 'unpublished');
     $state = $this->categoryManagerPage->getState('ABC_Test');
     $this->assertEquals('unpublished', $state, 'State should be unpublished');
     $this->categoryManagerPage->trashAndDelete('ABC_Test');
 }
 /**
  * change the tate of the category
  *
  * @return void
  *
  * @test
  */
 public function changeCategoryState_ChangeEnabledUsingToolbar_EnabledChanged()
 {
     $salt = rand();
     $categoryName = 'Test Category ' . $salt;
     $this->categoryManagerPage = $this->getPageObject('CategoryManagerPage');
     $this->categoryManagerPage->addCategory($categoryName);
     $state = $this->categoryManagerPage->getState($categoryName);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->categoryManagerPage->changeCategoryState($categoryName, 'unpublished');
     $state = $this->categoryManagerPage->getState($categoryName);
     $this->assertEquals('unpublished', $state, 'State should be unpublished');
     $this->categoryManagerPage->trashAndDelete($categoryName);
     $this->assertFalse($this->categoryManagerPage->getRowNumber($categoryName), 'Test category should not be present');
 }