$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','delete Page','Make sure there is no delete button on the default display.');
$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','Delete Page','Make sure there is no delete button on the default display.');
$this->drupalGet($path_prefix.'/page_1');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','delete Page','Make sure there is a delete button on the page display.');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','Delete Page','Make sure there is a delete button on the page display.');
// Delete the page, so we can test the undo process.
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete','undo delete of Page','Make sure there a undo button on the page display after deleting.');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete','Undo delete of Page','Make sure there a undo button on the page display after deleting.');
$element=$this->xpath('//a[contains(@href, :href) and contains(@class, :class)]',array(':href'=>$path_prefix.'/page_1',':class'=>'views-display-deleted-link'));
$this->assertTrue(!empty($element),'Make sure the display link is marked as to be deleted.');
...
...
@@ -78,12 +78,12 @@ public function testRemoveDisplay() {
$this->assertTrue(!empty($element),'Make sure the display link is marked as to be deleted.');
// Undo the deleting of the display.
$this->drupalPost($path_prefix.'/page_1',array(),'undo delete of Page');
$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete','undo delete of Page','Make sure there is no undo button on the page display after reverting.');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','delete Page','Make sure there is a delete button on the page display after the reverting.');
$this->drupalPost($path_prefix.'/page_1',array(),'Undo delete of Page');
$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete','Undo delete of Page','Make sure there is no undo button on the page display after reverting.');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete','Delete Page','Make sure there is a delete button on the page display after the reverting.');
$this->assertLinkByHref($path_prefix.'/block_1',0,'Make sure after cloning the new display appears in the UI');
$this->assertUrl($path_prefix.'/block_1',array(),'The user got redirected to the new display.');
$this->assertText(t('Block settings'));
...
...
@@ -201,12 +201,12 @@ public function testDisableDisplay() {
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-disable','','Make sure the disable button is visible.');
$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-enable','','Make sure the enable button is not visible.');
$this->drupalPost(NULL,array(),'disable Page');
$this->drupalPost(NULL,array(),'Disable Page');
$this->assertTrue($this->xpath('//div[contains(@class, :class)]',array(':class'=>'views-display-disabled')),'Make sure the disabled display css class appears once the display is marked as such.');
$this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-disable','','Make sure the disable button is not visible.');
$this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-enable','','Make sure the enable button is visible.');
$this->drupalPost(NULL,array(),'enable Page');
$this->drupalPost(NULL,array(),'Enable Page');
$this->assertFalse($this->xpath('//div[contains(@class, :class)]',array(':class'=>'views-display-disabled')),'Make sure the disabled display css class does not appears once the display is enabled again.');