-
Notifications
You must be signed in to change notification settings - Fork 84
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
feat(vscode): Update path in workspace to save unit tests #4510
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ccastrotrejo
added a commit
that referenced
this pull request
Dec 6, 2024
* fix(vscode): Register unit test commands (#3819) * Add commands to package.json * Register commands * Add command bar items * Update unit test file creation * Start save unit tests * Update edit and see results * feat(designer): Add unit test state slice in designer (#3845) * Add unit test store * Add selector to get definition * Add serializer for unit test definition * Fix unit tests path * Fix edit unit test * Add deserializer for unit test definition * Add unit test to designer options and add unit test view in local app * feat(designer): Implementation of mocked results and assertions tab (#3864) * Set read only mode for unit test * Add mocked results tab to side panel * Update deserializer * Add assertions panel * Add assertions list * Register assertions in state * Add switch to assertions panel to vscode * Update get assertions keys * Update command bar logic * Update mocked results * Revert settings * Update Peek to CodeEditor component * Add isolateTab implementation * Update classname to generic one * feat(vscode): Update unit test definition for vscode deserialization (#3876) * Fix deserialization of unit tests definition * Update paths to run unit tests * Add mocked results tab * fix(designer): Update assertions list to have dropdown, name and description (#3895) * Move assertions ui to designer-ui * Update assertionns styles * Add expand button to list of assertions * Update styles for assertion list * Add logic to render save button * Update assertions footer * Update fields update * Update assertions styles * Update schema of assertions * Update the update of assertions * Update serializer and deserializer * Update strings * feat(designer): Implement condition builder in assertions side panel (#3909) * Add token field to assertion * Send and parse expression property from unit test definition * Add tokens and token picker * Send function to close in token picker * Send expression to save expression state * Update serialize condition expression * Update parameters * Update serializer of assertions expression * Update expression save * Log unit test serialization * Remove comments * Remove static variables * feat(vscode): Add telemetry handling to unit test vscode events (#3913) Add Telemetry to vscode events * feat(designer): Update assertions icons to new fluent UI components (#3923) * Update icons to new fluent components * Add dispatch to delete function * fix(vscode): Update assertions panel to follow parameters behavior (#4125) * Update expanded and editable modes * Update isEditable property * Better handle for update assertions * feat(designer): Resizable side panel (#4134) * Initial implementation * Specify for resizable custom sidepanels * Implement Math.max * feat(vscode): Create unit test via command palette (#4211) * Allow create unit test by command bar * Add pick for workflows in project * Fix workflow file name * feat(vscode): Add edit unit test from command palette (#4223) * Add validation for unit test naming * Add logic to retreive list of unit tests for edit unit test * Add comments * Update comments * feat(vscode): Add error handling for assertions side panel (#4230) * Add error validations object in assertions state * Update styles in assertions error * Update of validation errors object * Add error handling for expression * Update errors object and standalone command bar * Add comments and vscode command bar validation * Add traffic light dot to vscode and standalone command bar * feat(vscode): Update assertions tokens metadata (#4240) * Add tokenMapping * Add mock of unit test definition * Add recursion function to check on items and update token metadata * Move function to different file * Add comments * Remove definition example * feat(designer): Implement mock indicator to action cards in Unit Test (#4248) * Move files to unit test folder in designer-ui * Add mock status icon component * Add styles to mock status icon * Add custom hook to check if mocks is supported * Add message for unsupported mock actions * Add comments * Change status name * Update connection type * feat(vscode): Create unit test from overview and monitoring view (#4255) * Add option to create unit test * Add create unit test button in designer for vscode command bar * Add functionality to create unit test from overview * Implement is local for overview page * feat(designer): Render dynamic outputs in mocked result tab (#4348) * Add dropdown component for action results * Add update handler for action result dropdown * Add textfields to outputs * render of setting token field * Add triggers to output mocks and add update action in state * Add message for failed, skipped and timed out action results * Update deserializer * Add filters to outputs * Add outputs value storage * Modify is completed for card * Filter actions when ddeserializing * Load arrays inputs * Checkout compiled langs * Update type * Remove outputs if action result is not success * feat(designer): Add validation errors to output mocks (#4362) * Add parser to value segments * Fix serialization * Add validation errors object for mocks * Add validation for empty and update data type * fix(designer): Update action result properties of mock actions (#4364) Update action result serialization * feat(vscode): Load run output data from monitoring view into unit test (#4387) * Send run id to designer to load run id in unit test * Move run id to base class and add base runtime workflow url * Add function to get all the outputs * Build unit test definition from run * Add parse outputs to value segments * Add decision to not fetch outputs when unit test definition is present * Separate mocks function * feat(vscode): Add test controller (#4393) * Start tree controller implementation * Add unti test resolve handle and run profile * Add test workspace and test workflow classes * Solve workspace and workfile tree * Fix import * Add uri to tetst item * Parse json unit test definition * Add comments * Add implementation to run unit tests * Add logic for when new workflow gets added * Add implementation to add new workspace * Add test controller to ext variable * Add comment * Add logic to start test explorer if workspace has logic apps projects * Add validation to avoid double children creation * feat(vscode): Add edit and view results for test files (#4411) * Add fspath and commands to file tests * Add logic to handle TestItem node in edit unit test * Add logic to handle open unit test results * Add run unit test to command * Add logic to get the results from runs * Add information message for when unit test has been run * Update strings * Update comments * feat(designer): Add snapshots unit test to assertions components (#4458) * Add mock status icon snapshots * Add mock status icon snapshots * Add else clause * Add assertions list unit tests * Add assertion snapshots * Merge main * fix(designer): Add id's to format message (#4495) Fix ids * feat(vscode): Implement results view webview (#4497) * Add open results webview * Add comments * Add text and button components * Move webview communication to its own folder * Update styles to unit test results view * Add logic to launch workflow * Fix id and imports * Update styles * Update redux slice name * feat(vscode): Update path in workspace to save unit tests (#4510) Update unit test path * Fix imports * Fix imports * fix(vscode): Move tests folder to vscode workspace (#4771) * Add logic to execute exe * Fix paths and arguments to exe * Fix unitTestName arg * Add validation for workspace * Add Logic to create Tests folder in workspace * Update edit unit tests with correct file paths * Update run unit tests paths * Update lint errors * Add path separtors for both OS * Remove strings * fix(vscode): Update run unit test to be able to run from command line (#4787) * Update run unit test to be able to run from commmand line * Remove strings * feat(vscode): Update condition expression to expression editor component (#4827) * Update condition expression to use expression editor * Update styles and callout position * Add resize * Fix on toggle * Fix id rendering * Fix cursor move out * Fix handle token picker section * Update assertion condition expression save * Update tests and snapshots * Fix styles with hint * Fix styles resizer and expression size * Add activate azurite * Remove strings * Add first snapshots * feat(vscode): Add action types to mockable results (#4853) * Add http type to mockable actions * Add invokefunction type * Remove string * fix(vscode): Update serialization and deserialization of unit test schema (#4856) * Update outputs schema * Update serialization of outputs * Update deserializer * Remove hardcoded definition * Remove strings * feat(vscode): show (#4859) * Add unit test results read files * Add picker for unit test results * Update react view for unit test results * Update styles * Update styles of asssertions results * Update styles to list * Remove strings * Remove extra validation * fix(vscode): Show unit test results and update result based on executor (#4863) * Update unit test executor output * Add telemetry * Implement get last unit test to get result * Update comments and fix linting errors * Add message and update labels * Update expression to assertionString * Update assertionString * Remove extra files * Update Text components * fix(vscode): Cast and uncast condition expression for unit test (#4871) * Add function to serialize condition expression * Add readonly mode for condition expression * Remove static definition * fix(vscode): Fix assertion update and results icon color (#4877) * Fix assertions errors when deleting assertion * Fix issue of updating assertions * Update icon colors * fix(vscode): Fix mock outputs from run instance (#4883) * Fix overflow visible for callout * Add clode button to callout * Update serialization of unit test definition * Update deserialization from a run * Fix api call for run instance mock * fix(vscode): Update schema for API connections actions (#4904) * Fix outputs schema * Add status code to outputs * Update comments * Update schema for api connections actions * fix(vscode): Update asssertions redux actions (#4905) * Add redux action to udpate assertionString separately * Update function to check assertions errors * fix(vscode): Add styles for dark mode for condition expression callout (#4906) Add styles for dark mode for condition expression callout * fix(designer): Update condition expression for smaller screens (#4943) * Add max height for callout * Add snapshot * fix(vscode): Merge with main and fix unit testing (#4969) * Update tests * Update configure store * checkout origin main * Checkout core/state/templates/ * Fix unit test * Reuse function * feat(designer): automated testing: action and trigger mock should only allow success and failure statuses (#5006) AutomatedTesting: - Action and trigger mock should only show success or failure status, not timeout or skipped. * fix(designer): Fix infinite execution in unit test blade on exception (#5010) fixed bug where unit test blade gets stuck infinitely executing when exception occurs on test * fix(vscode): Update unit test tree when adding test file (#5015) Update handler to add unit test file into tree * fix(designer): Ensure skipped actions are not mocked (#5028) * Initial action mock filtering * Corrected so that only success and failed actions are put in the unit test * fix(designer): Fixed assertion pane editing and correctednaming (#5063) Correct naming and fixed assertion pane editing * fix(designer): Allows users to add an error code and error message into the mocked results (#5051) * added error UI to redux and updated state * updated serialization model for unit test def * updated PR per comments * updated redux state in unit testing def * fix(designer): Optimize getLatestUnitTest to avoid reading all test files for workflow (#5069) optimize getLatestUnitTest to avoid reading all test files for workflow * fix(designer): Fixed invalid assertionStrings preventing editing of unit test (#5096) Unit test is editable if an invalid assertionString is passed. * fix(designer): Fix empty mock results tab when mock unsupported (#5100) returning mock not supported for output * fix(designer): Deserialize Unit Test definition to include actions in nested structures (#5106) adding helper function to add mock results for all actions including nested actions * fix(designer): Fixed unit test blade bugs for created/deleted tests (#5115) fixed bugs where newly created unit tests would not be runnable from test blade and deleted tests would continue to appear in test blade * fix(designer): Fixed bug where running unit tests from context menu wouldn't update test blade (#5118) * fixed bug where running a unit test from context menu wouldn't update test blade with result * fixed typo in docstring * fixed typo in error message * fix(designer): allow designer to revalidate assertions when it is deleted (#5121) * adding helper function to revalidates all assertions in the unit test state * added doc strings * updated code per PR comments * fix(designer): fixed bug with running unit test command before opening test blade (#5132) fixed bug where running unit test command before opening test blade would result in test blade not being updated with most recent result * Merge main * feat(vscode): Add C# Unit Test Project Creation for Logic Apps (#5429) * added logic to Ask user to choose between codeless and codeful scenarios * added logic to create csharp project * added csproj templates * added doc strings and localized error message * updated folder structure per feedback * feat(vscode): Added C# dev kit as a Dependency to Logic Apps (#5501) adding extension depedency for c# dev kit * feat(vscode): Create codeful unit test (#5730) * adding extension depedency for c# dev kit * added api call for mocking * add api call for mocking on workflowruntime port * remove codeless from create unit test * add todo in csharp file * fix local workflow bug and add run id validation * update comments * add more logging * add logging using context telemetry * add logging using context telemetry on try catch block * feat(vscode): Added Dynamic C# File Generation and Unit Test SDK Support (#5902) * clean UX for codeful and update c# project for sdk support * Apply suggestions from code review Apply pull request review suggestions Co-authored-by: Esther Fan <[email protected]> * Apply suggestions from code review Update mock data trigger docstring Co-authored-by: Esther Fan <[email protected]> * Apply suggestions from code review Co-authored-by: Esther Fan <[email protected]> * update doc template * update doc template within assets folder --------- Co-authored-by: Esther Fan <[email protected]> * fix(vscode): Resolve Test Folder Addition, Naming Convention, and File Path Issues in Templates (#6001) * clean UX for codeful and update c# project for sdk support * Apply suggestions from code review Apply pull request review suggestions Co-authored-by: Esther Fan <[email protected]> * Apply suggestions from code review Update mock data trigger docstring Co-authored-by: Esther Fan <[email protected]> * Apply suggestions from code review Co-authored-by: Esther Fan <[email protected]> * update doc template * update doc template within assets folder * update doc templates based on project req * ensure test folder is in workspace and update templates * update templates and add root path to .cs file * update .cs template per PR feedback * remove var * update mock path to original --------- Co-authored-by: Esther Fan <[email protected]> * fix(vscode): Resolve Hyphen Handling, Mock Generator Formatting, and Add Missing Reference Errors in Templates (#6075) * bug fixes for .cs file and update .csproj file * add PR suggestions per feedback * feat(vscode): Adding nuget.config as part of generation unit test (#6078) * Added nuget.config as part of generation * Corrected nuget template reference * fix(vscode): Unit test template file updates (#6135) load mock data using TestMockData class * feat(vscode): Updated Test Class file with new template for unit testing (#6151) * Updated Test Class file with new template * Addressed comments * remove extra character * feat(vscode): Updated Test Class file and replacement methods (#6159) Updated TestClassFile and the replace method * fix(vscode): Simplify .sln File Generation with Reload Window Button (#6189) add reload window button for user, remove info message after unit test generation is complete * Fix merge conflicts * Revert compiled-lang * Revert changes * Revert svg * Revert changes * Revert changes * fix(vscode): Update Microsoft.Azure.Workflows.WebJobs.Extension Version and Correct NuGet Reference (#6223) updated to new .config package --------- Co-authored-by: Michael Reed <[email protected]> Co-authored-by: Andrew Eldridge <[email protected]> Co-authored-by: Brian Lam <[email protected]> Co-authored-by: samikay101 <[email protected]> Co-authored-by: Esther Fan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily focuses on changing the directory structure of the unit tests in the VS Code Designer App. The
developmentDirectoryName
constant has been removed, and thetestsDirectoryName
constant has been capitalized. As a result, the unit tests are no longer nested under the.development
directory and are now directly under the project path in aTests
directory.The import of
developmentDirectoryName
has been removed and thetestsDirectoryName
is now used directly under theprojectPath
in thepickUnitTest
function.Similar to the previous file, the
developmentDirectoryName
is no longer imported and thetestsDirectoryName
is used directly under theprojectPath
in thepickUnitTest
function.The
developmentDirectoryName
is no longer imported and thetestsDirectoryName
is used directly under theprojectPath
in thegetUnitTestsPath
andgetWorkflowTestsPath
functions.The
developmentDirectoryName
constant has been removed and thetestsDirectoryName
constant has been capitalized.