From 3a4db6bdfdeaa1dd8fd562d9030d0736d178c399 Mon Sep 17 00:00:00 2001 From: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Date: Wed, 29 Dec 2021 11:11:30 +0530 Subject: [PATCH] test: Automated tests for S3 uploads & Mongo Bugs + Flakiness fixes (#9931) * Bugs #9069, #9201, #6975, #9922 - Scripted * Mongo DS update from Cloud to Localhost * Updating command.js * Ignoring Mongo until Localhost is fixed * S3 fixes * S3 fix * Mongo Cloud to Localhost transition * Bug #6375 scripted * Failure fix * S3 fix + testSaveDs method flow update * Refresh datasource structure script fix * Entity explorer datasource structure script fix * testSaveDs method flow update fixes * testSaveDs method flow update fixes - set 2 * S3, Mongo Skipping cases fix * Custom Chart failure fix * Button-Call-Query Validation case script fix * Confirm run action failure fix * Confirm run action script fix * Dropdown-Call-Query Validation script fix * S3 - Delete icon issue fix * S3 - Delete icon locator updated * actionContextMenuByEntityName method call update * Table widget add new menu button column - rgb fix * Commenting BG color verify - to override flakiness * Mongo skipping script fix * Commenting Cypress.runner.stop() --- app/client/cypress.json | 51 +-- .../cypress/fixtures/GlobeChristmas.jpeg | Bin 0 -> 153542 bytes app/client/cypress/fixtures/Vase.jpeg | Bin 0 -> 47323 bytes app/client/cypress/fixtures/datasources.json | 15 +- app/client/cypress/fixtures/saveAction.json | 7 +- .../ActionExecution/ExecutionParams_spec.js | 17 +- .../Bind_JSObject_Postgress_Table_spec.js | 25 +- ...nd_Table_Widget_API_Derived_Column_spec.js | 3 - .../Binding/Table_ClientSide_Search_spec.js | 1 + .../Binding/Widget_loading_spec.js | 27 +- .../DisplayWidgets/Custom_Chart_spec.js | 12 +- .../Table_Widget_Add_button_spec.js | 59 +-- .../Table_tabledata_schema_spec.js | 4 +- .../Entity_Explorer_Query_Datasource_spec.js | 19 +- .../FormWidgets/Button_onClickAction_spec.js | 30 +- .../Dropdown_onOptionChange_spec.js | 29 +- .../GenerateCRUD/Mongo_Spec.js | 9 +- .../GlobalSearch/GlobalSearch_spec.js | 16 +- .../QueryPaneTests/Datasourcedocs_spec.js | 14 +- .../QueryPaneTests/SwitchDatasource_spec.js | 9 +- .../ApiPaneTests/API_Bugs_Spec.js | 2 +- .../Datasources/ArangoDataSourceStub_spec.js | 1 - .../Datasources/MsSQLDataSourceStub_spec.js | 1 - .../Datasources/MySQLDataSourceStub_spec.js | 1 - .../ServerSideTests/Datasources/MySQL_spec.js | 7 +- .../Datasources/PostgresDatasource_spec.js | 7 +- .../RedshiftDataSourceStub_spec.js | 1 - ...xplorer_CopyQuery_RenameDatasource_spec.js | 16 +- ...tity_Explorer_Datasource_Structure_spec.js | 98 +++-- .../QueryPane/AddWidgetTableAndBind_spec.js | 14 +- .../QueryPane/AddWidget_spec.js | 7 +- .../QueryPane/ConfirmRunAction_spec.js | 3 +- .../QueryPane/EmptyDataSource_spec.js | 6 +- .../ServerSideTests/QueryPane/Mongo_Spec.js | 264 +++++++++++--- .../QueryPane/Postgres_Spec.js | 13 +- .../ServerSideTests/QueryPane/S3_spec.js | 341 +++++++++++------- app/client/cypress/locators/GeneratePage.json | 4 +- app/client/cypress/locators/QueryEditor.json | 5 +- .../cypress/locators/commonlocators.json | 12 +- .../sample_airbnb/listingAndReviews.bson | Bin 0 -> 1091713 bytes .../listingAndReviews.metadata.json | 17 + app/client/cypress/setup-test.sh | 14 +- app/client/cypress/support/commands.js | 105 +++--- 43 files changed, 756 insertions(+), 530 deletions(-) create mode 100644 app/client/cypress/fixtures/GlobeChristmas.jpeg create mode 100644 app/client/cypress/fixtures/Vase.jpeg create mode 100644 app/client/cypress/sample_airbnb/sample_airbnb/listingAndReviews.bson create mode 100644 app/client/cypress/sample_airbnb/sample_airbnb/listingAndReviews.metadata.json diff --git a/app/client/cypress.json b/app/client/cypress.json index 8979bd41ad..d19cfa5a52 100644 --- a/app/client/cypress.json +++ b/app/client/cypress.json @@ -1,27 +1,28 @@ { - "baseUrl": "https://dev.appsmith.com/", - "defaultCommandTimeout": 20000, - "requestTimeout": 21000, - "pageLoadTimeout": 20000, - "video": true, - "videoUploadOnPasses": false, - "reporter": "mochawesome", - "reporterOptions": { - "reportDir": "results", - "overwrite": false, - "html": true, - "json": false - }, - "ignoreTestFiles": [ - "**/Smoke_TestSuite/Application/PgAdmin_spec*.js", - "**/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_Filter_spec*.js", - "**/Smoke_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec*.js" - ], - "chromeWebSecurity": false, - "viewportHeight": 900, - "viewportWidth": 1400, - "retries": { - "runMode": 2, - "openMode": 0 + "baseUrl": "https://dev.appsmith.com/", + "defaultCommandTimeout": 20000, + "requestTimeout": 21000, + "pageLoadTimeout": 20000, + "video": true, + "videoUploadOnPasses": false, + "reporter": "mochawesome", + "reporterOptions": { + "reportDir": "results", + "overwrite": false, + "html": true, + "json": false + }, + "ignoreTestFiles": [ + "**/Smoke_TestSuite/Application/PgAdmin_spec*.js", + "**/Smoke_TestSuite/ClientSideTests/DisplayWidgets/Table_Filter_spec*.js", + "**/Smoke_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec*.js" + ], + "chromeWebSecurity": false, + "viewportHeight": 900, + "viewportWidth": 1400, + "retries": { + "runMode": 2, + "openMode": 0 + } } -} + \ No newline at end of file diff --git a/app/client/cypress/fixtures/GlobeChristmas.jpeg b/app/client/cypress/fixtures/GlobeChristmas.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..b1e8f542fd8c7b8564f995bf07c95ebaafa46bb7 GIT binary patch literal 153542 zcmbTecU)9g^gVj+bYSR%4Ar3sLy=HMr3hX?U_g+eh>B=v(p03`AnK)x2sjiCAmRW6 zf{GD?3YG+