Test for a later start date in a date range

Created on 21 March 2024, 8 months ago
Updated 10 April 2024, 8 months ago

Problem/Motivation

This issue is a contribution of a test, which can check if an error is thrown when a later start date is entered for a date range, compared to the end date.

Steps to reproduce

  1. Run tests for the module
  2. Observe there is no check for an error when a later start date is entered for a date range

Proposed resolution

Creation of a test.

Remaining tasks

I will be submitting a code change with a test, then request a review to have the test merged.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ“Œ Task
Status

Fixed

Version

4.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chadhester

Live updates comments and jobs are added and updated live.
  • testing

    Used for Documentation issues related to testing and test development

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @chadhester
  • Status changed to Needs review 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States chadhester

    I may need to create a separate issue to handle the missing schema definition, which causes an error when running this test.

  • Pipeline finished with Failed
    8 months ago
    Total: 184s
    #128860
  • Issue was unassigned.
  • πŸ‡ΊπŸ‡ΈUnited States chadhester

    Confirming that an error is thrown if the test is run:

    Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for field.field.node.smart_date_content.field_date with the following errors: field.field.node.smart_date_content.field_date:default_value.0.default_end_date_type missing schema, field.field.node.smart_date_content.field_date:default_value.0.default_end_date missing schema
    

    I can put the fix in another dependent issue:

    chadhester@example-d10-web:/var/www/html/web/modules/contrib/smart_date$ git diff config/schema/smart_date.schema.yml 
    diff --git a/config/schema/smart_date.schema.yml b/config/schema/smart_date.schema.yml
    index 53d9410..930e05d 100644
    --- a/config/schema/smart_date.schema.yml
    +++ b/config/schema/smart_date.schema.yml
    @@ -38,6 +38,12 @@ field.value.smartdate:
         default_date:
           type: string
           label: 'Default start date value'
    +    default_end_date_type:
    +      type: string
    +      label: 'Default end date type'
    +    default_end_date:
    +      type: string
    +      label: 'Default end date value'
         min:
           type: string
           label: 'Minimum Date'
    
  • Pipeline finished with Success
    8 months ago
    Total: 287s
    #128954
  • Pipeline finished with Success
    8 months ago
    Total: 236s
    #128960
  • Pipeline finished with Success
    8 months ago
    Total: 180s
    #129889
  • Pipeline finished with Success
    8 months ago
    Total: 211s
    #129897
  • First commit to issue fork.
  • Status changed to RTBC 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    This test looks great to me.
    I resolved my last comment by updating sooner to earlier for minor semantic reasons, I didn't want to block progress on this for that issue.

    Assuming tests still pass, I'm marking this as RTBC.

  • Pipeline finished with Success
    8 months ago
    Total: 185s
    #129943
  • Pipeline finished with Success
    8 months ago
    Total: 182s
    #129955
  • First commit to issue fork.
  • Pipeline finished with Skipped
    8 months ago
    #130475
  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA
  • πŸ‡¨πŸ‡¦Canada mandclu

    This has been merged in. Thanks for everyone's work on this!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024