Merge branch 'fix/Create_Application' into 'release'
Fix/create application See merge request theappsmith/internal-tools-client!544
This commit is contained in:
commit
3ceedcc6eb
|
|
@ -33,6 +33,6 @@ describe("Button Widget Functionality", function() {
|
|||
|
||||
afterEach(() => {
|
||||
//clean up
|
||||
cy.DeleteModal();
|
||||
// cy.DeleteModal();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
{
|
||||
"CreateApp":"span[class='bp3-button-text']",
|
||||
"searchInput": "input[type='text']",
|
||||
"appEditIcon": ".t--application-edit-link",
|
||||
"publishButton":".t--application-publish-btn",
|
||||
"publishCrossButton":"span[icon='small-cross']",
|
||||
"homePageID":"//div[@id='root']"
|
||||
"homePageID":"//div[@id='root']",
|
||||
"appMoreIcon":".bp3-popover-wrapper.more .bp3-popover-target",
|
||||
"deleteButton":".bp3-menu-item.bp3-popover-dismiss"
|
||||
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
"editIcon":".t--widget-propertypane-toggle",
|
||||
"editPropCrossButton":".t--property-pane-close-btn",
|
||||
"deleteWidgetIcon":".t--widget-delete-control",
|
||||
"dropdownSelectButton":".t--open-dropdown-Select-Action"
|
||||
|
||||
|
||||
"dropdownSelectButton":".t--open-dropdown-Select-Action",
|
||||
"homeIcon":".bp3-icon.bp3-icon-home"
|
||||
}
|
||||
|
|
@ -5,6 +5,29 @@ const commonlocators = require("../locators/commonlocators.json");
|
|||
const modalWidgetPage = require("../locators/ModalWidget.json");
|
||||
const widgetsPage = require("../locators/Widgets.json");
|
||||
|
||||
Cypress.Commands.add("CreateApp", appname => {
|
||||
cy.get(homePage.CreateApp)
|
||||
.contains("Create Application")
|
||||
.click({ force: true });
|
||||
cy.get("form input").type(appname);
|
||||
cy.get(homePage.CreateApp)
|
||||
.contains("Submit")
|
||||
.click({ force: true });
|
||||
// cy.wait(2000);
|
||||
cy.get("#loading").should("not.exist");
|
||||
});
|
||||
|
||||
Cypress.Commands.add("DeleteApp", appName => {
|
||||
cy.get(commonlocators.homeIcon).click({ force: true });
|
||||
cy.get(homePage.searchInput).type(appName);
|
||||
//cy.wait(2000);
|
||||
cy.get("#loading").should("not.exist");
|
||||
cy.get(homePage.appMoreIcon)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(homePage.deleteButton).click({ force: true });
|
||||
});
|
||||
|
||||
Cypress.Commands.add("LogintoApp", (uname, pword) => {
|
||||
cy.visit("/user/login");
|
||||
cy.get(loginPage.username).should("be.visible");
|
||||
|
|
@ -84,7 +107,7 @@ Cypress.Commands.add("CreateModal", () => {
|
|||
.find(".bp3-button > .bp3-button-text")
|
||||
.should("have.text", "Alert Modal");
|
||||
cy.get(commonlocators.editPropCrossButton).click();
|
||||
cy.PublishtheApp();
|
||||
cy.reload();
|
||||
});
|
||||
|
||||
Cypress.Commands.add("PublishtheApp", () => {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ require("cypress-xpath");
|
|||
const loginData = require("../fixtures/user.json");
|
||||
const inputData = require("../fixtures/inputdata.json");
|
||||
let pageid;
|
||||
let appId;
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import "./commands";
|
||||
|
|
@ -37,8 +38,10 @@ before(function() {
|
|||
cy.route("PUT", "/api/v1/layouts/*/pages/*").as("updateLayout");
|
||||
|
||||
cy.LogintoApp(loginData.username, loginData.password);
|
||||
cy.SearchApp(inputData.appname);
|
||||
|
||||
cy.generateUUID().then(id => {
|
||||
appId = id;
|
||||
cy.CreateApp(id);
|
||||
});
|
||||
cy.generateUUID().then(uid => {
|
||||
pageid = uid;
|
||||
cy.Createpage(pageid);
|
||||
|
|
@ -50,7 +53,11 @@ before(function() {
|
|||
});
|
||||
|
||||
after(function() {
|
||||
cy.Deletepage(pageid);
|
||||
// cy.PublishtheApp();
|
||||
|
||||
// ---commenting Publish app and Delete page as of now--- //
|
||||
//cy.Deletepage(pageid);
|
||||
//cy.PublishtheApp();
|
||||
cy.DeleteApp(appId);
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user