At this moment it is not possible to edit dates using the plugin-nuxeo-web-ui framework.
When trying to edit a date field what happens is that the new date is written without erasing the previous one, making the first date to prevail.
How to reproduce
- edit a ftest(ex: create_doc.feature) making it possible to edit a date field
- run the test
- the date is never edited
I made a workaround for now in my project by changing a step definition by making the date to be erased when it has any value:
Then(/^I can edit the following properties in the (.+) metadata :$/, function (docType, table) { const browser = this.ui.browser; browser.editButton.waitForVisible(); browser.editButton.click(); const form = browser.editForm(docType); form.waitForVisible(); form.layout.waitForVisible(); //workaround to clear the date field when is not empty const hasDate = form.el.element('vaadin-text-field'); if (hasDate.getValue() !== null && hasDate.getValue() !== '') { hasDate.element('div[part="clear-button"]').click(); } form.layout.fillMultipleValues(table); form.save(); });
Note: This is probably something that can be fixed in layout.js
- is required by
-
NXS-5314 Refactor afected studio itests after ftest framework fixes
- Resolved