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

feat: update response tab UI #37352

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cb597f4
chore: update tabs paddings
alex-golovanov Nov 11, 2024
d28b531
chore: update button text
alex-golovanov Nov 11, 2024
52654af
feat: add response type selector icons
alex-golovanov Nov 12, 2024
94d376d
feat: change selector to menu & update spacing/layout
alex-golovanov Nov 12, 2024
ccacb12
feat: adjust sizing & spacing
alex-golovanov Nov 12, 2024
ee36111
Merge branch 'release' into feat/35290-update-response-tab-ui
alex-golovanov Nov 12, 2024
cf838f4
chore: remove test condition
alex-golovanov Nov 13, 2024
c755b34
chore: add common constants
alex-golovanov Nov 13, 2024
3c6a107
feat: update design
alex-golovanov Nov 13, 2024
57792a2
feat: update design & switch to minWtidth
alex-golovanov Nov 13, 2024
d78847f
chore: switch to common tab bar height & update type
alex-golovanov Nov 13, 2024
70c4e99
chore: correct size & fix potential bug
alex-golovanov Nov 13, 2024
2ecd266
fix: switch from hook&refs to direct event handlers
alex-golovanov Nov 13, 2024
c741a2f
fix: account for scrollbar width
alex-golovanov Nov 14, 2024
7df6776
chore: add status bar for error state
alex-golovanov Nov 14, 2024
87d79d5
Merge branch 'release' into feat/35290-update-response-tab-ui
alex-golovanov Nov 18, 2024
041e7b6
chore: fix response type selector tests
alex-golovanov Nov 18, 2024
693df86
Merge branch 'release' into feat/35290-update-response-tab-ui
alex-golovanov Nov 18, 2024
fa3ede6
chore: test fixes
alex-golovanov Nov 19, 2024
66f044b
test: add record count test
alex-golovanov Nov 19, 2024
9a4fbbe
fix: added default record count of 1 for cud operations
alex-golovanov Nov 20, 2024
a1f02f4
feat: add record checking & improve content type checking
alex-golovanov Nov 20, 2024
fe16e7d
chore: fix unit tests
alex-golovanov Nov 20, 2024
7ce1bd4
chore: remove detached tests
alex-golovanov Nov 20, 2024
97ada3d
chore: change record count params
alex-golovanov Nov 20, 2024
9d827b7
fix: make operator optional & add a default
alex-golovanov Nov 21, 2024
2f3e880
chore: update conditions
alex-golovanov Nov 21, 2024
3f1d3f2
chore: update message
alex-golovanov Nov 21, 2024
7bb20a6
chore: uncomment
alex-golovanov Nov 21, 2024
11f5301
Merge branch 'release' into feat/35290-update-response-tab-ui
alex-golovanov Nov 21, 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 @@ -45,9 +45,9 @@ describe(
EditorNavigation.SelectEntityByName(queryName, EntityType.Query);

BottomPane.response.switchToResponseTab();

BottomPane.response.openResponseTypeMenu();
agHelper.AssertElementVisibility(
BottomPane.response.getResponseTypeSelector("TABLE"),
BottomPane.response.locators.responseTypeMenuItem("TABLE"),
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,32 @@ describe(
//Add HSET
dataSources.CreateQueryAfterDSSaved();
dataSources.EnterQuery(hSetReceipe);
dataSources.RunQueryNVerifyResponseViews(1); //verify all views are returned!
dataSources.runQueryAndVerifyResponseViews(); //verify all views are returned!
dataSources.AssertQueryTableResponse(0, "4"); //Success response for 4 keys inserted via above HSET!

//Read only one key from above HSET
dataSources.EnterQuery(hGetKeys);
dataSources.RunQueryNVerifyResponseViews(1); //verify all views are returned!
dataSources.runQueryAndVerifyResponseViews(); //verify all views are returned!
dataSources.AssertQueryTableResponse(0, "Vegetable Stir Fry");

//Read more than one key from above HSET
dataSources.EnterQuery(hMGet);
dataSources.RunQueryNVerifyResponseViews(2);
dataSources.runQueryAndVerifyResponseViews({ count: 2 }); //verify all views are returned!
dataSources.AssertQueryTableResponse(0, "easy");
dataSources.AssertQueryTableResponse(1, "Vegetable Stir Fry");

//Update key value in HSET
dataSources.EnterQuery(hUpdate);
dataSources.RunQueryNVerifyResponseViews(1); //verify all views are returned!
dataSources.runQueryAndVerifyResponseViews(); //verify all views are returned!

//validate updated key
dataSources.EnterQuery(getUpdatedKey);
dataSources.RunQueryNVerifyResponseViews(1);
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertQueryTableResponse(0, "medium");

//Get All keys from HSET
dataSources.EnterQuery(getAll);
dataSources.RunQueryNVerifyResponseViews(8); //4 keys, 4 values
dataSources.runQueryAndVerifyResponseViews({ count: 8 }); //4 keys, 4 values
dataSources.ReadQueryTableResponse(0).then(($cellData: any) => {
expect($cellData).to.be.oneOf([
"name",
Expand All @@ -70,11 +70,11 @@ describe(

//Ading one more key/value to HSET
dataSources.EnterQuery(addNewKeyValue);
dataSources.RunQueryNVerifyResponseViews(1);
dataSources.runQueryAndVerifyResponseViews();

//Verify new key/value also added to HSET
dataSources.EnterQuery(getAll);
dataSources.RunQueryNVerifyResponseViews(10); //5 keys, 5 values
dataSources.runQueryAndVerifyResponseViews({ count: 10 }); //5 keys, 5 values
dataSources.ReadQueryTableResponse(0).then(($cellData: any) => {
expect($cellData).to.be.oneOf([
"name",
Expand All @@ -87,11 +87,11 @@ describe(

//Deleting the Hash key
dataSources.EnterQuery(deletehKey);
dataSources.RunQueryNVerifyResponseViews(1);
dataSources.runQueryAndVerifyResponseViews();

//Verify Deletion is success
dataSources.EnterQuery(hGetKeys);
dataSources.RunQueryNVerifyResponseViews(); //5 keys, 5 values
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertQueryTableResponse(0, "null");

// Delete the query & datasource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe(
agHelper.FocusElement(locators._codeMirrorTextArea);
//agHelper.VerifyEvaluatedValue(tableCreateQuery); //failing sometimes!

dataSources.RunQueryNVerifyResponseViews();
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertTableInVirtuosoList(dsName, "productlines");

agHelper.ActionContextMenuWithInPane({
Expand Down Expand Up @@ -282,7 +282,7 @@ describe(
agHelper.FocusElement(locators._codeMirrorTextArea);
//agHelper.VerifyEvaluatedValue(tableCreateQuery);

dataSources.RunQueryNVerifyResponseViews();
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertTableInVirtuosoList(dsName, "Stores", false);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe(
agHelper.FocusElement(locators._codeMirrorTextArea);
//agHelper.VerifyEvaluatedValue(tableCreateQuery);

dataSources.RunQueryNVerifyResponseViews();
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertTableInVirtuosoList(dsName, "Stores");
alex-golovanov marked this conversation as resolved.
Show resolved Hide resolved

agHelper.ActionContextMenuWithInPane({
Expand All @@ -79,7 +79,7 @@ describe(

it("2. Validate Select record from Postgress datasource & verify query response", () => {
dataSources.CreateQueryForDS(dsName, "SELECT * FROM Stores LIMIT 10");
dataSources.RunQueryNVerifyResponseViews(10);
dataSources.runQueryAndVerifyResponseViews({ count: 10 });
dataSources.AssertQueryTableResponse(5, "2112");
dataSources.AssertQueryTableResponse(6, "Mike's Liquors");
// Commenting this deletion of query to make the generate crud work on the new page instead of the current page
Expand Down Expand Up @@ -375,7 +375,7 @@ describe(
agHelper.FocusElement(locators._codeMirrorTextArea);
//agHelper.VerifyEvaluatedValue(tableCreateQuery);

dataSources.RunQueryNVerifyResponseViews();
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertTableInVirtuosoList(dsName, "Stores", false);

agHelper.ActionContextMenuWithInPane({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe(
agHelper.FocusElement(locators._codeMirrorTextArea);
//agHelper.VerifyEvaluatedValue(tableCreateQuery); //failing sometimes!

dataSources.RunQueryNVerifyResponseViews();
dataSources.runQueryAndVerifyResponseViews();
});

it("2. Validate Select record from Postgress datasource & verify query response", () => {
Expand All @@ -70,7 +70,7 @@ describe(
"public.vessels",
"Select",
);
dataSources.RunQueryNVerifyResponseViews(10);
dataSources.runQueryAndVerifyResponseViews({ count: 10 });
dataSources.AssertQueryTableResponse(0, "371681");
dataSources.AssertQueryTableResponse(6, "Passenger");
agHelper.ActionContextMenuWithInPane({
Expand Down Expand Up @@ -617,7 +617,7 @@ describe(
dataSources.CreateQueryForDS(dsName, deleteTblQuery, "DropVessels");
agHelper.FocusElement(locators._codeMirrorTextArea);

dataSources.RunQueryNVerifyResponseViews();
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertTableInVirtuosoList(dsName, "public.vessels", false);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describe(
//Validating use of extention
query = `CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS "pgcrypto"`;
dataSources.CreateQueryForDS(dsName, query, "verifyUUIDFunctions");
dataSources.RunQueryNVerifyResponseViews(1);
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertQueryResponseHeaders(["affectedRows"]);
dataSources.ReadQueryTableResponse(0).then(($cellData) => {
expect($cellData).to.eq("0");
Expand Down Expand Up @@ -297,7 +297,7 @@ describe(
//Validating Addition of new column taking default value form package method
query = `ALTER TABLE uuidtype ADD COLUMN newUUID uuid DEFAULT uuid_generate_v4();`;
dataSources.EnterQuery(query);
dataSources.RunQueryNVerifyResponseViews(1);
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertQueryResponseHeaders(["affectedRows"]);
dataSources.ReadQueryTableResponse(0).then(($cellData) => {
expect($cellData).to.eq("0");
Expand All @@ -314,7 +314,7 @@ describe(
//Validating altering the new column default value to generate id from pgcrypto package
query = `ALTER TABLE uuidtype ALTER COLUMN newUUID SET DEFAULT gen_random_uuid();`;
dataSources.EnterQuery(query);
dataSources.RunQueryNVerifyResponseViews(1);
dataSources.runQueryAndVerifyResponseViews();
dataSources.AssertQueryResponseHeaders(["affectedRows"]);
dataSources.ReadQueryTableResponse(0).then(($cellData) => {
expect($cellData).to.eq("0");
Expand Down
Loading
Loading