Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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,38 @@ 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)",
"Insert document(s)",
);
dataSources.EnterJSContext({
fieldLabel: "Collection",
fieldValue: importDataCollectionName,
});
agHelper.EnterValue(JSON.stringify(data), {
propFieldName: "",
directInput: false,
inputFieldName: "Documents",
});

dataSources.RunQuery();

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 +83,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 @@ -65,7 +99,7 @@ describe(
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE));
agHelper.GetNAssertElementText(
locators._textWidgetInDeployed,
"mongomart Data",
`${importDataCollectionName} Data`,
);
//Validating loaded table
table.SelectTableRow(2, 0, true, "v2");
Expand Down Expand Up @@ -132,7 +166,7 @@ describe(
}
});

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

it("5 Verify Filter & Search & Download from Deploy page - on MongoMart - existing record", () => {
it("5 Verify Filter & Search & Download from Deploy page - on mongo mart data - existing record", () => {
table.SearchTable("Swag");
agHelper.Sleep(2500); //for search to load
for (let i = 0; i <= 1; i++) {
Expand Down Expand Up @@ -198,7 +232,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 @@ -223,7 +261,6 @@ function GenerateCRUDNValidateDeployPage(
assertHelper.AssertNetworkStatus("@updateLayout", 200);
appSettings.OpenPaneAndChangeTheme("Pacific");
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE));

//Validating loaded table
agHelper.AssertElementExist(dataSources._selectedRow);
table.ReadTableRowColumnData(0, 1, "v2", 2000).then(($cellData) => {
Expand Down
1 change: 1 addition & 0 deletions app/client/cypress/fixtures/mongouri_data_spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ { "_id": { "$numberInt": "1" }, "title": "Gray Hooded Sweatshirt", "slogan": "The top hooded sweatshirt we offer", "description": "Unless you live in a nudist colony, there are moments when the chill you feel demands that you put on something warm, and for those times, there's nothing better than this sharp MongoDB hoodie. Made of 100% cotton, this machine washable, mid-weight hoodie is all you need to stay comfortable when the temperature drops. And, since being able to keep your vital stuff with you is important, the hoodie features two roomy kangaroo pockets to ensure nothing you need ever gets lost.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/hoodie.jpg", "price": { "$numberDouble": "29.99" } }, { "_id": { "$numberInt": "5" }, "title": "Women's T-shirt", "slogan": "MongoDB shirt in-style", "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/white-mongo.jpg", "price": { "$numberDouble": "45.0" } }, { "_id": { "$numberInt": "3" }, "title": "Stress Ball", "slogan": "Squeeze your stress away", "description": "The moment life piles more onto your already heaping plate and you start feeling hopelessly overwhelmed, take a stress ball in hand and squeeze as hard as you can. Take a deep breath and just let that tension go. Repeat as needed. It will all be OK! Having something small, portable and close at hand is a must for stress management.", "stars": { "$numberInt": "0" }, "category": "Swag", "img_url": "/img/products/stress-ball.jpg", "price": { "$numberDouble": "5.0" } }, { "_id": { "$numberInt": "6" }, "title": "Brown Carry-all Bag", "slogan": "Keep extra items here", "description": "Let your style speak for itself with this chic brown carry-all bag. Featuring a nylon exterior with solid contrast trim, brown in color, and MongoDB logo", "stars": { "$numberInt": "0" }, "category": "Swag", "img_url": "/img/products/brown-bag.jpg", "price": { "$numberDouble": "5.0" } }, { "_id": { "$numberInt": "7" }, "title": "Brown Tumbler", "slogan": "Bring your coffee to go", "description": "The MongoDB Insulated Travel Tumbler is smartly designed to maintain temperatures and go anywhere. Dual wall construction will keep your beverages hot or cold for hours and a slide lock lid helps minimize spills.", "stars": { "$numberInt": "0" }, "category": "Kitchen", "img_url": "/img/products/brown-tumbler.jpg", "price": { "$numberDouble": "9.0" } }, { "_id": { "$numberInt": "8" }, "title": "Pen (Green)", "slogan": "The only pen you'll ever need", "description": "Erase and rewrite repeatedly without damaging documents. The needlepoint tip creates clear precise lines and the thermo-sensitive gel ink formula disappears with erasing friction.", "stars": { "$numberInt": "0" }, "category": "Office", "img_url": "/img/products/green-pen.jpg", "price": { "$numberDouble": "2.0" } }, { "_id": { "$numberInt": "10" }, "title": "Green T-shirt", "slogan": "MongoDB community shirt", "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/green-tshirt.jpg", "price": { "$numberDouble": "20.0" } }, { "_id": { "$numberInt": "11" }, "title": "MongoDB The Definitive Guide", "slogan": "2nd Edition", "description": "Manage the huMONGOus amount of data collected through your web application with MongoDB. This authoritative introduction—written by a core contributor to the project—shows you the many advantages of using document-oriented databases, and demonstrates how this reliable, high-performance system allows for almost infinite horizontal scalability.", "stars": { "$numberInt": "0" }, "category": "Books", "img_url": "/img/products/guide-book.jpg", "price": { "$numberDouble": "20.0" } }, { "_id": { "$numberInt": "2" }, "title": "Coffee Mug", "slogan": "Keep your coffee hot!", "description": "A mug is a type of cup used for drinking hot beverages, such as coffee, tea, hot chocolate or soup. Mugs usually have handles, and hold a larger amount of fluid than other types of cup. Usually a mug holds approximately 12 US fluid ounces (350 ml) of liquid; double a tea cup. A mug is a less formal style of drink container and is not usually used in formal place settings, where a teacup or coffee cup is preferred.", "stars": { "$numberInt": "0" }, "category": "Kitchen", "img_url": "/img/products/mug.jpg", "price": { "$numberDouble": "12.5" }, "reviews": [ { "name": "", "comment": "", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.456067725049E+12" } }, { "name": "", "comment": "When I drank coffee from this mug the coffee seemed somehow unstructured, as if the molecules weren't following a specific chemical structure. When I drink coffee from my Oracle mug it tastes like all the caffeine has the same atomic formula. Plus the leaf makes it taste funny. ", "stars": { "$numberInt": "1" }, "date": { "$numberDouble": "1.471519691157E+12" } }, { "name": "", "comment": "Much better than a datastax mug!!!!! And all my hipster web developer friends now think I'm terribly cool ", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.471519744173E+12" } } ] }, { "_id": { "$numberInt": "12" }, "title": "Leaf Sticker", "slogan": "Add to your sticker collection", "description": "Waterproof vinyl, will last 18 months outdoors. Ideal for smooth flat surfaces like laptops, journals, windows etc. Easy to remove. 50% discounts on all orders of any 6+", "stars": { "$numberInt": "0" }, "category": "Stickers", "img_url": "/img/products/leaf-sticker.jpg", "price": { "$numberDouble": "1.0" }, "reviews": [ { "name": "r1", "comment": "My First Review", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.468800807077E+12" } }, { "name": "r 2", "comment": "My Second review", "stars": { "$numberInt": "2" }, "date": { "$numberDouble": "1.468800824493E+12" } } ] }, { "_id": { "$numberInt": "4" }, "title": "Track Jacket", "slogan": "Go to the track in style!", "description": "Crafted from ultra-soft combed cotton, this essential jacket features sporty contrast tipping and MongoDB's signature embroidered leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/track-jacket.jpg", "price": { "$numberDouble": "45.0" }, "reviews": [ { "name": "Shannon", "comment": "This is so warm and comfortable.", "stars": { "$numberInt": "2" }, "date": { "$numberDouble": "1.455800194995E+12" } }, { "name": "Bob", "comment": "Love this.", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.455804800769E+12" } }, { "name": "Jorge", "comment": "Brown. It's brown.", "stars": { "$numberInt": "4" }, "date": { "$numberDouble": "1.455804825509E+12" } }, { "name": "Guy", "comment": "My five star review", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.46880086461E+12" } } ] }, { "_id": { "$numberInt": "14" }, "title": "USB Stick (Leaf)", "slogan": "1GB of space", "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", "stars": { "$numberInt": "0" }, "category": "Electronics", "img_url": "/img/products/leaf-usb.jpg", "price": { "$numberDouble": "20.0" } }, { "_id": { "$numberInt": "16" }, "title": "Powered by MongoDB Sticker", "slogan": "Add to your sticker collection", "description": "Waterproof vinyl, will last 18 months outdoors. Ideal for smooth flat surfaces like laptops, journals, windows etc. Easy to remove. 50% discounts on all orders of any 6+", "stars": { "$numberInt": "0" }, "category": "Stickers", "img_url": "/img/products/sticker.jpg", "price": { "$numberDouble": "1.0" } }, { "_id": { "$numberInt": "15" }, "title": "Scaling MongoDB", "slogan": "2nd Edition", "description": "Create a MongoDB cluster that will grow to meet the needs of your application. With this short and concise book, you'll get guidelines for setting up and using clusters to store a large volume of data, and learn how to access the data efficiently. In the process, you'll understand how to make your application work with a distributed database system.", "stars": { "$numberInt": "0" }, "category": "Books", "img_url": "/img/products/scaling-book.jpg", "price": { "$numberDouble": "29.0" }, "reviews": [ { "name": "Horatio", "comment": "This is a pretty good book", "stars": { "$numberInt": "4" }, "date": { "$numberDouble": "1.456086633854E+12" } } ] }, { "_id": { "$numberInt": "9" }, "title": "Pen (Black)", "slogan": "The only pen you'll ever need", "description": "Erase and rewrite repeatedly without damaging documents. The needlepoint tip creates clear precise lines and the thermo-sensitive gel ink formula disappears with erasing friction.", "stars": { "$numberInt": "0" }, "category": "Office", "img_url": "/img/products/pen.jpg", "price": { "$numberDouble": "2.0" } }, { "_id": { "$numberInt": "18" }, "title": "MongoDB Umbrella (Gray)", "slogan": "Premium Umbrella", "description": "Our crook handle stick umbrella opens automatically with the push of a button. A traditional umbrella with classic appeal.", "stars": { "$numberInt": "0" }, "category": "Umbrellas", "img_url": "/img/products/umbrella.jpg", "price": { "$numberDouble": "21.0" } }, { "_id": { "$numberInt": "20" }, "title": "MongoDB University T-shirt", "slogan": "Show Your MDBU Alumni Status", "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/univ-tshirt.jpg", "price": { "$numberDouble": "45.0" } }, { "_id": { "$numberInt": "21" }, "title": "USB Stick", "slogan": "5GB of space", "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", "stars": { "$numberInt": "0" }, "category": "Electronics", "img_url": "/img/products/leaf-usb.jpg", "price": { "$numberDouble": "40.0" } }, { "_id": { "$numberInt": "22" }, "title": "Water Bottle", "slogan": "Glass water bottle", "description": "High quality glass bottle provides a healthier way to drink. Silicone sleeve provides a good grip, a see-through window, and protects the glass vessel. Eliminates toxic leaching that plastic can cause. Innovative design holds 22-1/2 ounces. Dishwasher safe", "stars": { "$numberInt": "0" }, "category": "Kitchen", "img_url": "/img/products/water-bottle.jpg", "price": { "$numberDouble": "23.0" } }, { "_id": { "$numberInt": "17" }, "title": "MongoDB Umbrella (Brown)", "slogan": "Premium Umbrella", "description": "Our crook handle stick umbrella opens automatically with the push of a button. A traditional umbrella with classic appeal.", "stars": { "$numberInt": "0" }, "category": "Umbrellas", "img_url": "/img/products/umbrella-brown.jpg", "price": { "$numberDouble": "21.0" }, "reviews": [ { "name": "Donald Trump", "comment": "This is the best umbrella you will ever use.", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.456270097364E+12" } }, { "name": "Shannon", "comment": "Sturdy construction, but a little too big to fit in my bag for work.", "stars": { "$numberInt": "3" }, "date": { "$numberDouble": "1.456270240382E+12" } } ] }, { "_id": { "$numberInt": "19" }, "title": "MongoDB University Book", "slogan": "A concise summary of MongoDB commands", "description": "Keep the MongoDB commands you'll need at your fingertips with this concise book.", "stars": { "$numberInt": "0" }, "category": "Books", "img_url": "/img/products/univ-book.jpg", "price": { "$numberDouble": "4.0" } }, { "_id": { "$numberInt": "23" }, "title": "WiredTiger T-shirt", "slogan": "Unleash the tiger", "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/wt-shirt.jpg", "price": { "$numberDouble": "22.0" } }, { "_id": { "$numberInt": "13" }, "title": "USB Stick (Green)", "slogan": "1GB of space", "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", "stars": { "$numberInt": "0" }, "category": "Electronics", "img_url": "/img/products/greenusb.jpg", "price": { "$numberDouble": "20.0" }, "reviews": [ { "name": "Ringo", "comment": "He's very green.", "stars": { "$numberInt": "4" }, "date": { "$numberDouble": "1.45580490225E+12" } } ] } ]