@mablhq/mabl-cli 2.99.12 → 2.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/api/mablApiClient.js +19 -3
  2. package/browserLauncher/index.js +2 -2
  3. package/commands/datatables/datatables_cmds/update.js +39 -69
  4. package/commands/datatables/utils.js +0 -27
  5. package/commands/tests/tests_cmds/create.js +58 -0
  6. package/core/execution/ApiTestUtils.js +1 -3
  7. package/core/execution/PostmanUtils.js +2 -1
  8. package/core/execution/VariableUtils.js +10 -14
  9. package/execution/index.js +1 -1
  10. package/package.json +1 -1
  11. package/trainer/generation/saveGeneratedTest.js +3 -1
  12. package/trainer/generation/test-save/saveTest.js +9 -1
  13. package/trainer/generation/toolExecutors/CreateMablMailboxExecutor.js +3 -3
  14. package/trainer/generation/toolExecutors/RecordSnippetExecutor.js +2 -2
  15. package/trainer/sharedUtils/mablscript/canonical/AccessibilityCheckStep.js +2 -1
  16. package/trainer/sharedUtils/mablscript/canonical/AssertStep.js +2 -1
  17. package/trainer/sharedUtils/mablscript/canonical/AssertVariableStep.js +2 -2
  18. package/trainer/sharedUtils/mablscript/canonical/AwaitTabStep.js +2 -2
  19. package/trainer/sharedUtils/mablscript/canonical/AwaitUploadStep.js +2 -2
  20. package/trainer/sharedUtils/mablscript/canonical/ClearCookiesStep.js +2 -2
  21. package/trainer/sharedUtils/mablscript/canonical/ClickAndHoldStep.js +2 -1
  22. package/trainer/sharedUtils/mablscript/canonical/ClickStep.js +2 -1
  23. package/trainer/sharedUtils/mablscript/canonical/CreateVariableStep.js +8 -6
  24. package/trainer/sharedUtils/mablscript/canonical/DatabaseQueryStep.js +4 -4
  25. package/trainer/sharedUtils/mablscript/canonical/DoubleClickStep.js +2 -1
  26. package/trainer/sharedUtils/mablscript/canonical/DownloadBaseStep.js +2 -2
  27. package/trainer/sharedUtils/mablscript/canonical/DownloadPdfStep.js +2 -2
  28. package/trainer/sharedUtils/mablscript/canonical/EchoStep.js +2 -2
  29. package/trainer/sharedUtils/mablscript/canonical/ElseStep.js +2 -2
  30. package/trainer/sharedUtils/mablscript/canonical/EndStep.js +2 -2
  31. package/trainer/sharedUtils/mablscript/canonical/EnterAuthCodeStep.js +2 -1
  32. package/trainer/sharedUtils/mablscript/canonical/EnterTextStep.js +2 -1
  33. package/trainer/sharedUtils/mablscript/canonical/EvaluateJSStep.js +3 -3
  34. package/trainer/sharedUtils/mablscript/canonical/HoverStep.js +2 -1
  35. package/trainer/sharedUtils/mablscript/canonical/KeyPressStep.js +2 -1
  36. package/trainer/sharedUtils/mablscript/canonical/MablStepAdapter.js +2 -2
  37. package/trainer/sharedUtils/mablscript/canonical/NavigationStep.js +2 -2
  38. package/trainer/sharedUtils/mablscript/canonical/OpenEmailStep.js +2 -1
  39. package/trainer/sharedUtils/mablscript/canonical/ReleaseStep.js +2 -1
  40. package/trainer/sharedUtils/mablscript/canonical/RemoveCookieStep.js +2 -2
  41. package/trainer/sharedUtils/mablscript/canonical/RightClickStep.js +2 -1
  42. package/trainer/sharedUtils/mablscript/canonical/SelectStep.js +4 -2
  43. package/trainer/sharedUtils/mablscript/canonical/SendHttpRequestStep.js +4 -4
  44. package/trainer/sharedUtils/mablscript/canonical/SetCookieStep.js +2 -2
  45. package/trainer/sharedUtils/mablscript/canonical/SetFilesStep.js +2 -1
  46. package/trainer/sharedUtils/mablscript/canonical/StepWithFind.js +1 -3
  47. package/trainer/sharedUtils/mablscript/canonical/SwitchContextToStep.js +3 -2
  48. package/trainer/sharedUtils/mablscript/canonical/ViewportStep.js +2 -2
  49. package/trainer/sharedUtils/mablscript/canonical/VisitUrlStep.js +3 -3
  50. package/trainer/sharedUtils/mablscript/canonical/WaitStep.js +2 -2
  51. package/trainer/sharedUtils/mablscript/extended/ExecuteFlowStep.js +3 -3
  52. package/trainer/sharedUtils/mablscript/extended/ExecuteStepGroupStep.js +2 -2
  53. package/trainer/sharedUtils/variable-utils.js +1 -3
  54. package/upload/index.js +1 -1
@@ -726,12 +726,28 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
726
726
  throw toApiError(`Failed to get Scenario`, error);
727
727
  }
728
728
  }
729
- async updateDataTable(tableId, updateRequest) {
729
+ async putScenario(scenarioId, scenario) {
730
730
  try {
731
- return await this.makePatchRequest(`${this.baseApiUrl}/variables/tables/${tableId}`, updateRequest);
731
+ return await this.makePutRequest(`${this.baseApiUrl}/dataTables/scenarios/${scenarioId}`, scenario);
732
732
  }
733
733
  catch (error) {
734
- throw toApiError(`Failed to create DataTable`, error);
734
+ throw toApiError(`Failed to update Scenario`, error);
735
+ }
736
+ }
737
+ async createScenario(dataTableId, scenario) {
738
+ try {
739
+ return await this.makePostRequest(`${this.baseApiUrl}/dataTables/${dataTableId}/scenarios`, scenario);
740
+ }
741
+ catch (error) {
742
+ throw toApiError(`Failed to create Scenario`, error);
743
+ }
744
+ }
745
+ async removeScenario(scenarioId) {
746
+ try {
747
+ await this.makeDeleteRequest(`${this.baseApiUrl}/dataTables/scenarios/${scenarioId}`);
748
+ }
749
+ catch (error) {
750
+ throw toApiError(`Failed to remove Scenario`, error);
735
751
  }
736
752
  }
737
753
  async getSessionEmails(sessionId) {