-
Notifications
You must be signed in to change notification settings - Fork 297
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
🧪 Create Cypress test for Roles of variables #5614
base: main
Are you sure you want to change the base?
Changes from 9 commits
654c81b
7b38ef0
4ccdba7
3ef2087
5d12eac
2cbbe27
217f65d
617d711
371ae1f
9ad3217
cfe0fd3
2bbf795
985af40
904ea71
7c5c672
79c4362
46b7968
8bd27c7
9c7324f
3e31c63
87ce57d
ed32219
25bb87c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -610,6 +610,7 @@ def parse(): | |
response['has_sleep'] = True | ||
|
||
response['variables'] = transpile_result.roles_of_variables | ||
response['show_roles'] = show_roles_of_variables() | ||
except Exception: | ||
pass | ||
|
||
|
@@ -2918,6 +2919,7 @@ def on_offline_mode(): | |
env_defaults = dict( | ||
BASE_URL=f"http://localhost:{config['port']}/", | ||
ADMIN_USER="admin", | ||
SHOW_ROLES=False, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great!! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to change this to "false" or "False" I'm seeing that they require the values of the env variables to be strings. |
||
) | ||
for key, value in env_defaults.items(): | ||
if key not in os.environ: | ||
|
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ let TRADUCTION: Map<string,string>; | |
|
||
//Feature flag for variable and values view | ||
let variable_view = true; | ||
let showRoles = false; | ||
//let showRoles = true; | ||
let step_debugger = false; | ||
const fullLineCommands = [ | ||
'print', | ||
|
@@ -79,6 +79,7 @@ export function load_variables(variables: any) { | |
if (variables[i][1]) { | ||
const variableName = variables[i][0].replace(/^_/, ''); | ||
const role = programData?.variables[variableName]; | ||
const showRoles = programData?.show_roles; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you're having a problem with this, because you need to add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I already had |
||
if (showRoles) { | ||
variableList.append(`<li style=color:${variables[i][2]}>${variableName}: ${variables[i][1]} (${role})</li>`); | ||
} else { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's not defined inside
app.py
you need to use this function as :utils.show_roles_of_variables()