Merge pull request #620 from DJ2LS/dev-fix-gui-tests

Fixing gui tests
This commit is contained in:
DJ2LS 2024-01-25 07:07:56 +01:00 committed by GitHub
commit aa3034411d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 15 deletions

View file

@ -19,22 +19,8 @@
"files": [
"dist",
"dist-electron",
"../modem/server.dist/",
],
"extraResources": [
{
"from": "../modem/server.dist/",
"to": "modem",
"filter": [
"**/*",
"!**/.git"
]
}
],
"mac": {
"target": [

View file

@ -105,6 +105,12 @@ export function getAppDataPath() {
const platform = os.platform();
let appDataPath;
// Check if running in GitHub Actions
const isGitHubActions = process.env.GITHUB_ACTIONS === "true";
if (isGitHubActions) {
return "/home/runner/work/FreeDATA/FreeDATA/gui/config";
}
switch (platform) {
case "darwin": // macOS
appDataPath = path.join(os.homedir(), "Library", "Application Support");

View file

@ -7,7 +7,15 @@ const nconf = require("nconf");
var appDataPath = getAppDataPath();
var configFolder = path.join(appDataPath, "FreeDATA");
var configPath = path.join(configFolder, "config.json");
let configFile = "config.json";
const isGitHubActions = process.env.GITHUB_ACTIONS === "true";
if (isGitHubActions) {
configFile = "example.json";
configFolder = appDataPath;
}
var configPath = path.join(configFolder, configFile);
console.log("AppData Path:", appDataPath);
console.log(configFolder);