diff --git a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsProvider.test.tsx b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsProvider.test.tsx index 32b218d77e1..b318af372a8 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsProvider.test.tsx +++ b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsProvider.test.tsx @@ -480,11 +480,11 @@ describe('StudioAnnouncementsProvider', () => { expect(result.current.unseenAnnouncements).toEqual([]) expect(result.current.studioAnnouncements).toEqual([]) }) - test('if the audience is below-than-or-equal-version and studio is above', () => { + test('if the audience is less-than-or-equal-version and studio is above', () => { const announcements: StudioAnnouncementDocument[] = [ { ...mockAnnouncements[1], - audience: 'below-than-or-equal-version', + audience: 'less-than-or-equal-version', studioVersion: '3.56.0', }, ] @@ -497,11 +497,11 @@ describe('StudioAnnouncementsProvider', () => { expect(result.current.unseenAnnouncements).toEqual([]) expect(result.current.studioAnnouncements).toEqual([]) }) - test('if the audience is below-than-or-equal-version and studio is below', () => { + test('if the audience is less-than-or-equal-version and studio is below', () => { const announcements: StudioAnnouncementDocument[] = [ { ...mockAnnouncements[1], - audience: 'below-than-or-equal-version', + audience: 'less-than-or-equal-version', studioVersion: '3.58.0', }, ] @@ -514,11 +514,11 @@ describe('StudioAnnouncementsProvider', () => { expect(result.current.unseenAnnouncements).toEqual(announcements) expect(result.current.studioAnnouncements).toEqual(announcements) }) - test('if the audience is below-than-or-equal-version and studio is equal', () => { + test('if the audience is less-than-or-equal-version and studio is equal', () => { const announcements: StudioAnnouncementDocument[] = [ { ...mockAnnouncements[1], - audience: 'below-than-or-equal-version', + audience: 'less-than-or-equal-version', studioVersion: '3.57.0', }, ] diff --git a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/utils.test.ts b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/utils.test.ts index 9452fc4372c..823a80a5de6 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/utils.test.ts +++ b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/utils.test.ts @@ -77,7 +77,7 @@ describe('isValidAnnouncementAudience', () => { }) }) describe('when audience is "below-version"', () => { - const document = {audience: 'below-than-or-equal-version', studioVersion: '3.55.0'} as const + const document = {audience: 'less-than-or-equal-version', studioVersion: '3.55.0'} as const test('should return false when sanityVersion is above document.studioVersion', () => { const sanityVersion = '3.56.0' expect(isValidAnnouncementAudience(document, sanityVersion)).toBe(false) diff --git a/packages/sanity/src/core/studio/studioAnnouncements/types.ts b/packages/sanity/src/core/studio/studioAnnouncements/types.ts index 28bae67cea7..0e841435be9 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/types.ts +++ b/packages/sanity/src/core/studio/studioAnnouncements/types.ts @@ -27,7 +27,7 @@ export interface StudioAnnouncementDocument { | 'everyone' | 'specific-version' | 'greater-than-or-equal-version' - | 'below-than-or-equal-version' + | 'less-than-or-equal-version' audienceRole?: AudienceRole[] | undefined studioVersion?: string preHeader: string diff --git a/packages/sanity/src/core/studio/studioAnnouncements/utils.ts b/packages/sanity/src/core/studio/studioAnnouncements/utils.ts index e970de8d3c1..b2142ce83c6 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/utils.ts +++ b/packages/sanity/src/core/studio/studioAnnouncements/utils.ts @@ -25,7 +25,7 @@ export function isValidAnnouncementAudience( return satisfies(sanityVersion, `>= ${document.studioVersion}`, { includePrerelease: true, }) - case 'below-than-or-equal-version': + case 'less-than-or-equal-version': return satisfies(sanityVersion, `<= ${document.studioVersion}`, { includePrerelease: true, })