test: Cypress - fix for selected gsheet (#25940)
## Description - Fix for selected gsheet failure - Added steps in ci-test-hosted to notify on slack - Updated config to run the Airtable_basic_spec on the hosted instance and skip it in regular runs #### Type of change - Cypress changes - Workflow changes ## Testing > #### How Has This Been Tested? - [x] Cypress ## Checklist: #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
This commit is contained in:
parent
a7fddb1c79
commit
f89e5b8612
52
.github/workflows/ci-test-hosted.yml
vendored
52
.github/workflows/ci-test-hosted.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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", () => {
|
||||
|
|
@ -33,6 +33,7 @@ export default defineConfig({
|
|||
excludeSpecPattern: [
|
||||
"cypress/e2e/**/spec_utility.ts",
|
||||
"cypress/e2e/GSheet/**/**/*",
|
||||
"cypress/e2e/Sanity/Datasources/Airtable_Basic_Spec.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"],
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user