Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-27186

Fix editing dates in webui-ftests framework

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10, 11.1-SNAPSHOT
    • Fix Version/s: 10.10-HF07, 11.1, 2021.0
    • Component/s: Tests, Web UI
    • Environment:
      All
    • Tags:
    • Browser:
    • Team:
      QA
    • Sprint:
      QA - 11.1.7, QA - 11.1.8, QA - 11.1.9
    • Story Points:
      3

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 5 minutes
                  2h 5m