2 declare(strict_types = 1);
30 $I->useExistingSession(
'admin');
33 $I->click(
'Template');
35 $I->switchToContentFrame();
36 $I->waitForElementVisible(
'#ts-overview');
37 $I->see(
'Template tools');
45 $I->wantTo(
'show templates overview on root page (uid = 0)');
46 $I->switchToMainFrame();
48 $I->click(
'.node.identifier-0_0');
49 $I->switchToContentFrame();
50 $I->waitForElementVisible(
'#ts-overview');
51 $I->see(
'This is an overview of the pages in the database containing one or more template records. Click a page title to go to the page.');
53 $I->wantTo(
'show templates overview on website root page (uid = 1 and pid = 0)');
54 $I->switchToMainFrame();
56 $I->click(
'.node.identifier-0_1');
57 $I->switchToContentFrame();
58 $I->waitForText(
'No template');
59 $I->see(
'There was no template on this page!');
60 $I->see(
'You need to create a template record below in order to edit your configuration.');
64 '#TypoScriptTemplateModuleController',
66 'newWebsite' =>
'Create template for a new site',
67 'createExtension' =>
'Click here to create an extension template.',
77 $I->wantTo(
'create a new site template');
78 $I->switchToMainFrame();
79 $I->click(
'.node.identifier-0_1');
80 $I->switchToContentFrame();
81 $I->waitForText(
'Create new website');
82 $I->click(
"//input[@name='newWebsite']");
83 $I->waitForText(
'Edit constants for template');
85 $I->wantTo(
'change to Info/Modify and see the template overview table');
86 $I->selectOption(
'.t3-js-jumpMenuBox',
'Info/Modify');
87 $I->waitForElement(
'.table-fit');
90 $I->see(
'Description');
93 $I->see(
'Edit the whole template record');
94 $I->click(
'Edit the whole template record');
96 $I->wantTo(
'change the title and save the template');
97 $I->waitForElement(
'#EditDocumentController');
99 $I->fillField(
'//input[@data-formengine-input-name="data[sys_template][1][title]"]',
'Acceptance Test Site');
100 $I->click(
"//button[@name='_savedok']");
101 $I->waitForElementNotVisible(
'#t3js-ui-block', 30);
102 $I->waitForElement(
'#EditDocumentController');
103 $I->waitForElementNotVisible(
'#t3js-ui-block');
105 $I->wantTo(
'change the setup, save the template and close the form');
107 $config = $I->grabTextFrom(
'//textarea[@data-formengine-input-name="data[sys_template][1][config]"]');
108 $config = str_replace(
'HELLO WORLD!',
'Hello Acceptance Test!', $config);
109 $I->fillField(
'//textarea[@data-formengine-input-name="data[sys_template][1][config]"]', $config);
111 $I->click(
'//*/button[@name="_savedok"][1]');
112 $I->waitForElement(
'a.t3js-editform-close');
113 $I->click(
'a.t3js-editform-close');
115 $I->wantTo(
'see the changed title');
116 $I->waitForElement(
'.table-fit');
117 $I->see(
'Acceptance Test Site');
119 $I->wantTo(
'change the template within the TypoScript Object Browser');
120 $I->selectOption(
'.t3-js-jumpMenuBox',
'TypoScript Object Browser');
121 $I->waitForText(
'Current template');
122 $I->see(
'CONSTANTS ROOT');
123 $I->selectOption(
'//select[@name="SET[ts_browser_type]"]',
'Setup');
124 $I->waitForText(
'SETUP ROOT');
126 $I->see(
'[page] = PAGE');
127 $I->click(
'//span[@class="list-tree-label"]/a[text()=\'page\']/../../a');
129 $I->waitForText(
'[10] = TEXT');
130 $I->click(
'//span[@class="list-tree-label"]/a[text()=\'page\']/../../../ul//span[@class="list-tree-label"]/a[text()=\'10\']/../../a');
132 $I->waitForText(
'[value] = Hello Acceptance Test!');
133 $I->click(
'//span[@class="list-tree-label"]/a[text()=\'10\']/../../../ul//span[@class="list-tree-label"]/a[text()=\'value\']');
134 $I->waitForText(
'page.10.value =');
135 $I->fillField(
'//input[@name="data[page.10.value][value]"]',
'HELLO WORLD!');
136 $I->click(
'//input[@name="update_value"]');
138 $I->waitForText(
'Value updated');
139 $I->see(
'page.10.value = HELLO WORLD!');
140 $I->see(
'[value] = HELLO WORLD!');