2 declare(strict_types = 1);
34 $I->useExistingSession(
'admin');
52 $I->amGoingTo(
'Create new CE with image');
53 $I->click(
'.t3js-page-new-ce a');
54 $I->switchToMainFrame();
55 $I->waitForElement(
'.t3js-modal.in');
57 $I->waitForElementNotVisible(
'div#nprogess');
58 $I->click(
'Text & Images');
59 $I->switchToContentFrame();
60 $I->waitForText(
'Create new Page Content on page');
61 $I->fillField(
'//input[contains(@data-formengine-input-name, "data[tt_content]") and contains(@data-formengine-input-name, "[header]")]',
'tt_content with image');
64 $I->click(
'Add image');
66 $I->switchToIFrame(
'modal_frame');
67 $I->click(
'.list-tree-control-closed');
68 $I->click(
'styleguide');
69 $I->click(
'bus_lane.jpg');
71 $I->switchToContentFrame();
72 $I->waitForText(
'bus_lane.jpg');
74 $I->see(
'Set element specific value (No default)',
'.t3js-form-field-eval-null-placeholder-checkbox');
76 $I->seeElementInDOM(
'//input[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[title]")]', [
'placeholder' =>
'',
'value' =>
'']);
77 $I->seeElementInDOM(
'//input[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[alternative]")]', [
'placeholder' =>
'',
'value' =>
'']);
78 $I->seeElementInDOM(
'//textarea[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[description]")]', [
'placeholder' =>
'']);
80 $I->seeInField(
'//textarea[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[description]")]',
'');
82 $I->click(
'button[name="_savedok"]');
84 $I->click(
'a[title="Close"]');
86 $I->amGoingTo(
'Change default metadata');
87 $I->switchToMainFrame();
88 $I->click(
'Filelist');
89 $I->switchToIFrame(
'typo3-navigationContainerIframe');
90 $I->waitForText(
'fileadmin/ (auto-created)');
91 $I->click(
'styleguide');
94 $I->switchToContentFrame();
95 $I->click(
'bus_lane.jpg');
96 $I->waitForText(
'Edit File Metadata "bus_lane.jpg" on root level');
97 $I->fillField(
'//input[contains(@data-formengine-input-name, "data[sys_file_metadata]") and contains(@data-formengine-input-name, "[title]")]',
'Test title');
98 $I->fillField(
'//textarea[contains(@data-formengine-input-name, "data[sys_file_metadata]") and contains(@data-formengine-input-name, "[description]")]',
'Test description');
99 $I->fillField(
'//input[contains(@data-formengine-input-name, "data[sys_file_metadata]") and contains(@data-formengine-input-name, "[alternative]")]',
'Test alternative');
101 $I->click(
'button[name="_savedok"]');
103 $I->click(
'a[title="Close"]');
105 $I->amGoingTo(
'Check metadata of sys_file_reference displayed in tt_content');
107 $I->switchToWindow();
108 $I->switchToContentFrame();
109 $I->click(
'tt_content with image');
110 $I->waitForElementNotVisible(
'#t3js-ui-block');
111 $I->waitForText(
'Edit Page Content "tt_content with image" on page "styleguide TCA demo"');
113 $I->click(
'.form-irre-header');
115 $I->see(
'(Default: "Test title")',
'.t3js-form-field-eval-null-placeholder-checkbox');
116 $I->see(
'(Default: "Test alternative")',
'.t3js-form-field-eval-null-placeholder-checkbox');
117 $I->see(
'(Default: "Test description")',
'.t3js-form-field-eval-null-placeholder-checkbox');
119 $I->seeElementInDOM(
'//input[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[title]")]', [
'placeholder' =>
'Test title',
'value' =>
'']);
120 $I->seeElementInDOM(
'//input[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[alternative]")]', [
'placeholder' =>
'Test alternative',
'value' =>
'']);
121 $I->seeElementInDOM(
'//textarea[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[description]")]', [
'placeholder' =>
'Test description']);
123 $I->seeInField(
'//textarea[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[description]")]',
'');
145 $I->amGoingTo(
'Create new CE with image with filled metadata');
146 $I->click(
'.t3js-page-new-ce a');
147 $I->switchToMainFrame();
148 $I->waitForElement(
'.t3js-modal.in');
150 $I->waitForElementNotVisible(
'div#nprogess');
151 $I->click(
'Text & Images');
152 $I->switchToContentFrame();
153 $I->waitForText(
'Create new Page Content on page');
154 $I->fillField(
'//input[contains(@data-formengine-input-name, "data[tt_content]") and contains(@data-formengine-input-name, "[header]")]',
'tt_content with image with filled metadata');
157 $I->click(
'Add image');
158 $I->switchToWindow();
159 $I->switchToIFrame(
'modal_frame');
160 $I->click(
'.list-tree-control-closed');
161 $I->click(
'styleguide');
162 $I->click(
'bus_lane.jpg');
163 $I->switchToWindow();
164 $I->switchToContentFrame();
165 $I->waitForText(
'bus_lane.jpg');
167 $I->waitForText(
'Image Metadata');
169 $I->seeInField(
'//input[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[title]")]',
'');
170 $I->seeInField(
'//input[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[alternative]")]',
'');
171 $I->seeInField(
'//textarea[contains(@data-formengine-input-name, "data[sys_file_reference]") and contains(@data-formengine-input-name, "[description]")]',
'');
173 $I->see(
'(Default: "Test title")',
'.t3js-form-field-eval-null-placeholder-checkbox');
174 $I->see(
'(Default: "Test alternative")',
'.t3js-form-field-eval-null-placeholder-checkbox');
175 $I->see(
'(Default: "Test description")',
'.t3js-form-field-eval-null-placeholder-checkbox');
177 $I->amGoingTo(
'assert checkboxes are not checked');
178 $I->dontSeeCheckboxIsChecked(
'//input[contains(@name, "[title]") and @type="checkbox" and contains(@name, "control[active][sys_file_reference]")]');
179 $I->dontSeeCheckboxIsChecked(
'//input[contains(@name, "[alternative]") and @type="checkbox" and contains(@name, "control[active][sys_file_reference]")]');
180 $I->dontSeeCheckboxIsChecked(
'//input[contains(@name, "[description]") and @type="checkbox" and contains(@name, "control[active][sys_file_reference]")]');
182 $I->amGoingTo(
'Assert hidden control field value (default value which is used when checkbox is not checked');
183 $I->seeInField(
'//input[contains(@name, "[title]") and @type="hidden" and contains(@name, "control[active][sys_file_reference]")]', 0);
184 $I->seeInField(
'//input[contains(@name, "[alternative]") and @type="hidden" and contains(@name, "control[active][sys_file_reference]")]', 0);
185 $I->seeInField(
'//input[contains(@name, "[description]") and @type="hidden" and contains(@name, "control[active][sys_file_reference]")]', 0);
189 $I->seeInField(
'input.form-control:disabled',
'Test title');
190 $I->seeInField(
'input.form-control:disabled',
'Test alternative');
191 $I->seeInField(
'textarea.form-control:disabled',
'Test description');
202 $I->switchToMainFrame();
204 $I->waitForElement(
'svg .nodes .node');
205 $pageTree->openPath([
'styleguide TCA demo']);
206 $I->switchToContentFrame();
207 $I->waitForText(
'styleguide TCA demo');