diff --git a/.github/workflows/ci-test-hosted.yml b/.github/workflows/ci-test-hosted.yml index c923063bc0..041149257e 100644 --- a/.github/workflows/ci-test-hosted.yml +++ b/.github/workflows/ci-test-hosted.yml @@ -305,7 +305,9 @@ jobs: parallel: true config-file: cypress_ci_hosted.config.ts group: "Chrome-Fat Container tests" - spec: "cypress/e2e/GSheet/**/**/*" + spec: | + cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts + cypress/e2e/GSheet/**/**/* working-directory: app/client # tag will be either "push" or "pull_request" tag: ${{ github.event_name }} @@ -372,23 +374,9 @@ jobs: tag: ${{ github.event_name }} env: "NODE_ENV=development" - - name: Collect CI container logs - if: failure() - working-directory: "." - run: | - mkdir -p ~/dockerlogs - docker logs appsmith 2>&1 > ~/dockerlogs.txt - - # Upload docker logs - - name: Upload failed test list artifact - if: failure() - uses: actions/upload-artifact@v3 - with: - name: dockerlogs - path: ~/dockerlogs.txt - # Set status = failedtest - name: Set fail if there are test failures + id: test_status if: failure() run: | echo "run_result=failedtest" >> $GITHUB_OUTPUT @@ -429,11 +417,39 @@ jobs: if: always() run: | if [[ "${{steps.run_result.outputs.run_result }}" != "success" && "${{steps.run_result.outputs.run_result }}" != "failedtest" ]]; then - echo ${{ steps.cypress_test.outputs.resultsUrl }} >> ~/cypress_url + echo "url=${{ steps.cypress_test.outputs.resultsUrl }}" >> $GITHUB_OUTPUT elif [[ "${{steps.run_result.outputs.run_result }}" == "failedtest" ]]; then - echo ${{ steps.cypress_test_failedtest.outputs.resultsUrl }} >> ~/cypress_url + echo "url=${{ steps.cypress_test_failedtest.outputs.resultsUrl }}" >> $GITHUB_OUTPUT fi + - name: Generate slack message + continue-on-error: true + if: always() + id: slack_notification + run: | + if [[ ${{ steps.test_status.outputs.run_result }} == 'failedtest' ]]; then + echo "slack_message=There are test failures in the run. Please check the <${{ steps.dashboard_url.outputs.url }}|Cypress dashboard> for more details." >> $GITHUB_OUTPUT + echo "slack_color=#FF0000" >> $GITHUB_OUTPUT + else + echo "slack_message=All tests passed successfully :tada: . Cypress Dashboard: <${{ steps.dashboard_url.outputs.url }}|Click here!>" >> $GITHUB_OUTPUT + echo "slack_color=#00FF00" >> $GITHUB_OUTPUT + fi + + - name: Slack Notification + continue-on-error: true + if: always() + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: cypresspushworkflow + SLACK_COLOR: ${{steps.slack_notification.outputs.slack_color}} + SLACK_ICON_EMOJI: ':bell:' + SLACK_MESSAGE: ${{steps.slack_notification.outputs.slack_message}} + SLACK_TITLE: 'Result:' + SLACK_USERNAME: Cloud-Hosted Tests + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_HOSTED }} + MSG_MINIMAL: Ref,Event,Commit + SLACK_FOOTER: 'Appsmith CI runs' + # Upload the log artifact so that it can be used by the test & deploy job in the workflow - name: Upload server logs bundle on failure uses: actions/upload-artifact@v3 diff --git a/app/client/cypress/e2e/GSheet/SelectedSheet_Access_Spec.ts b/app/client/cypress/e2e/GSheet/SelectedSheet_Access_Spec.ts index 01f3705563..362de01329 100644 --- a/app/client/cypress/e2e/GSheet/SelectedSheet_Access_Spec.ts +++ b/app/client/cypress/e2e/GSheet/SelectedSheet_Access_Spec.ts @@ -181,7 +181,7 @@ describe("GSheet-Functional Tests With Selected Access", function () { it("5. Update a record which is not present and verify the error", () => { //preparing data const data = GSHEET_DATA[1]; - data.rowIndex = "15"; + data.rowIndex = `${Cypress._.random(100, 1031)}`; // add update one query and verify gsheetHelper.EnterBasicQueryValues( @@ -258,7 +258,7 @@ describe("GSheet-Functional Tests With Selected Access", function () { }); it("7. Verify Delete query", function () { - // Delete spreadsheet and app + // Delete data on the basis of row index gsheetHelper.EnterBasicQueryValues( "Delete One", dataSourceName, diff --git a/app/client/cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts b/app/client/cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts index 24e7964717..f55e9049b6 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts @@ -8,8 +8,7 @@ import { } from "../../../support/Objects/ObjectsCore"; let dsName: any, jsonSpecies: any, offset: any, insertedRecordId: any; -//Skipping for regular regression since failing in CI, will be added to GSheet regression machine run. -describe.skip("excludeForAirgap", "Validate Airtable Ds", () => { +describe("excludeForAirgap", "Validate Airtable Ds", () => { before("Create a new Airtable DS", () => { dataSources.CreateDataSource("Airtable", true, false); cy.get("@dsName").then(($dsName) => { diff --git a/app/client/cypress/e2e/GSheet/GSheetViewEdit_Spec.ts b/app/client/cypress/manual_TestSuite/GSheetViewEdit_Spec.ts similarity index 96% rename from app/client/cypress/e2e/GSheet/GSheetViewEdit_Spec.ts rename to app/client/cypress/manual_TestSuite/GSheetViewEdit_Spec.ts index 3f3cdb6bec..85abfcdb25 100644 --- a/app/client/cypress/e2e/GSheet/GSheetViewEdit_Spec.ts +++ b/app/client/cypress/manual_TestSuite/GSheetViewEdit_Spec.ts @@ -5,7 +5,7 @@ import { entityExplorer, homePage, table, -} from "../../support/Objects/ObjectsCore"; +} from "../support/Objects/ObjectsCore"; describe.skip("Authorized GSheet - in Edit & view mode", function () { it("Open already created GSheet in View mode, navigate back to Edit mode, Validate dropdown values", () => { diff --git a/app/client/cypress_ci.config.ts b/app/client/cypress_ci.config.ts index 9c752cacee..55134552a7 100644 --- a/app/client/cypress_ci.config.ts +++ b/app/client/cypress_ci.config.ts @@ -33,6 +33,7 @@ export default defineConfig({ excludeSpecPattern: [ "cypress/e2e/**/spec_utility.ts", "cypress/e2e/GSheet/**/**/*", + "cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.ts", ], }, -}); \ No newline at end of file +}); diff --git a/app/client/cypress_ci_hosted.config.ts b/app/client/cypress_ci_hosted.config.ts index 88e7c2d309..857c43da00 100644 --- a/app/client/cypress_ci_hosted.config.ts +++ b/app/client/cypress_ci_hosted.config.ts @@ -30,11 +30,6 @@ export default defineConfig({ }, specPattern: "cypress/e2e/**/*.{js,ts}", testIsolation: false, - excludeSpecPattern: [ - "cypress/e2e/**/spec_utility.ts", - "cypress/e2e/Regression/**/**/*", - "cypress/e2e/Sanity/**/**/*", - "cypress/e2e/Smoke/**/**/*", - ], + excludeSpecPattern: ["cypress/e2e/**/spec_utility.ts"], }, });