Skip to content

Commit

Permalink
Merge pull request #38322 from appsmithorg/release
Browse files Browse the repository at this point in the history
23/12 Daily Promotion
  • Loading branch information
btsgh authored Dec 23, 2024
2 parents b4b40d4 + 8a16903 commit f4fcc8a
Show file tree
Hide file tree
Showing 246 changed files with 3,796 additions and 1,572 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-limited-with-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:

# Get specs to run
- name: Get specs to run
if: ${{ (inputs.specs_to_run == '' || inputs.specs_to_run == null) && steps.run_result.outputs.run_result != 'success' && steps.run_result.outputs.run_result != 'failedtest' }}
if: ${{ (inputs.specs_to_run == '' || inputs.specs_to_run == null || !inputs.specs_to_run) && steps.run_result.outputs.run_result != 'success' && steps.run_result.outputs.run_result != 'failedtest' }}
run: |
specs_to_run=""
while IFS= read -r line
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for App Theming`,
{ tags: ["@tag.Anvil"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Button Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Checkbox Group Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Checkbox Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Heading Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Icon Button Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Inline Button Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Paragraph Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Radio Group Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Stats Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Switch Group Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Switch Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

// TODO: Enable when issue(github.com/appsmithorg/appsmith/issues/36419) is solved.
describe.skip(
describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Toolbar Button Widget`,
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ describe("Autocomplete tests", { tags: ["@tag.JS", "@tag.Binding"] }, () => {
)
.type(".");

agHelper.GetNAssertElementText(locators._hints, "geolocation");
agHelper.GetNAssertElementText(locators._hints, "appName");
});
});

Expand All @@ -313,6 +313,6 @@ describe("Autocomplete tests", { tags: ["@tag.JS", "@tag.Binding"] }, () => {
.type("{downArrow}{leftArrow}{leftArrow}");

agHelper.TypeText(locators._codeMirrorTextArea, ".");
agHelper.GetNAssertElementText(locators._hints, "geolocation");
agHelper.GetNAssertElementText(locators._hints, "appName");
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
import {
agHelper,
dataSources,
locators,
jsEditor,
} from "../../../../support/Objects/ObjectsCore";
import PageList from "../../../../support/Pages/PageList";
import EditorNavigation, {
editorTabSelector,
PageLeftPane,
PagePaneSegment,
} from "../../../../support/Pages/EditorNavigation";

let dsName = "MongoDB";

describe("Tabs Navigation", { tags: ["@tag.IDE"] }, () => {
before(() => {
dataSources.CreateDataSource("Mongo");
cy.renameDatasource(dsName);
});

it("should create and switch between JS files", () => {
// Create first JS file
jsEditor.CreateJSObject("", { prettify: false, toRun: false });
jsEditor.RenameJSObjFromPane("Page1_JS1");

// Create second JS file
jsEditor.CreateJSObject("", { prettify: false, toRun: false });
jsEditor.RenameJSObjFromPane("Page1_JS2");

agHelper.GetNClick(editorTabSelector("page1_js1"));

jsEditor.currentJSObjectName().then((jsObjName) => {
expect(jsObjName).equal("Page1_JS1");
});

agHelper.GetNClick(editorTabSelector("page1_js2"));

jsEditor.currentJSObjectName().then((jsObjName) => {
expect(jsObjName).equal("Page1_JS2");
});
});

it("should create and switch between queries", () => {
dataSources.CreateQueryFromOverlay(dsName, "", "Page1_Query1");
agHelper
.GetElement("[data-testid='t--ide-tab-page1_query1']")
.should("be.visible");
dataSources.CreateQueryFromOverlay(dsName, "", "Page1_Query2");

// Switch between tabs
agHelper.GetNClick(editorTabSelector("page1_query1"));

agHelper
.GetElement(locators._queryName)
.should("have.text", "Page1_Query1");

agHelper.GetNClick(editorTabSelector("page1_query2"));

agHelper
.GetElement(locators._queryName)
.should("have.text", "Page1_Query2");
});

it("should create items in the next page and navigate", () => {
// Create first page
PageList.AddNewPage("New blank page");

// Create first JS file
jsEditor.CreateJSObject("", { prettify: false, toRun: false });
jsEditor.RenameJSObjFromPane("Page2_JS1");

// Create second JS file
jsEditor.CreateJSObject("", { prettify: false, toRun: false });
jsEditor.RenameJSObjFromPane("Page2_JS2");

agHelper.GetNClick(editorTabSelector("page2_js1"));

jsEditor.currentJSObjectName().then((jsObjName) => {
expect(jsObjName).equal("Page2_JS1");
});

agHelper.GetNClick(editorTabSelector("page2_js2"));

jsEditor.currentJSObjectName().then((jsObjName) => {
expect(jsObjName).equal("Page2_JS2");
});

dataSources.CreateQueryFromOverlay(dsName, "", "Page2_Query1");
dataSources.CreateQueryFromOverlay(dsName, "", "Page2_Query2");

agHelper.GetNClick(editorTabSelector("page2_query1"));

agHelper
.GetElement(locators._queryName)
.should("have.text", "Page2_Query1");

agHelper.GetNClick(editorTabSelector("page2_query2"));

agHelper
.GetElement(locators._queryName)
.should("have.text", "Page2_Query2");
});

it("Use tabs navigation with multiple pages", () => {
EditorNavigation.NavigateToPage("Page1");
agHelper.GetNClick(editorTabSelector("page1_query1"));

agHelper
.GetElement(locators._queryName)
.should("have.text", "Page1_Query1");

agHelper.GetNClick(editorTabSelector("page1_query2"));

agHelper
.GetElement(locators._queryName)
.should("have.text", "Page1_Query2");

PageLeftPane.switchSegment(PagePaneSegment.JS);

agHelper.GetNClick(editorTabSelector("page1_js1"));

jsEditor.currentJSObjectName().then((jsObjName) => {
expect(jsObjName).equal("Page1_JS1");
});

agHelper.GetNClick(editorTabSelector("page1_js2"));

jsEditor.currentJSObjectName().then((jsObjName) => {
expect(jsObjName).equal("Page1_JS2");
});

EditorNavigation.NavigateToPage("Page2");
PageLeftPane.switchSegment(PagePaneSegment.JS);
agHelper.GetNClick(editorTabSelector("page2_js1"));

jsEditor.currentJSObjectName().then((jsObjName) => {
expect(jsObjName).equal("Page2_JS1");
});

agHelper.GetNClick(editorTabSelector("page2_js2"));

jsEditor.currentJSObjectName().then((jsObjName) => {
expect(jsObjName).equal("Page2_JS2");
});
});
});
2 changes: 1 addition & 1 deletion app/client/cypress/locators/QueryEditor.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"addDatasource": ".t--add-datasource",
"editDatasourceButton": ".t--edit-datasource",
"switch": ".t--form-control-SWITCH input",
"queryResponse": "(//div[@class='table']//div[@class='tr'])[3]//div[@class='td']",
"queryResponse": "(//div[@class='table']//div[@class='tr'])[3]//div[@class='td mp-mask']",
"querySelect": "//div[contains(@class, 't--template-menu')]//div[text()='Select']",
"queryCreate": "//div[contains(@class, 't--template-menu')]//div[text()='Create']",
"queryUpdate": "//div[contains(@class, 't--template-menu')]//div[text()='Update']",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/client/cypress/support/Pages/DataSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class DataSources {
option +
"']";
_queryTableResponse =
"//div[@data-guided-tour-id='query-table-response']//div[@class='tbody']//div[@class ='td']";
"//div[@data-guided-tour-id='query-table-response']//div[@class='tbody']//div[@class ='td mp-mask']";
_queryResponseHeader = (header: string) =>
"//div[@data-guided-tour-id='query-table-response']//div[@class='table']//div[@role ='columnheader']//span[text()='" +
header +
Expand Down
3 changes: 3 additions & 0 deletions app/client/cypress/support/Pages/EditorNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export enum PagePaneSegment {
JS = "JS",
}

export const editorTabSelector = (name: string) =>
`[data-testid='t--ide-tab-${name.toLowerCase()}']`;

export enum EditorViewMode {
FullScreen = "FullScreen",
SplitScreen = "SplitScreen",
Expand Down
4 changes: 2 additions & 2 deletions app/client/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ Cypress.Commands.add("ValidatePaginateResponseUrlData", (runTestCss) => {
cy.wait(2000);
cy.get(runTestCss).click();
cy.wait(2000);
cy.xpath("//div[@class='tr'][1]//div[@class='td'][6]//span")
cy.xpath("//div[@class='tr'][1]//div[@class='td mp-mask'][6]//span")
.invoke("text")
.then((valueToTest) => {
// eslint-disable-next-line cypress/no-unnecessary-waiting
Expand All @@ -839,7 +839,7 @@ Cypress.Commands.add("ValidatePaginateResponseUrlDataV2", (runTestCss) => {
cy.wait(2000);
cy.get(runTestCss).click();
cy.wait(2000);
cy.xpath("//div[@class='tr'][1]//div[@class='td'][6]//span")
cy.xpath("//div[@class='tr'][1]//div[@class='td mp-mask'][6]//span")
.invoke("text")
.then((valueToTest) => {
// eslint-disable-next-line cypress/no-unnecessary-waiting
Expand Down
Loading

0 comments on commit f4fcc8a

Please sign in to comment.