hunk.code_window:             AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.INTERNAL_ERROR),
       PLUGIN_LOAD_TEMPLATES_FAIL(500, 5005, "Unable to load datasource templates. Details: {0}.",
               AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.INTERNAL_ERROR),
       GIT_ACTION_FAILED(500, 5006, "git {0} failed. \nDetails: {1}", AppsmithErrorAction.DEFAULT, null, ErrorType.GIT_ACTION_EXECUTION_ERROR),
       IO_ERROR(503, 5003, "IO action failed with error {0}", AppsmithErrorAction.DEFAULT, null, ErrorType.INTERNAL_ERROR),
       MARKETPLACE_TIMEOUT(504, 5041, "Marketplace is responding too slowly. Please try again later",
               AppsmithErrorAction.DEFAULT, null, ErrorType.CONNECTIVITY_ERROR),
       DATASOURCE_HAS_ACTIONS(409, 4030, "Cannot delete datasource since it has {0} action(s) using it.",
               AppsmithErrorAction.DEFAULT, null, ErrorType.BAD_REQUEST),
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.file_path: app/server/appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithError.java
hunk.type: replace
file: const dsl = require("../../../../fixtures/PageLoadDsl.json");
  const commonlocators = require("../../../../locators/commonlocators.json");
  const pages = require("../../../../locators/Pages.json");
  const publish = require("../../../../locators/publishWidgetspage.json");
  const explorerLocators = require("../../../../locators/explorerlocators.json");
  
  describe("Page Load tests", () => {
    before(() => {
      cy.addDsl(dsl);
      cy.get(explorerLocators.AddPage)
        .first()
        .click();
  
      cy.skipGenerateCRUDPage();
  
      cy.get("h2").contains("Drag and drop a widget here");
    });
    it("Published page loads correctly", () => {
      //add page within page
      cy.addDsl(dsl);
      // Update the text to be asserted later
      cy.openPropertyPane("textwidget");
      cy.testCodeMirror("This is Page 2");
      // Publish
      cy.PublishtheApp();
      // Assert active page tab
      cy.get(".t--page-switch-tab")
        .contains("Page2")
        .parent()
        .parent()
        .parent()
        .should("have.class", "is-active");
      // Assert active page DSL
      cy.get(commonlocators.headingTextStyle).should(
        "have.text",
        "This is Page 2",
      );
      // Test after reload
      cy.reload();
      // Assert active page tab
      cy.get(".t--page-switch-tab")
        .contains("Page2")
        .parent()
        .parent()
        .parent()
        .should("have.class", "is-active");
      // Assert active page DSL
      cy.get(commonlocators.headingTextStyle).should(
        "have.text",
        "This is Page 2",
      );
      // Switch page
      cy.get(".t--page-switch-tab")
        .contains("Page1")
        .click({ force: true });
      // Assert active page tab
      cy.get(".t--page-switch-tab")
        .contains("Page1")
        .parent()
        .parent()
        .parent()
        .should("have.class", "is-active");
      // Assert active page DSL
      cy.get(commonlocators.headingTextStyle).should(
        "have.text",
        "This is Page 1",
      );
    });
    it("Hide Page and validate published app", () => {
      cy.get(publish.backToEditor).click();
      cy.GlobalSearchEntity("Page1");
      cy.xpath(pages.popover)
        .last()
        .click({ force: true });
      cy.get(pages.hidePage).click({ force: true });
      cy.ClearSearch();
      cy.PublishtheApp();
      // Assert active page DSL
      cy.get(commonlocators.headingTextStyle).should(
        "have.text",
        "This is Page 1",
      );
      cy.get(publish.backToEditor).click();
      cy.SearchEntityandOpen("Page2");
      cy.PublishtheApp();
      // Assert active page DSL
      cy.get(commonlocators.headingTextStyle).should(
        "have.text",
        "This is Page 2",
      );
    });
  });
  