Add e2e test and confirm support for datetime date list widget

Created on 30 March 2025, 25 days ago

Overview

Child of [#3487284)]

Proposed resolution

Remove 'field_xbt_datetime_datelist'code> from skipped fields in <code>xb_test_article_fields_install
Add explicit e2e coverage to entity-form-field-types-test.cy.js for datetime date list widget

User interface changes

πŸ“Œ Task
Status

Active

Version

0.0

Component

Redux-integrated field widgets

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @larowlan
  • Merge request !861Issue #3516342 date time date list widget β†’ (Open) created by larowlan
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • πŸ‡ͺπŸ‡ΈSpain isholgueras

    I've tested it and it works well for me, test included.

    The only issue I've found, that I guess only affects my environment and, even though, is not important as it's a test module is that I can't uninstall the module:

    ╰─ ddev drush pmu xb_test_article_fields                                                                            ─╯
    
    In ExceptionHandler.php line 52:
                                                                                                                          
      SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual tha  
      t corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 1 OFFSET 0' at line 5: SELECT  
       1 AS "expression"                                                                                                  
      FROM                                                                                                                
      "node_revision__field_xbt_path" "t"                                                                                 
      WHERE                                                                                                               
      LIMIT 1 OFFSET 0; Array                                                                                             
      (                                                                                                                   
      )                                                                                                                   
                                                                                                                          
    
    In StatementWrapperIterator.php line 113:
                                                                                                                          
      SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual tha  
      t corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 1 OFFSET 0' at line 5          
                                                                                                                          
    

    I'll let others to test in case they also have the same issue with the uninstall.

    Note: I haven't reinstalled the site.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • Pipeline finished with Success
    16 days ago
    Total: 1862s
    #468797
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Rebased this off 0.x which includes a conflict free approach from πŸ“Œ Add e2e tests for telephone widget in page data form Active

  • Pipeline finished with Success
    16 days ago
    Total: 1895s
    #468894
  • Pipeline finished with Success
    15 days ago
    Total: 1459s
    #469692
  • Pipeline finished with Success
    10 days ago
    Total: 1886s
    #473548
  • First commit to issue fork.
  • Pipeline finished with Failed
    7 days ago
    Total: 678s
    #476234
  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    Even if the test is passing, when I select a value the select box "clears". We should show the selected option.
    I'm guessing this is caused by the change in πŸ“Œ Add e2e test and confirm support for date range date list widget Active , as @isholgueras reported this worked for him.

  • Pipeline finished with Success
    7 days ago
    Total: 2594s
    #476236
  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    This was not catched on the tests. The select "clears" visually, but the data is stored and posted correctly, and after publishing and refreshing the page you can see the values you selected.

    The cause is the options are casted as ints in parseValue at function-utils.js. when the values on the select are strings. It happens too in field_xbt_daterange_datelist.
    Not sure how to fix this visually AND on the stored data, which requires ints. But hope this helps.
    We would need some way to ensure in Cypress that the value selected is actually visible too. We are actually forcing the hidden select.

        // Radix renders these as a hidden element with a button to trigger, so
        // we have to use force.
        cy.get(`@${key}`).select(String(value), { force: true });
    

    but we need to check the button label is changed too to the right value I guess?

  • Pipeline finished with Failed
    7 days ago
    Total: 1640s
    #476288
  • Pipeline finished with Failed
    7 days ago
    Total: 1855s
    #476611
  • First commit to issue fork.
  • Pipeline finished with Success
    6 days ago
    Total: 1889s
    #476882
  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    LGTM!

Production build 0.71.5 2024