Skip to content

Commit b14d572

Browse files
CopilotAlexJSully
andauthored
Add test files for .fhirpath, .fsh, and .feature file types (#29)
## Plan: Add Example Test Files for File Types - [x] Create `test-fhirpath.fhirpath` file with example FHIRPath content - [x] Create `test-fsh.fsh` file with example FHIR Shorthand content - [x] Create `test-feature.feature` file with example Gherkin BDD test content - [x] Verify files are created correctly and follow the pattern of existing test files - [x] Run validation to ensure no issues introduced (all tests passed) - [x] Simplify test-feature.feature to only include Scenario Outline with background - [x] Simplify test-fhirpath.fhirpath by removing observations and age calculation examples <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > On file-types-test, Can we add the following example test files in `workspace-wiki/example/file-types-test/` for the following please: > ``` > .fhirpath > .fsh > .feature (Gherkin feature BDD test file) > ``` </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: AlexJSully <[email protected]>
1 parent 9786604 commit b14d572

File tree

4 files changed

+72
-11
lines changed

4 files changed

+72
-11
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# test-feature.feature
2+
# This is a Gherkin feature file for BDD testing in Workspace Wiki
3+
4+
Feature: Workspace Wiki File Type Support
5+
As a developer
6+
I want to test different file types
7+
So that the Workspace Wiki extension can handle various documentation formats
8+
9+
Background:
10+
Given the Workspace Wiki extension is installed
11+
And the workspace contains the file-types-test directory
12+
13+
Scenario Outline: Handle different file extensions
14+
Given I have a file with extension "<extension>"
15+
When the Workspace Wiki scans the workspace
16+
Then the file should be "<visibility>" in the tree view
17+
18+
Examples:
19+
| extension | visibility |
20+
| .md | visible |
21+
| .txt | visible |
22+
| .html | visible |
23+
| .js | hidden |
24+
| .py | hidden |
25+
| .fhirpath | hidden |
26+
| .fsh | hidden |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// test-fhirpath.fhirpath
2+
// This is a FHIRPath expression file for testing Workspace Wiki file type support
3+
4+
// FHIRPath is a navigation and extraction language for FHIR resources
5+
// Used in healthcare interoperability to query and filter FHIR data
6+
7+
// Example: Get patient's first name
8+
Patient.name.first().given.first()
9+
10+
// Example: Check if patient is active
11+
Patient.active = true
12+
13+
// Example: Filter medications by status
14+
MedicationRequest.where(status = 'active')
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// test-fsh.fsh
2+
// This is a FHIR Shorthand (FSH) file for testing Workspace Wiki file type support
3+
4+
// FHIR Shorthand is a domain-specific language for defining FHIR resources
5+
// Used in healthcare interoperability to create FHIR Implementation Guides
6+
7+
Profile: ExamplePatientProfile
8+
Parent: Patient
9+
Id: example-patient
10+
Title: "Example Patient Profile"
11+
Description: "An example patient profile for testing purposes"
12+
* name 1..* MS
13+
* name.given 1..* MS
14+
* name.family 1..1 MS
15+
* birthDate 1..1 MS
16+
* active 1..1 MS
17+
18+
Instance: ExamplePatientInstance
19+
InstanceOf: ExamplePatientProfile
20+
Usage: #example
21+
Title: "Example Patient Instance"
22+
Description: "An example patient instance for testing"
23+
* name.given = "John"
24+
* name.family = "Doe"
25+
* birthDate = "1980-01-01"
26+
* active = true
27+
28+
ValueSet: ExampleValueSet
29+
Id: example-value-set
30+
Title: "Example Value Set"
31+
Description: "An example value set for testing"
32+
* include codes from system http://example.org/fhir/CodeSystem/example-codes

package-lock.json

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)