Title: Can't import files from an outside relative path? · Issue #213 · browserstack/browserstack-runner · GitHub
Open Graph Title: Can't import files from an outside relative path? · Issue #213 · browserstack/browserstack-runner
X Title: Can't import files from an outside relative path? · Issue #213 · browserstack/browserstack-runner
Description: When importing files in my index.html that are relative to a folder outside theindex.html one, the test seems to fail as it seems it is not importing those files. I start getting messages like "X is not defined", "X is not a constructor"...
Open Graph Description: When importing files in my index.html that are relative to a folder outside theindex.html one, the test seems to fail as it seems it is not importing those files. I start getting messages like "X i...
X Description: When importing files in my index.html that are relative to a folder outside theindex.html one, the test seems to fail as it seems it is not importing those files. I start getting messages like &quo...
Opengraph URL: https://github.com/browserstack/browserstack-runner/issues/213
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't import files from an outside relative path?","articleBody":"When importing files in my `index.html` that are relative to a folder outside the`index.html` one, the test seems to fail as it seems it is not importing those files. \r\nI start getting messages like \"X is not defined\", \"X is not a constructor\" etc.\r\n\r\n## Expected Behavior\r\nUsing relative paths pointing to files outside the main folder should work.\r\n\r\n## Actual Behavior\r\nUsing relative paths pointing to files outside the main folder doesn't work.\r\n\r\n## Steps to Reproduce the Problem\r\n\r\n```html\r\n\u003c!DOCTYPE html\u003e\r\n\u003chtml\u003e\r\n \u003chead\u003e\r\n \u003clink rel=\"stylesheet\" href=\"./nada/qunit-1.18.0.css\"\u003e\r\n \u003cscript type=\"text/javascript\" src=\"../src/demo.js\"\u003e\u003c/script\u003e\r\n \u003c/head\u003e\r\n \u003cbody\u003e\r\n \u003cdiv id=\"qunit\"\u003e\u003c/div\u003e\r\n \u003cdiv id=\"qunit-fixture\"\u003e\u003c/div\u003e\r\n\r\n \u003cscript src=\"./nada/qunit-2.5.1.js\"\u003e\u003c/script\u003e\r\n \u003cscript type=\"text/javascript\"\u003e\r\n QUnit.test(\"isEven returns true for even numbers\", function(assert){\r\n assert.ok(isEven(10), \"10 is even\");\r\n });\r\n \u003c/script\u003e\r\n \u003c/body\u003e\r\n\u003c/html\u003e\r\n```\r\n\r\nShowing the following error:\r\n\r\n\u003e isEven is not defined\r\n\r\nWhich won't show when changing the demo.js file path from `../src/` to `./` or any subfolder within the same folder.\r\n\r\n```html\r\n\u003cscript type=\"text/javascript\" src=\"../test/demo.js\"\u003e\u003c/script\u003e\r\n``` \r\n\r\n\r\n## browserstack.json\r\n\r\n```js\r\n{\r\n \"test_framework\" : \"qunit\",\r\n \"test_path\": \"pepe.html\",\r\n \"browsers\": [\r\n \"firefox_previous\"\r\n ]\r\n}\r\n``` \r\n\r\n## Platform details\r\n \r\n 1. browserstack-runner version: latest\r\n 2. node version: v10.13.0\r\n 3. os type and version: Mac OS X 10.14.3\r\n\r\n## Details\r\n","author":{"url":"https://github.com/alvarotrigo","@type":"Person","name":"alvarotrigo"},"datePublished":"2019-06-12T11:53:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/213/browserstack-runner/issues/213"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ea57a145-2927-9269-d085-d87c0df9203b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B416:3AE3D1:6E6F5C8:9218BF5:696DD9D7 |
| html-safe-nonce | e20a1b2f523a8db68d3fa240962692e5007be4d1e5e16fe55f7101063c89a082 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDE2OjNBRTNEMTo2RTZGNUM4OjkyMThCRjU6Njk2REQ5RDciLCJ2aXNpdG9yX2lkIjoiNDk4NTE5MTc3MzcxNDExMDkzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d02f7a77f2a7ec749a3b6055b057dfae73093dcd640c9ef3675cb218585d0909 |
| hovercard-subject-tag | issue:455169444 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/browserstack/browserstack-runner/213/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c1fca0715b5e0a5bf23fda7484705e9cc0db40caa092fe66e0f68d8730f058b1/browserstack/browserstack-runner/issues/213 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c1fca0715b5e0a5bf23fda7484705e9cc0db40caa092fe66e0f68d8730f058b1/browserstack/browserstack-runner/issues/213 |
| og:image:alt | When importing files in my index.html that are relative to a folder outside theindex.html one, the test seems to fail as it seems it is not importing those files. I start getting messages like "X i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alvarotrigo |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064 |
| turbo-cache-control | no-preview |
| go-import | github.com/browserstack/browserstack-runner git https://github.com/browserstack/browserstack-runner.git |
| octolytics-dimension-user_id | 1119453 |
| octolytics-dimension-user_login | browserstack |
| octolytics-dimension-repository_id | 11685362 |
| octolytics-dimension-repository_nwo | browserstack/browserstack-runner |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 11685362 |
| octolytics-dimension-repository_network_root_nwo | browserstack/browserstack-runner |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7e5ae23c70136152637ceee8d6faceb35596ec46 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width