/**
  * @test
  */
 public function setFilter_TestFilters_ShouldFilterTags()
 {
     $feedName_1 = 'Test Filter 1';
     $feedName_2 = 'Test Filter 2';
     $this->newsFeedManagerPage->addFeed($feedName_1);
     $message = $this->newsFeedManagerPage->getAlertMessage();
     $this->assertTrue(strpos($message, 'News feed successfully saved') >= 0, 'NewsFeed save should return success');
     $state = $this->newsFeedManagerPage->getState($feedName_1);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->newsFeedManagerPage->addFeed($feedName_2);
     $message = $this->newsFeedManagerPage->getAlertMessage();
     $this->assertTrue(strpos($message, 'News feed successfully saved') >= 0, 'NewsFeed save should return success');
     $state = $this->newsFeedManagerPage->getState($feedName_2);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->newsFeedManagerPage->changeFeedState($feedName_2, 'Unpublished');
     $test = $this->newsFeedManagerPage->setFilter('filter_published', 'Unpublished');
     $this->assertFalse($this->newsFeedManagerPage->getRowNumber($feedName_1), 'NewsFeed should not show');
     $this->assertEquals(1, $this->newsFeedManagerPage->getRowNumber($feedName_2), 'NewsFeed should be in row 1');
     $test = $this->newsFeedManagerPage->setFilter('filter_published', 'Published');
     $this->assertFalse($this->newsFeedManagerPage->getRowNumber($feedName_2), 'NewsFeed should not show');
     $this->assertEquals(5, $this->newsFeedManagerPage->getRowNumber($feedName_1), 'NewsFeed should be in row 5');
     $this->newsFeedManagerPage->setFilter('Select Status', 'Select Status');
     $this->newsFeedManagerPage->trashAndDelete($feedName_1);
     $this->newsFeedManagerPage->trashAndDelete($feedName_2);
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function changeFeedState_ChangeEnabledUsingToolbar_EnabledChanged()
 {
     $this->newsFeedManagerPage->addFeed('Test Feed');
     $state = $this->newsFeedManagerPage->getState('Test Feed');
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->newsFeedManagerPage->changeFeedState('Test Feed', 'unpublished');
     $state = $this->newsFeedManagerPage->getState('Test Feed');
     $this->assertEquals('unpublished', $state, 'State should be unpublished');
     $this->newsFeedManagerPage->trashAndDelete('Test Feed');
 }