test: Cypress - flaky fix + Git comment improve (#22169)
## Description - This fixes the Firestore spec that fails sometimes in CI due to all runs accessing the same cloud collection for validation. - This PR also adds comments to PR - if all cypress cases passed, right now there is no comment ## Type of change - Script update ## How Has This Been Tested? - Cypress CI runs ## Checklist: ### QA activity: - [X] Added Test Plan Approved label after reviewing all Cypress test
This commit is contained in:
parent
bf3cb2e804
commit
5f1e4d1ba8
13
.github/workflows/integration-tests-command.yml
vendored
13
.github/workflows/integration-tests-command.yml
vendored
|
|
@ -168,7 +168,18 @@ jobs:
|
||||||
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
|
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
|
||||||
Commit: `${{ github.event.client_payload.slash_command.args.named.sha }}`.
|
Commit: `${{ github.event.client_payload.slash_command.args.named.sha }}`.
|
||||||
The following are new failures, please fix them before merging the PR: ${{env.new_failed_spec_env}}
|
The following are new failures, please fix them before merging the PR: ${{env.new_failed_spec_env}}
|
||||||
<a href="#" onclick='window.open("https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a");return false;'>Identified Flaky tests</a>
|
<a href="https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a" target="_blank">Identified Flaky tests</a>
|
||||||
|
|
||||||
|
- name: Add a comment on the PR when ci-test is success
|
||||||
|
if: needs.ci-test.result == 'success'
|
||||||
|
uses: peter-evans/create-or-update-comment@v1
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.client_payload.pull_request.number }}
|
||||||
|
body: |
|
||||||
|
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
|
||||||
|
Commit: `${{ github.event.client_payload.slash_command.args.named.sha }}`.
|
||||||
|
All cypress tests have passed 🎉
|
||||||
|
|
||||||
|
|
||||||
# Update check run called "ci-test-result"
|
# Update check run called "ci-test-result"
|
||||||
- name: Mark ci-test-result job as complete
|
- name: Mark ci-test-result job as complete
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ const clickButtonAndAssertLintError = (
|
||||||
|
|
||||||
//Reload and Check for presence/ absence of lint error
|
//Reload and Check for presence/ absence of lint error
|
||||||
agHelper.RefreshPage();
|
agHelper.RefreshPage();
|
||||||
|
agHelper.AssertElementVisible(locator._visibleTextDiv("Explorer"));
|
||||||
ee.SelectEntityByName("Button1", "Widgets");
|
ee.SelectEntityByName("Button1", "Widgets");
|
||||||
shouldExist
|
shouldExist
|
||||||
? agHelper.AssertElementExist(locator._lintErrorElement)
|
? agHelper.AssertElementExist(locator._lintErrorElement)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as _ from "../../../../support/Objects/ObjectsCore";
|
import * as _ from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
let dsName: any, cities: any, losAngelesPath: any, insertedRecordId: any;
|
let dsName: any, cities: any, losAngelesPath: any;
|
||||||
describe("Validate Firestore DS", () => {
|
describe("Validate Firestore DS", () => {
|
||||||
before("Create a new Firestore DS", () => {
|
before("Create a new Firestore DS", () => {
|
||||||
_.dataSources.CreateDataSource("Firestore");
|
_.dataSources.CreateDataSource("Firestore");
|
||||||
|
|
@ -28,6 +28,14 @@ describe("Validate Firestore DS", () => {
|
||||||
directInput: false,
|
directInput: false,
|
||||||
inputFieldName: "Collection Name",
|
inputFieldName: "Collection Name",
|
||||||
});
|
});
|
||||||
|
_.agHelper.TypeDynamicInputValueNValidate(
|
||||||
|
"name",
|
||||||
|
_.dataSources._nestedWhereClauseKey(0),
|
||||||
|
);
|
||||||
|
_.agHelper.TypeDynamicInputValueNValidate(
|
||||||
|
"San Francisco",
|
||||||
|
_.dataSources._nestedWhereClauseValue(0),
|
||||||
|
);
|
||||||
_.dataSources.RunQuery();
|
_.dataSources.RunQuery();
|
||||||
cy.get("@postExecute").then((resObj: any) => {
|
cy.get("@postExecute").then((resObj: any) => {
|
||||||
cities = JSON.parse(JSON.stringify(resObj.response.body.data.body));
|
cities = JSON.parse(JSON.stringify(resObj.response.body.data.body));
|
||||||
|
|
@ -35,9 +43,10 @@ describe("Validate Firestore DS", () => {
|
||||||
cy.wrap(cities)
|
cy.wrap(cities)
|
||||||
.should("be.an", "array")
|
.should("be.an", "array")
|
||||||
.its(0)
|
.its(0)
|
||||||
.should("have.property", "name", "San Francisco"); //making sure inserted record is returned
|
.should("have.property", "name", "San Francisco"); //making sure already inserted record is returned
|
||||||
});
|
});
|
||||||
|
|
||||||
|
_.agHelper.GetNClick(_.dataSources._whereDelete(0)); //removign where clause, add new
|
||||||
_.agHelper.TypeDynamicInputValueNValidate(
|
_.agHelper.TypeDynamicInputValueNValidate(
|
||||||
"capital",
|
"capital",
|
||||||
_.dataSources._nestedWhereClauseKey(0),
|
_.dataSources._nestedWhereClauseKey(0),
|
||||||
|
|
@ -201,7 +210,6 @@ describe("Validate Firestore DS", () => {
|
||||||
directInput: false,
|
directInput: false,
|
||||||
inputFieldName: "Collection Name",
|
inputFieldName: "Collection Name",
|
||||||
});
|
});
|
||||||
|
|
||||||
_.agHelper.EnterValue('["population"]', {
|
_.agHelper.EnterValue('["population"]', {
|
||||||
propFieldName: "",
|
propFieldName: "",
|
||||||
directInput: false,
|
directInput: false,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user