protected function AutosaveFormTest::makeFormChanges in Thunder 8.3
Same name and namespace in other branches
- 8.5 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()
- 6.1.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 97
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');
$fieldValues = [
'title[0][value]' => 'New title',
'field_tags[]' => [
[
5,
'Drupal',
],
'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);
}