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

Absolute webapp paths produce confusing error message #91

Closed
mlenkeit opened this issue Jul 23, 2019 · 0 comments · Fixed by #115
Closed

Absolute webapp paths produce confusing error message #91

mlenkeit opened this issue Jul 23, 2019 · 0 comments · Fixed by #115
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@mlenkeit
Copy link
Member

When configuring custom webapp paths as described in the docs and using absolute paths, karma-ui5 produces a confusing error message.

Error message:

Could not find defined path to your "webapp" folder.

Please check if the configured path is correct:

module.exports = function(config) {
	config.set({

		ui5: {
			type: "application",
			paths: {
				webapp: "/xxx/openui5-sample-app/webapp" 	<-- Not found
			}
		}

	});
};
Sample config
const path = require("path");

module.exports = function(config) {
	"use strict";

	config.set({

		frameworks: ["ui5"],

		browsers: ["Chrome"],

		browserConsoleLogOptions: {
			level: "error"
		},

		ui5: {
			type: "application",
			paths: {
				// webapp: "webapp" // <-- works
				webapp: path.resolve(__dirname, "webapp") // <-- does not work
			}
		}

	});
};

Repo/branch to reproduce:

https://github.com/mlenkeit/openui5-sample-app/tree/absolute-path-bug

Expected behavior:
a) it just works (preferred), or
b) it returns an error that absolute paths are not allowed (not to difficult with path.isAbsolute), or at least
c) adjust the docs to state that it has to be a relative path

@matz3 matz3 self-assigned this Jul 26, 2019
@matz3 matz3 added bug Something isn't working good first issue Good for newcomers labels Jul 26, 2019
matz3 added a commit that referenced this issue Sep 5, 2019
@matz3 matz3 closed this as completed in #115 Sep 5, 2019
matz3 added a commit that referenced this issue Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants