@contractspec/example.learning-journey-platform-tour 1.46.2 → 1.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import type {
2
- PresentationSpecMeta,
3
- PresentationSpec,
1
+ import {
2
+ definePresentation,
3
+ StabilityEnum,
4
+ type PresentationSpecMeta,
4
5
  } from '@contractspec/lib.contracts';
5
- import { StabilityEnum } from '@contractspec/lib.contracts';
6
6
  import { PlatformTourTrackModel } from '../operations';
7
7
 
8
8
  const baseMeta: Pick<
@@ -18,7 +18,7 @@ const baseMeta: Pick<
18
18
  context: 'Used in platform tour dashboard and widgets',
19
19
  };
20
20
 
21
- export const PlatformTourTrackPresentation: PresentationSpec = {
21
+ export const PlatformTourTrackPresentation = definePresentation({
22
22
  meta: {
23
23
  key: 'learning.journey.platform.track',
24
24
  version: '1.0.0',
@@ -32,9 +32,9 @@ export const PlatformTourTrackPresentation: PresentationSpec = {
32
32
  props: PlatformTourTrackModel,
33
33
  },
34
34
  targets: ['react', 'markdown', 'application/json'],
35
- };
35
+ });
36
36
 
37
- export const PlatformTourWidgetPresentation: PresentationSpec = {
37
+ export const PlatformTourWidgetPresentation = definePresentation({
38
38
  meta: {
39
39
  key: 'learning.journey.platform.widget',
40
40
  version: '1.0.0',
@@ -47,7 +47,7 @@ export const PlatformTourWidgetPresentation: PresentationSpec = {
47
47
  componentKey: 'LearningTrackProgressWidget',
48
48
  },
49
49
  targets: ['react'],
50
- };
50
+ });
51
51
 
52
52
  export const platformTourPresentations = [
53
53
  PlatformTourTrackPresentation,
@@ -0,0 +1,31 @@
1
+ import { defineTestSpec } from '@contractspec/lib.contracts';
2
+
3
+ export const GetTrackTest = defineTestSpec({
4
+ meta: {
5
+ key: 'learningJourney.platformTour.getTrack.test',
6
+ version: '1.0.0',
7
+ stability: 'experimental',
8
+ owners: ['@example.learning-journey-platform-tour'],
9
+ description: 'Test for getting platform tour track',
10
+ tags: ['test'],
11
+ },
12
+ target: {
13
+ type: 'operation',
14
+ operation: {
15
+ key: 'learningJourney.platformTour.getTrack',
16
+ version: '1.0.0',
17
+ },
18
+ },
19
+ scenarios: [
20
+ {
21
+ key: 'success',
22
+ when: { operation: { key: 'learningJourney.platformTour.getTrack' } },
23
+ then: [{ type: 'expectOutput', match: {} }],
24
+ },
25
+ {
26
+ key: 'error',
27
+ when: { operation: { key: 'learningJourney.platformTour.getTrack' } },
28
+ then: [{ type: 'expectError' }],
29
+ },
30
+ ],
31
+ });