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

add support for test mode detection in modulename.js via index.html #3631

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

sdetweil
Copy link
Collaborator

in some cases the modulename.js may need to detect running in test mode (compliments pr #3630)

window.name is not set web mode

add a new field to the index.html
window.intest
and use the server_function to replace the hard coded string like we do for window.mmversion=#VERSION#
then change the two test helpers to set the env variable
app.js detects and sets global.intest=true
server func replace with value of global.intest

then module can use if(window.intest)

@sdetweil
Copy link
Collaborator Author

enhancement for #3610

@sdetweil sdetweil self-assigned this Nov 11, 2024
tests/electron/helpers/global-setup.js Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@rejas rejas merged commit 56cb536 into MagicMirrorOrg:develop Nov 12, 2024
10 checks passed
@sdetweil sdetweil deleted the add_test_flag_for_browser_side branch November 12, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants