Skip to content

Commit

Permalink
[RND-611] Adds an e2e test to show that we can insert an EducationCon…
Browse files Browse the repository at this point in the history
…tent witho… (#276)

* Adds an e2e test to show that we can insert an EducationContent without shortDescription, contentClassDescriptor and learningResourceMetadataURI

* Removes unnecessary check from the new test.
  • Loading branch information
DavidJGapCR authored Jul 28, 2023
1 parent e3f1d2b commit 4067013
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"@edfi/meadowlark-core": "^v0.3.6-pre-36",
"@edfi/meadowlark-utilities": "^v0.3.6-pre-36",
"@edfi/metaed-core": "^4.1.2-dev.18",
"@edfi/metaed-core": "^4.1.2-dev.20",
"@elastic/elasticsearch": "^8.8.1",
"@elastic/transport": "^8.3.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"@edfi/meadowlark-core": "^v0.3.6-pre-36",
"@edfi/meadowlark-utilities": "^v0.3.6-pre-36",
"@edfi/metaed-core": "^4.1.2-dev.18",
"@edfi/metaed-core": "^4.1.2-dev.20",
"@opensearch-project/opensearch": "^2.2.1"
},
"devDependencies": {
Expand Down
34 changes: 17 additions & 17 deletions Meadowlark-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Meadowlark-js/packages/meadowlark-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"@edfi/ed-fi-model-3.1": "3.0.1",
"@edfi/ed-fi-model-3.3b": "3.0.1",
"@edfi/meadowlark-utilities": "^v0.3.6-pre-36",
"@edfi/metaed-core": "^4.1.2-dev.18",
"@edfi/metaed-plugin-edfi-api-schema": "^4.1.2-dev.18",
"@edfi/metaed-plugin-edfi-unified": "^4.1.2-dev.18",
"@edfi/metaed-core": "^4.1.2-dev.20",
"@edfi/metaed-plugin-edfi-api-schema": "^4.1.2-dev.20",
"@edfi/metaed-plugin-edfi-unified": "^4.1.2-dev.20",
"@isaacs/ttlcache": "^1.4.1",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
Expand Down
22 changes: 22 additions & 0 deletions Meadowlark-js/tests/e2e/endpoints/educationContents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@ describe('Education contents', () => {
contentClassDescriptor = await getDescriptorByLocation(contentClassDescriptorLocation);
});

// The Data Standard defines EducationContent.LearningResource as a required "Choice".
// The MetaEd documentation notes that this "requirement" will not be enforced by the API, and in fact the ODS/API does not enforce it.
describe('when creating an EducationContent without shortDescription, contentClassDescriptor and learningResourceMetadataURI', () => {
beforeAll(async () => {
const contentIdentifier = generateRandomId();
educationContentLocation = await createResource({
endpoint: 'educationContents',
body: {
contentIdentifier,
namespace: '43211',
},
});
});

it('should create the education content', async () => {
await rootURLRequest()
.get(educationContentLocation)
.auth(await getAccessToken('vendor'), { type: 'bearer' })
.expect(200);
});
});

describe('Create', () => {
it('should create an education content', async () => {
const contentIdentifier = generateRandomId();
Expand Down

0 comments on commit 4067013

Please sign in to comment.