Skip to content
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
276f28a
fix: added a limited test to check the failures
Aug 26, 2024
ac60ca5
fix: api multipart
Aug 26, 2024
0cb3558
fix: mysql 2 spec for checking the 12th index instead of 17
Aug 27, 2024
46349b5
fix: changed the page name to page1 from stores
Aug 27, 2024
c1d3112
fix: api multipart to use ted api
Aug 27, 2024
8a0bca2
fix: changing only the mysql2 spec and reverting other changes
Aug 28, 2024
69c8719
Merge branch 'release' of github.com:appsmithorg/appsmith into cypres…
Sep 2, 2024
8ed1298
Merge branch 'release' of github.com:appsmithorg/appsmith into cypres…
Sep 5, 2024
b84cf4f
fix: testing mongo spec fix
Sep 5, 2024
a246fd5
fix: testing mongo spec fix
Sep 6, 2024
8538c57
fix: testing mongo spec fix
Sep 6, 2024
7136122
fix: testing mongo spec fix
Sep 6, 2024
a83388a
fix: testing mongo spec fix
Sep 6, 2024
2319acf
fix: testing mongo spec fix
Sep 7, 2024
2bcac45
fix: testing mongo spec fix
Sep 9, 2024
aece969
fix: testing mongo spec fix
Sep 9, 2024
6aff87d
fix: testing mongo spec fix
Sep 9, 2024
e29d372
fix: testing mongo spec fix
Sep 10, 2024
506cec8
fix: testing mongo spec fix
Sep 10, 2024
2d381f2
fix: testing mongo spec fix
Sep 10, 2024
ae19c25
Merge branch 'release' of github.com:appsmithorg/appsmith into cypres…
Sep 10, 2024
85eb601
fix: testing mongo spec fix
Sep 10, 2024
02e7f62
Merge branch 'release' of github.com:appsmithorg/appsmith into cypres…
Sep 10, 2024
272d1b9
fix: testing mongo spec fix
Sep 10, 2024
f2587be
fix: testing mongo spec fix
Sep 10, 2024
4da52dc
fix: testing mongo spec fix
Sep 11, 2024
52703b2
fix: testing mongo spec fix
Sep 11, 2024
fd7cfd0
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/mo…
Sep 11, 2024
3930f07
fix: testing mongo spec fix
Sep 11, 2024
92570e7
fix: testing mongo spec fix
Sep 11, 2024
1f5df78
fix: testing mongo spec fix
Sep 11, 2024
a7d22ca
fix: testing mongo spec fix
Sep 11, 2024
9eb8ed0
fix: testing mongo spec fix
Sep 12, 2024
416eeb5
fix: testing mongo spec fix
Sep 12, 2024
619cdd9
fix: testing mongo spec fix
Sep 12, 2024
3882b8f
fix: testing mongo spec fix
Sep 12, 2024
39da7f9
fix: testing mongo spec fix
Sep 12, 2024
7bddaa8
fix: testing mongo spec fix
Sep 12, 2024
128fffd
fix: testing mongo spec fix
Sep 12, 2024
d7ee027
fix: testing mongo spec fix
Sep 13, 2024
930d858
fix: testing mongo spec fix
Sep 14, 2024
6e4f4b1
fix: testing mongo spec fix
Sep 15, 2024
23384ea
fix: testing mongo spec fix
Sep 16, 2024
d221262
fix: testing mongo spec fix
Sep 16, 2024
06ab268
fix: testing mongo spec fix
Sep 16, 2024
dfbdbde
fix: testing mongo spec fix
Sep 16, 2024
16a6939
fix: testing mongo spec fix
Sep 16, 2024
78d1785
fix: testing mongo spec fix
Sep 16, 2024
4370ab7
fix: testing mongo spec fix
Sep 16, 2024
e6816b5
fix: testing mongo spec fix
Sep 16, 2024
c0d5bf0
fix: removed extra function
Sep 16, 2024
c4b221a
fix: reverting unnecessary changes
Sep 16, 2024
aa0234c
Merge branch 'release' of github.com:appsmithorg/appsmith into fix/mo…
Sep 16, 2024
497fe6c
fix: reverting unnecessary changes
Sep 16, 2024
ad97541
fix: minify json
Sep 16, 2024
3aef2d2
fix: reverting limited test file
Sep 16, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ import EditorNavigation, {
AppSidebar,
} from "../../../../support/Pages/EditorNavigation";
import PageList from "../../../../support/Pages/PageList";
import data from "../../../../fixtures/mongouri_data_spec.json";

describe(
"Validate Mongo URI CRUD with JSON Form",
{ tags: ["@tag.Datasource"] },
() => {
let dsName: any;
let importDataCollectionName: string;

it("1. Create DS & Generate CRUD template", () => {
dataSources.NavigateToDSCreateNew();
Expand All @@ -32,13 +34,40 @@ describe(
dataSources.FillMongoDatasourceFormWithURI();
dataSources.TestSaveDatasource();
AppSidebar.navigate(AppSidebarButton.Editor);

importDataCollectionName = dsName + "_Import_data";

// Create data dump in new collection
dataSources.CreateQueryForDS(dsName, "", importDataCollectionName);
dataSources.ValidateNSelectDropdown(
"Command",
"Find document(s)",
"Raw",
);
dataSources.EnterJSContext({
fieldLabel: "Collection",
fieldValue: importDataCollectionName,
});
agHelper.EnterValue(JSON.stringify(data), {
propFieldName: "",
directInput: false,
inputFieldName: "Query",
});

dataSources.RunQuery();
EditorNavigation.NavigateToDatasource(dsName);
dataSources.RefreshDatasourceSchema();

PageList.AddNewPage("Generate page with data");
agHelper.GetNClick(dataSources._selectDatasourceDropdown);
agHelper.GetNClickByContains(dataSources._dropdownOption, dsName);

assertHelper.AssertNetworkStatus("@getDatasourceStructure"); //Making sure table dropdown is populated
agHelper.GetNClick(dataSources._selectTableDropdown, 0, true);
agHelper.GetNClickByContains(dataSources._dropdownOption, "mongomart");
agHelper.GetNClickByContains(
dataSources._dropdownOption,
importDataCollectionName,
);
GenerateCRUDNValidateDeployPage(
"/img/products/mug.jpg",
"Coffee Mug",
Expand All @@ -56,6 +85,13 @@ describe(

it("2. Verify Update data from Deploy page - on mongomart - existing record", () => {
//Update documents query to handle the int _id data
EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query);
agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, {
propFieldName: "",
directInput: false,
inputFieldName: "Query",
});

EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query);
agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, {
propFieldName: "",
Expand All @@ -73,12 +109,8 @@ describe(
table.ReadTableRowColumnData(2, 0, "v2", 200).then(($cellData) => {
expect($cellData).to.be.empty;
});
table.ReadTableRowColumnData(2, 6, "v2", 2000).then(($cellData) => {
expect($cellData).to.eq("WiredTiger T-shirt");
});
table.ReadTableRowColumnData(2, 7, "v2", 200).then(($cellData) => {
expect($cellData).to.eq("Apparel");
});

table.VerifyDataInRow(2, "v2", ["WiredTiger T-shirt", "Apparel"]);

table.SelectTableRow(8, 0, true, "v2");
deployMode.ClearJSONFieldValue("Slogan");
Expand Down Expand Up @@ -132,7 +164,7 @@ describe(
}
});

it("4. Verify Delete from Deploy page - on MongoMart - newly added record", () => {
it("4. Verify Delete from Deploy page - on MongoMart", () => {
agHelper.ClickButton("Delete", 0);
agHelper.AssertElementVisibility(locators._modal);
agHelper.AssertElementVisibility(
Expand All @@ -141,14 +173,8 @@ describe(
),
);
agHelper.ClickButton("Confirm");
assertHelper.AssertNetworkExecutionSuccess("@postExecute");
assertHelper.AssertNetworkStatus("@postExecute", 200);
assertHelper.AssertNetworkStatus("@postExecute", 200);
table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => {
expect($cellData).to.eq("Coffee Mug");
});
table.ReadTableRowColumnData(1, 6, "v2", 200).then(($cellData) => {
expect($cellData).to.eq("Track Jacket");
});
});

it("5 Verify Filter & Search & Download from Deploy page - on MongoMart - existing record", () => {
Expand Down Expand Up @@ -198,7 +224,11 @@ describe(
table.WaitUntilTableLoad(0, 0, "v2");
PageList.AddNewPage();
dataSources.CreateQueryForDS(dsName);
dataSources.ValidateNSelectDropdown("Collection", "", "mongomart");
dataSources.ValidateNSelectDropdown(
"Collection",
"",
importDataCollectionName,
);
dataSources.RunQuery({ toValidateResponse: false });
dataSources.AddSuggestedWidget(Widgets.Table);
table.ReadTableRowColumnData(0, 3, "v2").then((cellData) => {
Expand All @@ -224,17 +254,9 @@ function GenerateCRUDNValidateDeployPage(
appSettings.OpenPaneAndChangeTheme("Pacific");
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE));

//Validating loaded table
agHelper.AssertElementExist(dataSources._selectedRow);
table.ReadTableRowColumnData(0, 1, "v2", 2000).then(($cellData) => {
expect($cellData).to.eq(col1Text);
});
table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => {
expect($cellData).to.eq(col6Text);
});
table.ReadTableRowColumnData(0, 7, "v2", 200).then(($cellData) => {
expect($cellData).to.eq(col7Text);
});

table.VerifyDataInRow(0, "v2", [col1Text, col6Text, col7Text]);

//Validating loaded JSON form
cy.xpath(locators._buttonByText("Update")).then((selector) => {
Expand Down
Loading