-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
[webpack] App manager tests #35662
[webpack] App manager tests #35662
Conversation
'use strict'; | ||
const uiElementKeyValueList = hqImport("hqwebapp/js/ui_elements/bootstrap3/ui-element-key-val-list"); | ||
|
||
hqDefine("app_manager/js/forms/form_workflow", [ |
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.
@@ -1,4 +1,22 @@ | |||
hqDefine('app_manager/js/releases/releases', function () { | |||
hqDefine("app_manager/js/releases/releases", [ |
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.
Linting in #35653 |
import sinon from "sinon/pkg/sinon"; | ||
|
||
import Toggles from "hqwebapp/js/toggles"; | ||
import FormWorkflow from "app_manager/js/forms/form_workflow"; |
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.
is it possible to do an import statement like
import {FormWorkflow} from "app_manager/js/forms/form_workflow";
so that we avoid the FormWorkflow.FormWorkflow
situation below?
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.
hmm nvm perhaps that isn't possible because it's not importing from an ESM module
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.
I'd need to update the return value of app_manager/js/forms/form_workflow
and therefore the other code that depends on that module. I might get there - I don't like FormWorkflow. FormWorkflow
either - but not in this PR.
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.
sounds good to me!
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.
This looks good! I just have a minor annoyance with the FormWorkflow.FormWorkflow
situation that's happening, but not sure if that's avoidable...
Safety Assurance
Safety story
This is largely test code. The main risk is that adding explicit dependencies to
releases.js
andform_workflow.js
could have introduced problems: because these are used on pages that don't use js bundling at all and rely on script tags instead, all of the dependencies are loaded synchronously at the time the file is loaded, which means that all dependencies' script tags need to have already been included.Automated test coverage
It's mostly tests. I smoke tested the releases page and the form workflow UI.
QA Plan
No.
Rollback instructions
Labels & Review