-
-
Save minalsharma888/450e862fce9949e783a83073777fbbe2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\Tests\patternkit\FunctionalJavascript; | |
use Drupal\Tests\patternkit\FunctionalJavascript\PKBrowserTestBase; | |
class BlockAddTest extends PKBrowserTestBase | |
{ | |
static protected $modules= | |
['patternkit_example']; | |
/** | |
* Verify successful page load after installation. | |
* | |
* @throws \Behat\Mink\Exception\ResponseTextException | |
*/ | |
public function testPKExampleBlock() { | |
$this->drupalLogin($this->editorUser); | |
$assert = $this->assertSession(); | |
$page = $this->getSession()->getPage(); | |
$this->drupalGet('/patternkit_block/add/patternkit_atoms_example_src_example'); | |
$page->fillField('edit-info-0-value','Patternkit'); | |
$page->pressButton('edit-submit'); | |
$page->fillField('root[text]','Test'); | |
$page->fillField('root[formatted_text]','Test'); | |
$page->pressButton('Content type'); | |
$page->checkField('visibility[entity_bundle:node][bundles][page]'); | |
$page->selectFieldOption('edit-region','Content'); | |
$page->pressButton('edit-actions-submit'); | |
sleep(10); | |
$filename = "fail.jpg"; | |
// Capture a screenshot to help with debugging. | |
$this->createScreenshot(\Drupal::root() . '/sites/default/files/simpletest/' . $filename); | |
// $page->pressButton('visibility[entity_bundle:node][bundles][article]'); | |
// $block_rows->pressButton('visibility[entity_bundle:node][bundles][article]'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment