protected function AutosaveFormTest::makeFormChanges in Thunder 6.1.x
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::makeFormChanges()
- 8.3 tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::makeFormChanges()
- 8.4 tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::makeFormChanges()
- 6.2.x tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::makeFormChanges()
- 6.0.x tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::makeFormChanges()
Make some changes to the article.
1 call to AutosaveFormTest::makeFormChanges()
- AutosaveFormTest::testAutosaveInExistingEntity in tests/
src/ FunctionalJavascript/ Integration/ AutosaveFormTest.php - Tests the autosave functionality in an existing article.
File
- tests/
src/ FunctionalJavascript/ Integration/ AutosaveFormTest.php, line 98
Class
- AutosaveFormTest
- Tests the autosave support for nodes in Thunder.
Namespace
Drupal\Tests\thunder\FunctionalJavascript\IntegrationCode
protected function makeFormChanges() {
$page = $this
->getSession()
->getPage();
$this
->expandAllTabs();
$this
->addTextParagraph('field_paragraphs', 'Awesome quote', 'quote');
$startTimestamp = strtotime('-2 days');
$endTimestamp = strtotime('+1 day');
$term = $this
->loadTermByUuid('35bdba6e-9b45-472a-8fda-11e7e69de71b');
$fieldValues = [
'title[0][value]' => 'New title',
'field_tags[]' => [
[
$term
->id(),
$term
->getName(),
],
'Tag2',
],
'publish_on[0][value][date]' => date('Y-m-d', $startTimestamp),
'publish_on[0][value][time]' => date('H:i:s', $startTimestamp),
'unpublish_on[0][value][date]' => date('Y-m-d', $endTimestamp),
'unpublish_on[0][value][time]' => date('H:i:s', $endTimestamp),
'publish_state[0]' => 'published',
'unpublish_state[0]' => 'unpublished',
];
$this
->setFieldValues($page, $fieldValues);
// Wait for autosave to be triggered.
sleep(3);
}