@@ -7,7 +7,10 @@ import {
77 type RillTimeAsOfLabel ,
88 RillTimeLabel ,
99} from "@rilldata/web-common/features/dashboards/url-state/time-ranges/RillTime.ts" ;
10- import { GrainAliasToV1TimeGrain } from "@rilldata/web-common/lib/time/new-grains" ;
10+ import {
11+ getLowerOrderGrain ,
12+ GrainAliasToV1TimeGrain ,
13+ } from "@rilldata/web-common/lib/time/new-grains" ;
1114import { V1TimeGrain } from "@rilldata/web-common/runtime-client" ;
1215import type { DateTimeUnit } from "luxon" ;
1316import nearley from "nearley" ;
@@ -98,7 +101,7 @@ function getMultiPeriodTestCases(n: number): TestCase[] {
98101
99102function getPeriodToDateTestCases ( ) : TestCase [ ] {
100103 return GRAINS . map ( ( g ) => {
101- const protoGrain = GrainAliasToV1TimeGrain [ g ] ;
104+ const protoGrain = getLowerOrderGrain ( GrainAliasToV1TimeGrain [ g ] ) ;
102105 const label = capitalizeFirstChar ( `${ GRAIN_TO_LUXON [ g ] } to date` ) ;
103106 return < TestCase [ ] > [
104107 [ `${ g } TD as of watermark/${ g } ` , label , true , protoGrain , undefined ] ,
@@ -111,6 +114,8 @@ function getPeriodToDateTestCases(): TestCase[] {
111114 ] ,
112115
113116 [ `${ g } TD as of watermark/h` , label , true , protoGrain , undefined ] ,
117+
118+ [ `${ g } TD` , label , false , protoGrain , undefined ] ,
114119 ] ;
115120 } ) . flat ( ) ;
116121}
0 commit comments