Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template treatment functionality (stages + fields), conditions #111

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

evanping
Copy link
Collaborator

No description provided.

Copy link

cypress bot commented Dec 4, 2024

deliberation-researcher-portal    Run #170

Run Properties:  status check passed Passed #170  •  git commit a8d91a2531: conditional rendering within templates
Project deliberation-researcher-portal
Branch Review evan-timeline
Run status status check passed Passed #170
Run duration 03m 40s
Commit git commit a8d91a2531: conditional rendering within templates
Committer Evan Ping
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 16
View all changes introduced in this branch ↗︎

@evanping
Copy link
Collaborator Author

Working test treatment that uses templates stages + elements, fields, conditions:

templates:
  - templateName: testA
    templateContent:
      - type: prompt
        file: projects/example/multipleChoiceColors.md
      - type: submitButton
        buttonText: Finish Stage 1
        conditions:
          - comparator: exists
            reference: prompt.Colors
  - templateName: testB
    templateContent:
      - name: GameStageTemplate
        duration: 200
        elements:
          - type: prompt
            file: projects/example/multipleChoiceColors.md
          - type: submitButton
            buttonText: ${submitButtonText}
treatments:
  - name: simple template test
    playerCount: 1
    gameStages:
      - name: TestTemplateA
        duration: 150
        elements:
          - template: testA
      - name: TestStage
        duration: 300
        elements:
          - name: ExitTicket
            type: prompt
            file: projects/example/multipleChoiceColors.md
          - name: submitButton
            type: submitButton
            buttonText: Finish Stage 2
            conditions:
              - comparator: doesNotEqual
                reference: prompt.ExitTicket
                value: 1
      - template: testB
        fields:
          submitButtonText: Finish Stage 3

@evanping evanping changed the title Template treatment functionality (stages + fields) Template treatment functionality (stages + fields), conditions Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant