Skip to content

Commit

Permalink
[INTERNAL] projectPreprocessor tests: Adopt to required namespaces
Browse files Browse the repository at this point in the history
Tests are failing due to SAP/ui5-builder#430

Adopt tests to provide necessary manifest.json files and expect the
corresponding namespace information.
  • Loading branch information
RandomByte committed Mar 23, 2020
1 parent e7b4504 commit 159a6a8
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 8 deletions.
13 changes: 13 additions & 0 deletions test/fixtures/application.a/webapp/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"_version": "1.1.0",
"sap.app": {
"_version": "1.1.0",
"id": "id1",
"type": "application",
"applicationVersion": {
"version": "1.2.2"
},
"embeds": ["embedded"],
"title": "{{title}}"
}
}

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

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

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

3 changes: 3 additions & 0 deletions test/lib/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ test("Project with project-shim extension with dependency configuration", (t) =>
type: "application",
metadata: {
name: "xy",
namespace: "id1"
},
resources: {
configuration: {
Expand Down Expand Up @@ -175,6 +176,7 @@ test("Project with project-shim extension with dependency declaration and config
type: "application",
metadata: {
name: "xy",
namespace: "id1"
},
resources: {
configuration: {
Expand Down Expand Up @@ -348,6 +350,7 @@ test("Project with project-shim extension with collection", (t) => {
type: "application",
metadata: {
name: "xy",
namespace: "id1"
},
resources: {
configuration: {
Expand Down
24 changes: 18 additions & 6 deletions test/lib/projectPreprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ test("Project with inline configuration", (t) => {
type: "application",
metadata: {
name: "xy",
namespace: "id1"
},
resources: {
configuration: {
Expand Down Expand Up @@ -71,7 +72,8 @@ test("Project with configPath", (t) => {
_level: 0,
type: "application",
metadata: {
name: "application.b"
name: "application.b",
namespace: "id1"
},
resources: {
configuration: {
Expand Down Expand Up @@ -107,7 +109,8 @@ test("Project with ui5.yaml at default location", (t) => {
_level: 0,
type: "application",
metadata: {
name: "application.a"
name: "application.a",
namespace: "id1"
},
resources: {
configuration: {
Expand Down Expand Up @@ -194,7 +197,8 @@ test("No type configured for root project", (t) => {
path: path.join(__dirname, "../fixtures/application.a"),
dependencies: [],
metadata: {
name: "application.a"
name: "application.a",
namespace: "id1"
}
};
return t.throwsAsync(projectPreprocessor.processTree(tree),
Expand Down Expand Up @@ -328,7 +332,8 @@ test("Ignores additional application-projects", (t) => {
_level: 0,
type: "application",
metadata: {
name: "application.a"
name: "application.a",
namespace: "id1"
},
resources: {
configuration: {
Expand Down Expand Up @@ -418,7 +423,8 @@ test("Inconsistent dependencies with same ID", (t) => {
_level: 0,
type: "application",
metadata: {
name: "application.a"
name: "application.a",
namespace: "id1"
},
resources: {
configuration: {
Expand Down Expand Up @@ -689,7 +695,8 @@ const expectedTreeWithInvalidModules = {
"specVersion": "1.0",
"type": "application",
"metadata": {
"name": "application.a"
"name": "application.a",
"namespace": "id1"
},
"_level": 0,
"kind": "project",
Expand Down Expand Up @@ -831,6 +838,7 @@ const expectedTreeAWithInlineConfigs = {
"type": "application",
"metadata": {
"name": "application.a",
"namespace": "id1"
},
"resources": {
"configuration": {
Expand Down Expand Up @@ -945,6 +953,7 @@ const expectedTreeAWithConfigPaths = {
"type": "application",
"metadata": {
"name": "application.a",
"namespace": "id1"
},
"resources": {
"configuration": {
Expand Down Expand Up @@ -1402,6 +1411,7 @@ const expectedTreeApplicationCycleA = {
"type": "application",
"metadata": {
"name": "application.cycle.a",
"namespace": "id1"
},
"dependencies": [
{
Expand All @@ -1424,6 +1434,7 @@ const expectedTreeApplicationCycleA = {
"type": "library",
"metadata": {
"name": "library.cycle.a",
"namespace": "cycle/a",
"copyright": "${copyright}"
},
"dependencies": [
Expand Down Expand Up @@ -1464,6 +1475,7 @@ const expectedTreeApplicationCycleA = {
"type": "library",
"metadata": {
"name": "library.cycle.b",
"namespace": "cycle/b",
"copyright": "${copyright}"
},
"dependencies": [
Expand Down

0 comments on commit 159a6a8

Please sign in to comment.