コード例 #1
0
 /**
  * @test
  */
 public function setFilter_TestFilters_ShouldFilterTags()
 {
     $tagName_1 = 'Test Filter 1';
     $tagName_2 = 'Test Filter 2';
     $this->tagManagerPage->addTag($tagName_1);
     $message = $this->tagManagerPage->getAlertMessage();
     $this->assertTrue(strpos($message, 'Tag successfully saved') >= 0, 'Tag save should return success');
     $state = $this->tagManagerPage->getState($tagName_1);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->tagManagerPage->addTag($tagName_2);
     $message = $this->tagManagerPage->getAlertMessage();
     $this->assertTrue(strpos($message, 'Tag successfully saved') >= 0, 'Tag save should return success');
     $state = $this->tagManagerPage->getState($tagName_2);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->tagManagerPage->changeTagState($tagName_2, 'unpublished');
     $test = $this->tagManagerPage->setFilter('filter_published', 'Unpublished');
     $this->assertFalse($this->tagManagerPage->getRowNumber($tagName_1), 'Tag should not show');
     $this->assertEquals(1, $this->tagManagerPage->getRowNumber($tagName_2), 'Tag should be in row 1');
     $test = $this->tagManagerPage->setFilter('filter_published', 'Published');
     $this->assertFalse($this->tagManagerPage->getRowNumber($tagName_2), 'Tag should not show');
     $this->assertEquals(1, $this->tagManagerPage->getRowNumber($tagName_1), 'Tag should be in row 1');
     $this->tagManagerPage->setFilter('Select Status', 'Select Status');
     $this->tagManagerPage->trashAndDelete($tagName_1);
     $this->tagManagerPage->trashAndDelete($tagName_2);
 }
コード例 #2
0
 /**
  * @test
  */
 public function changeTagState_ChangeEnabledUsingToolbar_EnabledChanged()
 {
     $this->tagManagerPage->addTag('Test Tag');
     $state = $this->tagManagerPage->getState('Test Tag');
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->tagManagerPage->changeTagState('Test Tag', 'unpublished');
     $state = $this->tagManagerPage->getState('Test Tag');
     $this->assertEquals('unpublished', $state, 'State should be unpublished');
     $this->tagManagerPage->trashAndDelete('Test Tag');
 }