microsoft / PowerApps-TestEngine

MIT License
101 stars 29 forks source link

Fixed Relative Path for Embedded JSSDK #242

Closed arpavan closed 1 year ago

arpavan commented 1 year ago

Description

The current logic for getting the relative path for the embedded JSSDK (JS\CanvasAppSdk.js and JS\PublishedAppTesting.js) returns the current working directory path and therefore does not account for the application running from any directory (i.e., executable path added to the PATH variable and invoked from anywhere on the computer). Due to this, when executed from outside the source code default build output, the application looks for the embedded JSSDK within the directory from where the command was invoked (e.g., C:\Users\{username}\Desktop\JS\CanvasAppSdk.js) which is clearly incorrect.

This logic has now been changed wherein we will now compute the path to the executing assembly so that irrespective of where the application is invoked from, the relative path to the embedded JSSDK will always remain relative to the assembly location (where it is expected that the embedded JSSDK files will live alongside the assembly binary).

Checklist

github-actions[bot] commented 1 year ago

Code Coverage

Package Line Rate Branch Rate Complexity Health
Microsoft.PowerApps.TestEngine 91% 87% 824
Summary 91% (2170 / 2390) 87% (500 / 572) 824

Minimum allowed line rate is 50%