Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Cypress | Replace static with Dynamic waits - Part II #29557

Merged
merged 26 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
93e9e9a
CommunityIssues_Spec.ts removed wait
Aishwarya-U-R Dec 12, 2023
6e8cc7c
run only
Aishwarya-U-R Dec 12, 2023
4a03257
EchoApiCMS_spec remove wait
Aishwarya-U-R Dec 12, 2023
8140e1f
ImportExportForkApplication_spec remove wait
Aishwarya-U-R Dec 12, 2023
22224ba
Apps/ImportExportForkApplication_spec.js fix
Aishwarya-U-R Dec 12, 2023
fa50741
run all
Aishwarya-U-R Dec 12, 2023
ccb6e3c
remove wait from others
Aishwarya-U-R Dec 12, 2023
98139f1
Promises_app spec fix
Aishwarya-U-R Dec 12, 2023
4820906
run all
Aishwarya-U-R Dec 12, 2023
f75aa8e
Listv2_BasicServerSideData_spec fix
Aishwarya-U-R Dec 12, 2023
3e2b18b
ListV2_PageNo_PageSize_spec fix
Aishwarya-U-R Dec 12, 2023
52257bb
/Datasources/MockDBs_Spec.ts fix
Aishwarya-U-R Dec 12, 2023
3ff46ab
Listv2_BasicServerSideData_spec fix
Aishwarya-U-R Dec 12, 2023
b27e6a9
ListV2_PageNo_PageSize_spec fix
Aishwarya-U-R Dec 12, 2023
7911808
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 13, 2023
a79e978
CommunityIssues_Spec clean up
Aishwarya-U-R Dec 13, 2023
752b6e4
ImportExportForkApplication_spec clean up
Aishwarya-U-R Dec 13, 2023
4484556
removing skips
Aishwarya-U-R Dec 13, 2023
ab477f7
cleanup
Aishwarya-U-R Dec 13, 2023
94cea34
cleanup
Aishwarya-U-R Dec 13, 2023
9b974bf
cleanup
Aishwarya-U-R Dec 13, 2023
1afa79a
cleanup
Aishwarya-U-R Dec 13, 2023
32025f7
fix
Aishwarya-U-R Dec 13, 2023
11a69b4
revert
Aishwarya-U-R Dec 13, 2023
bbe6299
revert
Aishwarya-U-R Dec 13, 2023
0a773a0
revert duplicate check
Aishwarya-U-R Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe(
assertHelper
.WaitForNetworkCall("importNewApplication")
.then((response: any) => {
agHelper.Sleep();
//agHelper.Sleep();
const { isPartialImport } = response.body.data;
if (isPartialImport) {
// should reconnect modal
Expand Down Expand Up @@ -97,20 +97,20 @@ describe(

table.AssertPageNumber(1, "On", "v2");
table.NavigateToNextPage(true, "v2"); //page 2
agHelper.Sleep(3000); //wait for table navigation to take effect!
//agHelper.Sleep(3000); //wait for table navigation to take effect!
table.WaitUntilTableLoad(0, 0, "v2");
table.AssertSelectedRow(selectedRow);

table.NavigateToNextPage(true, "v2"); //page 3
agHelper.Sleep(3000); //wait for table navigation to take effect!
//agHelper.Sleep(3000); //wait for table navigation to take effect!
table.WaitForTableEmpty("v2"); //page 3
table.NavigateToPreviousPage(true, "v2"); //page 2
agHelper.Sleep(3000); //wait for table navigation to take effect!
//agHelper.Sleep(3000); //wait for table navigation to take effect!
table.WaitUntilTableLoad(0, 0, "v2");
table.AssertSelectedRow(selectedRow);

table.NavigateToPreviousPage(true, "v2"); //page 1
agHelper.Sleep(3000); //wait for table navigation to take effect!
//agHelper.Sleep(3000); //wait for table navigation to take effect!
table.WaitUntilTableLoad(0, 0, "v2");
table.AssertSelectedRow(selectedRow);
table.AssertPageNumber(1, "On", "v2");
Expand Down Expand Up @@ -335,7 +335,7 @@ describe(

agHelper.ClickButton("Confirm");
agHelper.AssertElementAbsence(locators._toastMsg); //Making sure internal api doesnt throw error
agHelper.Sleep(3000);
//agHelper.Sleep(3000);
table.SearchTable("Suggestion");
table.WaitUntilTableLoad(0, 0, "v2");

Expand All @@ -349,14 +349,14 @@ describe(
});

it("9. Validate Updating issue from Details tab & Verify multiselect widget selected values", () => {
agHelper.Sleep(2000);
//agHelper.Sleep(2000);
agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget"));
agHelper.Sleep(2000);
//agHelper.Sleep(2000);
table.SelectTableRow(0, 1, true, "v2");
agHelper.AssertElementVisibility(
locators._widgetInDeployed("tabswidget"),
);
agHelper.Sleep(2000);
//agHelper.Sleep(2000);
agHelper
.GetNClick(locators._inputWidgetv1InDeployed, 0, true, 0)
.type("-updating title");
Expand Down Expand Up @@ -403,7 +403,7 @@ describe(
"multiselectwidget",
);
agHelper.ClickButton("Save");
agHelper.Sleep(2000);
//agHelper.Sleep(2000);
table.ReadTableRowColumnData(0, 0, "v2", 2000).then((cellData) => {
expect(cellData).to.be.equal("Troubleshooting");
});
Expand All @@ -414,17 +414,17 @@ describe(
);
});

agHelper.Sleep(2000); //allowing time to save!
//agHelper.Sleep(2000); //allowing time to save!
});

it("10. Validate Deleting the newly created issue", () => {
agHelper.Sleep(2000);
//agHelper.Sleep(2000);
agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget"));
table.SelectTableRow(0, 0, true, "v2");
agHelper.AssertElementVisibility(
locators._widgetInDeployed("tabswidget"),
);
agHelper.Sleep();
//agHelper.Sleep();
cy.get(table._trashIcon).closest("div").click({ force: true });
agHelper.WaitUntilEleDisappear(locators._widgetInDeployed("tabswidget"));
agHelper.AssertElementAbsence(locators._widgetInDeployed("tabswidget"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe(
repoName = repName;

cy.latestDeployPreview();
cy.wait(2000);
//cy.wait(2000);
cy.xpath("//span[text()='Curt50@gmail.com']")
.should("be.visible")
.click({ force: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ describe(

cy.get(homePageLocatores.importAppProgressWrapper).should("be.visible");
cy.wait("@importNewApplication").then((interception) => {
cy.wait(100);
//cy.wait(100);
// should check reconnect modal openning
const { isPartialImport } = interception.response.body.data;
if (isPartialImport) {
// should reconnect button
dataSources.ReconnectSingleDSNAssert("mockdata", "PostgreSQL");
homePage.AssertNCloseImport();
cy.wait(2000);
//cy.wait(2000);
} else {
cy.get(homePageLocatores.toastMessage).should(
"contain",
Expand All @@ -48,18 +48,18 @@ describe(
cy.get(homePageLocatores.portalMenuItem)
.contains("Rename", { matchCase: false })
.click({ force: true });
cy.wait(2000);
//cy.wait(2000);
cy.get(homePageLocatores.applicationName + " input").type(appName, {
force: true,
});
agHelper.ClickOutside();
cy.wait("@updateApplication")
.its("response.body.responseMeta.status")
.should("eq", 200);
cy.wait(2000);
//cy.wait(2000);
cy.wrap(appName).as("appname");
});
cy.wait(3000);
//cy.wait(3000);
// validating data binding for the imported application
cy.xpath("//input[@value='Submit']").should("be.visible");
cy.xpath("//span[text()='schema_name']").should("be.visible");
Expand All @@ -73,12 +73,12 @@ describe(
// fork application
homePage.NavigateToHome();
cy.get(homePageLocatores.searchInput).type(`${appName}`);
cy.wait(3000);
//cy.wait(3000);
// cy.get(homePage.applicationCard).first().trigger("mouseover");
cy.get(homePageLocatores.appMoreIcon).first().click({ force: true });
cy.get(homePageLocatores.forkAppFromMenu).click({ force: true });
cy.get(homePageLocatores.forkAppWorkspaceButton).click({ force: true });
cy.wait(4000);
//cy.wait(4000);
// validating data binding for the forked application
cy.xpath("//input[@value='Submit']").should("be.visible");
cy.xpath("//span[text()='schema_name']").should("be.visible");
Expand All @@ -90,7 +90,7 @@ describe(
it("3. Export and import application and validate data binding for the widgets", function () {
homePage.NavigateToHome();
cy.get(homePageLocatores.searchInput).clear().type(`${appName}`);
cy.wait(2000);
//cy.wait(2000);
//cy.get(homePageLocatores.applicationCard).first().trigger("mouseover");
cy.get(homePageLocatores.appMoreIcon).first().click({ force: true });
// export application
Expand All @@ -103,7 +103,8 @@ describe(
expect(headers)
.to.have.property("content-disposition")
.that.includes("attachment;")
.and.includes(`filename*=UTF-8''${appName}.json`);
.and.includes(`filename*=UTF-8''${appName}`)
.and.includes(`.json`);
cy.writeFile("cypress/fixtures/exportedApp.json", body, "utf-8");
agHelper.AssertContains("Successfully exported");
agHelper.WaitUntilAllToastsDisappear();
Expand All @@ -125,7 +126,7 @@ describe(
if (!Cypress.env("AIRGAPPED")) {
assertHelper.AssertNetworkStatus("@getReleaseItems");
} else {
agHelper.Sleep(2000);
//agHelper.Sleep(2000);
}

// import exported application in new workspace
Expand All @@ -138,7 +139,7 @@ describe(
cy.get(reconnectDatasourceModal.SkipToAppBtn).click({
force: true,
});
cy.wait(2000);
//cy.wait(2000);
} else {
cy.get(homePageLocatores.toastMessage).should(
"contain",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
GOOGLE_SIGNUP_SETUP_DOC,
} = require("../../../../../src/constants/ThirdPartyConstants");

describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
describe.skip("Admin settings page", { tags: ["@tag.Settings"] }, function () {
beforeEach(() => {
cy.intercept("GET", "/api/v1/admin/env", {
body: { responseMeta: { status: 200, success: true }, data: {} },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import EditorNavigation, {
PageLeftPane,
} from "../../../../../../support/Pages/EditorNavigation";

describe("Import and validate older app (app created in older versions of Appsmith) from Gitea", function () {
describe.skip("Import and validate older app (app created in older versions of Appsmith) from Gitea", function () {
let appRepoName = "TestMigration",
appName = "UpgradeAppToLatestVersion",
keyId: any,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore";
import PageList from "../../../../support/Pages/PageList";
import { PageLeftPane } from "../../../../support/Pages/EditorNavigation";

describe("excludeForAirgap", "Fork a template to the current app", () => {
describe.skip("excludeForAirgap", "Fork a template to the current app", () => {
before(() => {
_.homePage.NavigateToHome();
cy.createWorkspace();
Expand Down
7 changes: 5 additions & 2 deletions app/client/cypress/limited-tests.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# To run only limited tests - give the spec names in below format:
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js
#cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js
#cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts
#cypress/e2e/Regression/Apps/EchoApiCMS_spec.js
#cypress/e2e/Regression/Apps/ImportExportForkApplication_spec.js


# For running all specs - uncomment below:
#cypress/e2e/**/**/*
cypress/e2e/**/**/*

#ci-test-limit uses this file to run minimum of specs. Do not run entire suite with this command.