Ejemplo n.º 1
0
 /**
  * create archived NewsFeed and then verify its existence.
  *
  * @return void
  *
  * @test
  */
 public function setFilter_TestFilters_ShouldFilterTags2()
 {
     $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, 'News feed 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, 'News feed save should return success');
     $state = $this->newsFeedManagerPage->getState($feedName_2);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->newsFeedManagerPage->changeFeedState($feedName_2, 'Archived');
     $this->newsFeedManagerPage->setFilter('filter_published', 'Archived');
     $this->assertFalse($this->newsFeedManagerPage->getRowNumber($feedName_1), 'News feed should not show');
     $this->assertGreaterThanOrEqual(1, $this->newsFeedManagerPage->getRowNumber($feedName_2), 'Test News feed should be present');
     $this->newsFeedManagerPage->setFilter('filter_published', 'Published');
     $this->assertFalse($this->newsFeedManagerPage->getRowNumber($feedName_2), 'News feed should not show');
     $this->assertGreaterThanOrEqual(1, $this->newsFeedManagerPage->getRowNumber($feedName_1), 'Test News feed should be present');
     $this->newsFeedManagerPage->setFilter('Select Status', 'Select Status');
     $this->newsFeedManagerPage->trashAndDelete($feedName_1);
     $this->newsFeedManagerPage->trashAndDelete($feedName_2);
 }
Ejemplo 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');
 }