test: Cypress | CI Stabilize (#27818)
## Description - This PR adds tests for validating the set properties for widget across all objects - Covers only some scenarios from [Test #2409](https://github.com/appsmithorg/TestSmith/issues/2409) - Adds the failure cypress dashboard link directly in case of CI run failures - Flaky fix - Sanity/Datasources/SMTPDatasource_spec.js - Cypress.on - exception & fail handling updated - InvokeDispatchOnStore() created for logout/login Internal server errors - trial fix for RBACFunctionalTests/OthersTabPermission_spec.js - EditAppFromAppHover() improved to take app name also - trial fix PropertyPane_Connections_Error_spec.js - Flaky fix - TableV2_Property_ToggleJs_With_Binding_spec.js - Flaky fix - Radio2_spec.ts - Flaky fix - API_TestExecuteWithDynamicBindingInUrl_spec.ts - Flaky fix - Button_with_API_spec.js - AssertTableInVirtuosoList() improved to handle the DS name not present in EE scenario also - Flaky fix - Button_with_API_spec.js - Flaky fix - Table_Style_ToggleJS_spec.js - Flaky fix - Tablev2_Style_ToggleJS_spec #### Type of change - Script update (non-breaking change which fixes an issue) ## Testing #### How Has This Been Tested? - [X] Cypress CI runs ## Checklist: #### QA activity: - [X] Added `Test Plan Approved` label after Cypress tests were reviewed
This commit is contained in:
parent
d037ada51d
commit
885c951066
8
.github/workflows/build-client-server.yml
vendored
8
.github/workflows/build-client-server.yml
vendored
|
|
@ -194,7 +194,7 @@ jobs:
|
||||||
|
|
||||||
- name: install pg
|
- name: install pg
|
||||||
if: needs.ci-test-limited.result != 'success'
|
if: needs.ci-test-limited.result != 'success'
|
||||||
run : npm install pg
|
run: npm install pg
|
||||||
|
|
||||||
- name: Fetch the failed specs
|
- name: Fetch the failed specs
|
||||||
if: needs.ci-test-limited.result != 'success'
|
if: needs.ci-test-limited.result != 'success'
|
||||||
|
|
@ -276,7 +276,7 @@ jobs:
|
||||||
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
|
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
|
||||||
body: |
|
body: |
|
||||||
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
|
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
|
||||||
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}" target="_blank"> Click here!</a>
|
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank"> Click here!</a>
|
||||||
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}}
|
||||||
To know the list of identified flaky tests - <a href="https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a" target="_blank">Refer here</a>
|
To know the list of identified flaky tests - <a href="https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a" target="_blank">Refer here</a>
|
||||||
|
|
||||||
|
|
@ -311,7 +311,7 @@ jobs:
|
||||||
|
|
||||||
- name: install pg
|
- name: install pg
|
||||||
if: needs.ci-test-limited-existing-docker-image.result != 'success'
|
if: needs.ci-test-limited-existing-docker-image.result != 'success'
|
||||||
run : npm install pg
|
run: npm install pg
|
||||||
|
|
||||||
- name: Fetch the failed specs
|
- name: Fetch the failed specs
|
||||||
if: needs.ci-test-limited-existing-docker-image.result != 'success'
|
if: needs.ci-test-limited-existing-docker-image.result != 'success'
|
||||||
|
|
@ -393,7 +393,7 @@ jobs:
|
||||||
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
|
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
|
||||||
body: |
|
body: |
|
||||||
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
|
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
|
||||||
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}" target="_blank"> Click here!</a>
|
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank"> Click here!</a>
|
||||||
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}}
|
||||||
To know the list of identified flaky tests - <a href="https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a" target="_blank">Refer here</a>
|
To know the list of identified flaky tests - <a href="https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a" target="_blank">Refer here</a>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ jobs:
|
||||||
|
|
||||||
- name: install pg
|
- name: install pg
|
||||||
if: needs.ci-test.result != 'success'
|
if: needs.ci-test.result != 'success'
|
||||||
run : npm install pg
|
run: npm install pg
|
||||||
|
|
||||||
- name: Fetch the failed specs
|
- name: Fetch the failed specs
|
||||||
if: needs.ci-test.result != 'success'
|
if: needs.ci-test.result != 'success'
|
||||||
|
|
@ -191,7 +191,7 @@ jobs:
|
||||||
body: |
|
body: |
|
||||||
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 }}`.
|
||||||
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}" target="_blank"> Click here!</a>
|
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank"> Click here!</a>
|
||||||
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}}
|
||||||
To know the list of identified flaky tests - <a href="https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a" target="_blank">Refer here</a>
|
To know the list of identified flaky tests - <a href="https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a" target="_blank">Refer here</a>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ jobs:
|
||||||
body: |
|
body: |
|
||||||
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 }}`.
|
||||||
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}" target="_blank"> Click here!</a>
|
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank"> Click here!</a>
|
||||||
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}}
|
||||||
To know the list of identified flaky tests - <a href="https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a" target="_blank">Refer here</a>
|
To know the list of identified flaky tests - <a href="https://app.appsmith.com/applications/613868bedd7786286ddd4a6a/pages/63ec710e8e503f763651791a" target="_blank">Refer here</a>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,10 @@ describe("AForce - Community Issues page validations", function () {
|
||||||
const { isPartialImport } = interception.response.body.data;
|
const { isPartialImport } = interception.response.body.data;
|
||||||
if (isPartialImport) {
|
if (isPartialImport) {
|
||||||
// should reconnect modal
|
// should reconnect modal
|
||||||
dataSources.ReconnectSingleDSNAssert("AForceDB", "PostgreSQL");
|
dataSources.ReconnectSingleDSNAssert(
|
||||||
|
String.raw`AForceDB`,
|
||||||
|
"PostgreSQL",
|
||||||
|
);
|
||||||
homePage.AssertNCloseImport();
|
homePage.AssertNCloseImport();
|
||||||
} else {
|
} else {
|
||||||
homePage.AssertImportToast();
|
homePage.AssertImportToast();
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,7 @@ describe("Bind a button and Api usecase", function () {
|
||||||
it("2. Button-Name updation & API datasource binding with button name validation", function () {
|
it("2. Button-Name updation & API datasource binding with button name validation", function () {
|
||||||
_.entityExplorer.SelectEntityByName("Button1");
|
_.entityExplorer.SelectEntityByName("Button1");
|
||||||
//changing the Button Name
|
//changing the Button Name
|
||||||
cy.widgetText(
|
_.propPane.RenameWidget("Button1", testdata.buttonName);
|
||||||
testdata.buttonName,
|
|
||||||
widgetsPage.buttonWidget,
|
|
||||||
widgetsPage.widgetNameSpan,
|
|
||||||
);
|
|
||||||
|
|
||||||
//API datasource binding with button name validation
|
//API datasource binding with button name validation
|
||||||
_.entityExplorer.SelectEntityByName("Api1", "Queries/JS");
|
_.entityExplorer.SelectEntityByName("Api1", "Queries/JS");
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,6 @@ describe("Table Widget V2 property pane feature validation", function () {
|
||||||
cy.moveToStyleTab();
|
cy.moveToStyleTab();
|
||||||
cy.wait(1000);
|
cy.wait(1000);
|
||||||
propPane.EnterJSContext("Cell Background", testdata.bindingTextColor);
|
propPane.EnterJSContext("Cell Background", testdata.bindingTextColor);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTableV2dataValidateCSS(
|
cy.readTableV2dataValidateCSS(
|
||||||
"0",
|
"0",
|
||||||
"0",
|
"0",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ describe("Table Widget V2 property pane feature validation", function () {
|
||||||
cy.moveToStyleTab();
|
cy.moveToStyleTab();
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Text align", testdata.bindingAlign);
|
_.propPane.EnterJSContext("Text align", testdata.bindingAlign);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTableV2dataValidateCSS("0", "0", "justify-content", "flex-start");
|
cy.readTableV2dataValidateCSS("0", "0", "justify-content", "flex-start");
|
||||||
cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-end");
|
cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-end");
|
||||||
});
|
});
|
||||||
|
|
@ -36,7 +35,6 @@ describe("Table Widget V2 property pane feature validation", function () {
|
||||||
"Vertical alignment",
|
"Vertical alignment",
|
||||||
testdata.bindingVerticalAlig,
|
testdata.bindingVerticalAlig,
|
||||||
);
|
);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTableV2dataValidateCSS("0", "0", "align-items", "flex-start");
|
cy.readTableV2dataValidateCSS("0", "0", "align-items", "flex-start");
|
||||||
cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-end");
|
cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-end");
|
||||||
});
|
});
|
||||||
|
|
@ -45,7 +43,6 @@ describe("Table Widget V2 property pane feature validation", function () {
|
||||||
//cy.movetoStyleTab();
|
//cy.movetoStyleTab();
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Text size", testdata.bindingNewSize);
|
_.propPane.EnterJSContext("Text size", testdata.bindingNewSize);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTableV2dataValidateCSS("0", "0", "font-size", "14px");
|
cy.readTableV2dataValidateCSS("0", "0", "font-size", "14px");
|
||||||
cy.readTableV2dataValidateCSS("1", "0", "font-size", "24px");
|
cy.readTableV2dataValidateCSS("1", "0", "font-size", "24px");
|
||||||
});
|
});
|
||||||
|
|
@ -53,7 +50,6 @@ describe("Table Widget V2 property pane feature validation", function () {
|
||||||
it("5. Table widget V2 toggle test for style Alignment", function () {
|
it("5. Table widget V2 toggle test for style Alignment", function () {
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Emphasis", testdata.bindingStyle);
|
_.propPane.EnterJSContext("Emphasis", testdata.bindingStyle);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTableV2dataValidateCSS("0", "0", "font-style", "normal");
|
cy.readTableV2dataValidateCSS("0", "0", "font-style", "normal");
|
||||||
cy.readTableV2dataValidateCSS("1", "0", "font-style", "italic");
|
cy.readTableV2dataValidateCSS("1", "0", "font-style", "italic");
|
||||||
});
|
});
|
||||||
|
|
@ -62,7 +58,6 @@ describe("Table Widget V2 property pane feature validation", function () {
|
||||||
cy.moveToStyleTab();
|
cy.moveToStyleTab();
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Text color", testdata.bindingTextColor);
|
_.propPane.EnterJSContext("Text color", testdata.bindingTextColor);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTableV2dataValidateCSS("0", "0", "color", "rgb(0, 128, 0)");
|
cy.readTableV2dataValidateCSS("0", "0", "color", "rgb(0, 128, 0)");
|
||||||
cy.readTableV2dataValidateCSS("1", "0", "color", "rgb(255, 0, 0)");
|
cy.readTableV2dataValidateCSS("1", "0", "color", "rgb(255, 0, 0)");
|
||||||
});
|
});
|
||||||
|
|
@ -71,7 +66,6 @@ describe("Table Widget V2 property pane feature validation", function () {
|
||||||
cy.moveToStyleTab();
|
cy.moveToStyleTab();
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Cell Background", testdata.bindingTextColor);
|
_.propPane.EnterJSContext("Cell Background", testdata.bindingTextColor);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTableV2dataValidateCSS(
|
cy.readTableV2dataValidateCSS(
|
||||||
"0",
|
"0",
|
||||||
"0",
|
"0",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ describe("Table Widget property pane feature validation", function () {
|
||||||
//cy.movetoStyleTab();
|
//cy.movetoStyleTab();
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Text align", testdata.bindingAlign);
|
_.propPane.EnterJSContext("Text align", testdata.bindingAlign);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTabledataValidateCSS("0", "0", "justify-content", "flex-start");
|
cy.readTabledataValidateCSS("0", "0", "justify-content", "flex-start");
|
||||||
cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-end");
|
cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-end");
|
||||||
});
|
});
|
||||||
|
|
@ -36,7 +35,6 @@ describe("Table Widget property pane feature validation", function () {
|
||||||
"Vertical alignment",
|
"Vertical alignment",
|
||||||
testdata.bindingVerticalAlig,
|
testdata.bindingVerticalAlig,
|
||||||
);
|
);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTabledataValidateCSS("0", "0", "align-items", "flex-start");
|
cy.readTabledataValidateCSS("0", "0", "align-items", "flex-start");
|
||||||
cy.readTabledataValidateCSS("1", "0", "align-items", "flex-end");
|
cy.readTabledataValidateCSS("1", "0", "align-items", "flex-end");
|
||||||
});
|
});
|
||||||
|
|
@ -46,7 +44,6 @@ describe("Table Widget property pane feature validation", function () {
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Text size", testdata.bindingSize);
|
_.propPane.EnterJSContext("Text size", testdata.bindingSize);
|
||||||
cy.wait(2000);
|
cy.wait(2000);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTabledataValidateCSS("0", "0", "font-size", "14px");
|
cy.readTabledataValidateCSS("0", "0", "font-size", "14px");
|
||||||
cy.readTabledataValidateCSS("1", "0", "font-size", "24px");
|
cy.readTabledataValidateCSS("1", "0", "font-size", "24px");
|
||||||
});
|
});
|
||||||
|
|
@ -55,7 +52,6 @@ describe("Table Widget property pane feature validation", function () {
|
||||||
//cy.movetoStyleTab();
|
//cy.movetoStyleTab();
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Font Style", testdata.bindingStyle);
|
_.propPane.EnterJSContext("Font Style", testdata.bindingStyle);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTabledataValidateCSS("0", "0", "font-style", "normal");
|
cy.readTabledataValidateCSS("0", "0", "font-style", "normal");
|
||||||
cy.readTabledataValidateCSS("1", "0", "font-style", "italic");
|
cy.readTabledataValidateCSS("1", "0", "font-style", "italic");
|
||||||
});
|
});
|
||||||
|
|
@ -64,7 +60,6 @@ describe("Table Widget property pane feature validation", function () {
|
||||||
//cy.movetoStyleTab();
|
//cy.movetoStyleTab();
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Text color", testdata.bindingTextColor);
|
_.propPane.EnterJSContext("Text color", testdata.bindingTextColor);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTabledataValidateCSS("0", "0", "color", "rgb(0, 128, 0)");
|
cy.readTabledataValidateCSS("0", "0", "color", "rgb(0, 128, 0)");
|
||||||
cy.readTabledataValidateCSS("1", "0", "color", "rgb(255, 0, 0)");
|
cy.readTabledataValidateCSS("1", "0", "color", "rgb(255, 0, 0)");
|
||||||
});
|
});
|
||||||
|
|
@ -73,7 +68,6 @@ describe("Table Widget property pane feature validation", function () {
|
||||||
//cy.movetoStyleTab();
|
//cy.movetoStyleTab();
|
||||||
_.agHelper.Sleep();
|
_.agHelper.Sleep();
|
||||||
_.propPane.EnterJSContext("Cell Background", testdata.bindingTextColor);
|
_.propPane.EnterJSContext("Cell Background", testdata.bindingTextColor);
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.readTabledataValidateCSS(
|
cy.readTabledataValidateCSS(
|
||||||
"0",
|
"0",
|
||||||
"0",
|
"0",
|
||||||
|
|
|
||||||
|
|
@ -348,6 +348,9 @@ describe("Radio Widget test cases", function () {
|
||||||
entityExplorer.SelectEntityByName("Text1", "Widgets");
|
entityExplorer.SelectEntityByName("Text1", "Widgets");
|
||||||
propPane.UpdatePropertyFieldValue("Text", "false");
|
propPane.UpdatePropertyFieldValue("Text", "false");
|
||||||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TEXT));
|
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TEXT));
|
||||||
|
agHelper.WaitUntilEleAppear(
|
||||||
|
locators._widgetInDeployed(draggableWidgets.RADIO_GROUP),
|
||||||
|
);
|
||||||
agHelper.AssertElementEnabledDisabled(
|
agHelper.AssertElementEnabledDisabled(
|
||||||
locators._widgetInDeployed(draggableWidgets.RADIO_GROUP),
|
locators._widgetInDeployed(draggableWidgets.RADIO_GROUP),
|
||||||
0,
|
0,
|
||||||
|
|
@ -357,7 +360,7 @@ describe("Radio Widget test cases", function () {
|
||||||
.GetWidgetCSSHeight(
|
.GetWidgetCSSHeight(
|
||||||
locators._widgetInDeployed(draggableWidgets.RADIO_GROUP),
|
locators._widgetInDeployed(draggableWidgets.RADIO_GROUP),
|
||||||
)
|
)
|
||||||
.then((currentHeight) => {
|
.then((currentHeight: any) => {
|
||||||
const updatedHeight = parseInt(currentHeight?.split("px")[0]);
|
const updatedHeight = parseInt(currentHeight?.split("px")[0]);
|
||||||
expect(updatedHeight).to.be.greaterThan(270);
|
expect(updatedHeight).to.be.greaterThan(270);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,12 @@ describe("Test API execution with dynamic binding in URL - Bug #24218", () => {
|
||||||
"{{appsmith.store.api_url}}",
|
"{{appsmith.store.api_url}}",
|
||||||
"Api_with_dynamic_binding",
|
"Api_with_dynamic_binding",
|
||||||
);
|
);
|
||||||
|
agHelper.VerifyEvaluatedValue(
|
||||||
|
dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl.replace(
|
||||||
|
"?records=10",
|
||||||
|
"",
|
||||||
|
), //removing query param here due to open bug with DI team
|
||||||
|
);
|
||||||
apiPage.RunAPI();
|
apiPage.RunAPI();
|
||||||
apiPage.ResponseStatusCheck("200 OK");
|
apiPage.ResponseStatusCheck("200 OK");
|
||||||
agHelper.ActionContextMenuWithInPane({
|
agHelper.ActionContextMenuWithInPane({
|
||||||
|
|
|
||||||
|
|
@ -72,35 +72,36 @@ describe("Binary Datatype tests", function () {
|
||||||
table.WaitForTableEmpty(); //asserting table is empty before inserting!
|
table.WaitForTableEmpty(); //asserting table is empty before inserting!
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip("3. Inserting record - binarytype", () => {
|
//Timing out a lot in CI, hence skipped, Insert verified also in next case
|
||||||
imageNameToUpload = "Datatypes/Bridge.jpg";
|
// it.skip("3. Inserting record - binarytype", () => {
|
||||||
// entityExplorer.SelectEntityByName("Page1");
|
// imageNameToUpload = "Datatypes/Bridge.jpg";
|
||||||
// deployMode.DeployApp();
|
// // entityExplorer.SelectEntityByName("Page1");
|
||||||
// table.WaitForTableEmpty(); //asserting table is empty before inserting!
|
// // deployMode.DeployApp();
|
||||||
agHelper.ClickButton("Run InsertQuery");
|
// // table.WaitForTableEmpty(); //asserting table is empty before inserting!
|
||||||
agHelper.AssertElementVisibility(locators._modal);
|
// agHelper.ClickButton("Run InsertQuery");
|
||||||
|
// agHelper.AssertElementVisibility(locators._modal);
|
||||||
|
|
||||||
agHelper.ClickButton("Select New Image");
|
// agHelper.ClickButton("Select New Image");
|
||||||
agHelper.UploadFile(imageNameToUpload);
|
// agHelper.UploadFile(imageNameToUpload);
|
||||||
|
|
||||||
agHelper.ClickButton("Insert");
|
// agHelper.ClickButton("Insert");
|
||||||
agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail
|
// agHelper.AssertElementAbsence(locators._toastMsg); //Assert that Insert did not fail
|
||||||
agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery"));
|
// agHelper.AssertElementVisibility(locators._buttonByText("Run InsertQuery"));
|
||||||
agHelper.AssertElementAbsence(locators._btnSpinner, 10000); //for the update row to appear at last
|
// agHelper.AssertElementAbsence(locators._btnSpinner, 10000); //for the update row to appear at last
|
||||||
table.WaitUntilTableLoad();
|
// table.WaitUntilTableLoad();
|
||||||
agHelper.Sleep(3000); //some more time for all rows with images to be populated
|
// agHelper.Sleep(3000); //some more time for all rows with images to be populated
|
||||||
table.ReadTableRowColumnData(0, 0).then(($cellData) => {
|
// table.ReadTableRowColumnData(0, 0).then(($cellData) => {
|
||||||
expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence
|
// expect($cellData).to.eq("1"); //asserting serial column is inserting fine in sequence
|
||||||
});
|
// });
|
||||||
table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => {
|
// table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => {
|
||||||
expect($cellData).to.eq("Bridge.jpg");
|
// expect($cellData).to.eq("Bridge.jpg");
|
||||||
});
|
// });
|
||||||
table.AssertTableRowImageColumnIsLoaded(0, 2).then(($oldimage) => {
|
// table.AssertTableRowImageColumnIsLoaded(0, 2).then(($oldimage) => {
|
||||||
table.AssertTableRowImageColumnIsLoaded(0, 3).then(($newimage) => {
|
// table.AssertTableRowImageColumnIsLoaded(0, 3).then(($newimage) => {
|
||||||
expect($oldimage).to.eq($newimage);
|
// expect($oldimage).to.eq($newimage);
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
it("4. Inserting another record - binarytype", () => {
|
it("4. Inserting another record - binarytype", () => {
|
||||||
imageNameToUpload = "Datatypes/Georgia.jpeg";
|
imageNameToUpload = "Datatypes/Georgia.jpeg";
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,11 @@ describe("SMTP datasource test cases using ted", function () {
|
||||||
},
|
},
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
expect(res.status).equal(200);
|
expect(res.status).equal(200);
|
||||||
expect(JSON.stringify(res.body)).to.contain("qwerty@appsmith.com");
|
const responseBody = JSON.stringify(res.body);
|
||||||
|
cy.log(responseBody);
|
||||||
|
const containsTestAppsmith = /test@appsmith\.com/.test(responseBody);
|
||||||
|
const containsQwertyAppsmith = /qwerty@appsmith\.com/.test(responseBody);
|
||||||
|
expect(containsTestAppsmith || containsQwertyAppsmith).to.be.true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,15 @@ export class AggregateHelper extends ReusableHelper {
|
||||||
public _modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
public _modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
||||||
private assertHelper = ObjectsRegistry.AssertHelper;
|
private assertHelper = ObjectsRegistry.AssertHelper;
|
||||||
|
|
||||||
public isMac = Cypress.platform === "darwin";
|
public get isMac() {
|
||||||
|
return Cypress.platform === "darwin";
|
||||||
|
}
|
||||||
private selectLine = `${
|
private selectLine = `${
|
||||||
this.isMac ? "{cmd}{shift}{leftArrow}" : "{shift}{home}"
|
this.isMac ? "{cmd}{shift}{leftArrow}" : "{shift}{home}"
|
||||||
}`;
|
}`;
|
||||||
private removeLine = "{backspace}";
|
public get removeLine() {
|
||||||
|
return "{backspace}";
|
||||||
|
}
|
||||||
private selectAll = `${this.isMac ? "{cmd}{a}" : "{ctrl}{a}"}`;
|
private selectAll = `${this.isMac ? "{cmd}{a}" : "{ctrl}{a}"}`;
|
||||||
private lazyCodeEditorFallback = ".t--lazyCodeEditor-fallback";
|
private lazyCodeEditorFallback = ".t--lazyCodeEditor-fallback";
|
||||||
private lazyCodeEditorRendered = ".t--lazyCodeEditor-editor";
|
private lazyCodeEditorRendered = ".t--lazyCodeEditor-editor";
|
||||||
|
|
|
||||||
|
|
@ -296,6 +296,8 @@ export class DataSources {
|
||||||
_dsPageTableTriggermenuTarget = (tableName: string) =>
|
_dsPageTableTriggermenuTarget = (tableName: string) =>
|
||||||
`${this._dsPageTabContainerTableName(tableName)} .t--template-menu-trigger`;
|
`${this._dsPageTabContainerTableName(tableName)} .t--template-menu-trigger`;
|
||||||
_gSheetQueryPlaceholder = ".CodeMirror-placeholder";
|
_gSheetQueryPlaceholder = ".CodeMirror-placeholder";
|
||||||
|
_dsNameInExplorer = (dsName: string) =>
|
||||||
|
`div.t--entity-name:contains('${dsName}')`;
|
||||||
|
|
||||||
public AssertDSEditViewMode(mode: "Edit" | "View") {
|
public AssertDSEditViewMode(mode: "Edit" | "View") {
|
||||||
if (mode == "Edit") this.agHelper.AssertElementAbsence(this._editButton);
|
if (mode == "Edit") this.agHelper.AssertElementAbsence(this._editButton);
|
||||||
|
|
@ -1929,6 +1931,8 @@ export class DataSources {
|
||||||
) {
|
) {
|
||||||
const ds_entity_name = dsName.replace(/\s/g, "_");
|
const ds_entity_name = dsName.replace(/\s/g, "_");
|
||||||
this.entityExplorer.ExpandCollapseEntity("Datasources");
|
this.entityExplorer.ExpandCollapseEntity("Datasources");
|
||||||
|
cy.get(this.locator._body).then(($body: any) => {
|
||||||
|
if ($body.find(this._dsNameInExplorer(dsName)).length > 0) {
|
||||||
this.entityExplorer.ExpandCollapseEntity(dsName);
|
this.entityExplorer.ExpandCollapseEntity(dsName);
|
||||||
cy.intercept("GET", "/api/v1/datasources/*/structure?ignoreCache=*").as(
|
cy.intercept("GET", "/api/v1/datasources/*/structure?ignoreCache=*").as(
|
||||||
`getDatasourceStructureUpdated_${ds_entity_name}`,
|
`getDatasourceStructureUpdated_${ds_entity_name}`,
|
||||||
|
|
@ -1939,9 +1943,12 @@ export class DataSources {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.assertHelper
|
this.assertHelper
|
||||||
.WaitForNetworkCall(`@getDatasourceStructureUpdated_${ds_entity_name}`)
|
.WaitForNetworkCall(
|
||||||
|
`@getDatasourceStructureUpdated_${ds_entity_name}`,
|
||||||
|
)
|
||||||
.then(async (interception) => {
|
.then(async (interception) => {
|
||||||
const tables: any[] = interception?.response?.body.data?.tables || [];
|
const tables: any[] =
|
||||||
|
interception?.response?.body.data?.tables || [];
|
||||||
const indexOfTable = tables.findIndex(
|
const indexOfTable = tables.findIndex(
|
||||||
(table) => table.name === targetTableName,
|
(table) => table.name === targetTableName,
|
||||||
);
|
);
|
||||||
|
|
@ -1950,18 +1957,25 @@ export class DataSources {
|
||||||
this.agHelper
|
this.agHelper
|
||||||
.GetNClick(this._dsVirtuosoElement(dsName))
|
.GetNClick(this._dsVirtuosoElement(dsName))
|
||||||
.then((parentElement) => {
|
.then((parentElement) => {
|
||||||
const heightOfParentElement = parentElement.outerHeight() || 0;
|
const heightOfParentElement =
|
||||||
|
parentElement.outerHeight() || 0;
|
||||||
|
|
||||||
// Every element (tables in this scenario) in the virtual list has equal heights. Assumption: Every table element accordion is collapsed by default.
|
// Every element (tables in this scenario) in the virtual list has equal heights. Assumption: Every table element accordion is collapsed by default.
|
||||||
const containerElement = parentElement.find(this._dsVirtuosoList);
|
const containerElement = parentElement.find(
|
||||||
|
this._dsVirtuosoList,
|
||||||
|
);
|
||||||
const elementHeight = parseInt(
|
const elementHeight = parseInt(
|
||||||
containerElement.children().first().attr("data-known-size") ||
|
containerElement
|
||||||
"",
|
.children()
|
||||||
|
.first()
|
||||||
|
.attr("data-known-size") || "",
|
||||||
10,
|
10,
|
||||||
);
|
);
|
||||||
// Total height of the parent container holding the tables in the dom normally without virtualization rendering
|
// Total height of the parent container holding the tables in the dom normally without virtualization rendering
|
||||||
const totalScroll = tables.length * elementHeight;
|
const totalScroll = tables.length * elementHeight;
|
||||||
cy.log(JSON.stringify({ heightOfParentElement, totalScroll }));
|
cy.log(
|
||||||
|
JSON.stringify({ heightOfParentElement, totalScroll }),
|
||||||
|
);
|
||||||
if (heightOfParentElement < totalScroll) {
|
if (heightOfParentElement < totalScroll) {
|
||||||
// Index of the table present in the array of tables which will determine the presence of element inside the parent container
|
// Index of the table present in the array of tables which will determine the presence of element inside the parent container
|
||||||
let offset = indexOfTable * elementHeight;
|
let offset = indexOfTable * elementHeight;
|
||||||
|
|
@ -1987,6 +2001,8 @@ export class DataSources {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public selectTabOnDatasourcePage(tab: "View data" | "Configurations") {
|
public selectTabOnDatasourcePage(tab: "View data" | "Configurations") {
|
||||||
this.agHelper.GetNClick(this._dsPageTabListItem(tab));
|
this.agHelper.GetNClick(this._dsPageTabListItem(tab));
|
||||||
|
|
|
||||||
|
|
@ -328,13 +328,25 @@ export class HomePage {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public InvokeDispatchOnStore() {
|
||||||
|
cy.window().then((win: any) => {
|
||||||
|
if (win && win.store) {
|
||||||
|
cy.window()
|
||||||
|
.its("store")
|
||||||
|
.invoke("dispatch", { type: "LOGOUT_USER_INIT" });
|
||||||
|
} else {
|
||||||
|
// Handle the case where "store" is not present, or simply ignore and continue.
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public LogintoApp(
|
public LogintoApp(
|
||||||
uname: string,
|
uname: string,
|
||||||
pswd: string,
|
pswd: string,
|
||||||
role: "App Viewer" | "Developer" | "Administrator" = "Administrator",
|
role: "App Viewer" | "Developer" | "Administrator" = "Administrator",
|
||||||
) {
|
) {
|
||||||
this.agHelper.Sleep(); //waiting for window to load
|
this.agHelper.Sleep(); //waiting for window to load
|
||||||
cy.window().its("store").invoke("dispatch", { type: "LOGOUT_USER_INIT" });
|
this.InvokeDispatchOnStore();
|
||||||
cy.wait("@postLogout");
|
cy.wait("@postLogout");
|
||||||
this.agHelper.VisitNAssert("/user/login", "signUpLogin");
|
this.agHelper.VisitNAssert("/user/login", "signUpLogin");
|
||||||
this.agHelper.AssertElementVisibility(this._username);
|
this.agHelper.AssertElementVisibility(this._username);
|
||||||
|
|
@ -419,8 +431,13 @@ export class HomePage {
|
||||||
this.assertHelper.AssertNetworkStatus("getPagesForViewApp");
|
this.assertHelper.AssertNetworkStatus("getPagesForViewApp");
|
||||||
}
|
}
|
||||||
|
|
||||||
public EditAppFromAppHover() {
|
public EditAppFromAppHover(appName = "") {
|
||||||
cy.get(this._applicationCard).first().trigger("mouseover");
|
if (appName)
|
||||||
|
this.agHelper
|
||||||
|
.GetElement(this._appCard(appName))
|
||||||
|
.first()
|
||||||
|
.trigger("mouseover");
|
||||||
|
else this.agHelper.GetElement(this._applicationCard).trigger("mouseover");
|
||||||
this.agHelper.GetNClick(this._appHoverIcon("edit"));
|
this.agHelper.GetNClick(this._appHoverIcon("edit"));
|
||||||
this.agHelper.AssertElementAbsence(this.locator._loading);
|
this.agHelper.AssertElementAbsence(this.locator._loading);
|
||||||
this.assertHelper.AssertNetworkStatus("getWorkspace");
|
this.assertHelper.AssertNetworkStatus("getWorkspace");
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ const apiPage = ObjectsRegistry.ApiPage;
|
||||||
const deployMode = ObjectsRegistry.DeployMode;
|
const deployMode = ObjectsRegistry.DeployMode;
|
||||||
const entityExplorer = ObjectsRegistry.EntityExplorer;
|
const entityExplorer = ObjectsRegistry.EntityExplorer;
|
||||||
const assertHelper = ObjectsRegistry.AssertHelper;
|
const assertHelper = ObjectsRegistry.AssertHelper;
|
||||||
|
const homePageTS = ObjectsRegistry.HomePage;
|
||||||
|
|
||||||
let pageidcopy = " ";
|
let pageidcopy = " ";
|
||||||
const chainStart = Symbol();
|
const chainStart = Symbol();
|
||||||
|
|
@ -262,7 +263,7 @@ Cypress.Commands.add("GetUrlQueryParams", () => {
|
||||||
|
|
||||||
Cypress.Commands.add("LogOutUser", () => {
|
Cypress.Commands.add("LogOutUser", () => {
|
||||||
cy.wait(1000); //waiting for window to load
|
cy.wait(1000); //waiting for window to load
|
||||||
cy.window().its("store").invoke("dispatch", { type: "LOGOUT_USER_INIT" });
|
homePageTS.InvokeDispatchOnStore();
|
||||||
assertHelper.AssertNetworkStatus("@postLogout", 200);
|
assertHelper.AssertNetworkStatus("@postLogout", 200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -297,7 +298,7 @@ Cypress.Commands.add("LogintoAppTestUser", (uname, pword) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add("Signup", (uname, pword) => {
|
Cypress.Commands.add("Signup", (uname, pword) => {
|
||||||
cy.window().its("store").invoke("dispatch", { type: "LOGOUT_USER_INIT" });
|
homePageTS.InvokeDispatchOnStore();
|
||||||
cy.wait("@postLogout");
|
cy.wait("@postLogout");
|
||||||
|
|
||||||
cy.visit("/user/signup", { timeout: 60000 });
|
cy.visit("/user/signup", { timeout: 60000 });
|
||||||
|
|
|
||||||
|
|
@ -44,13 +44,13 @@ import {
|
||||||
|
|
||||||
installLogsCollector();
|
installLogsCollector();
|
||||||
|
|
||||||
Cypress.on("uncaught:exception", () => {
|
Cypress.on("uncaught:exception", (error) => {
|
||||||
// returning false here prevents Cypress from
|
//cy.log(error.message);
|
||||||
// failing the test
|
return false; // returning false here prevents Cypress from failing the test
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.on("fail", (error) => {
|
Cypress.on("fail", (error) => {
|
||||||
|
cy.log(error.message);
|
||||||
throw error; // throw error to have test still fail
|
throw error; // throw error to have test still fail
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user