chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description
This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.
As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes
This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)
### Why is this needed?
This PR is needed because, for the Lodash optimization from
7cbb12af88,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.
However, just using `import type` in the current codebase will give you
this:
<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">
That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.
### Why enforce `import type`?
Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)
I’m doing this because I believe `import type` improves DX and makes
refactorings easier.
Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)
```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
It’s pretty hard, right?
What about now?
```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
Now, it’s clear that only `lodash` will be bundled.
This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.
This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.
## Type of change
- Chore (housekeeping or task changes that don't impact user perception)
## How Has This Been Tested?
This was tested to not break the build.
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
This commit is contained in:
parent
e3c8ca2d5c
commit
424d2f6965
|
|
@ -6,7 +6,6 @@
|
|||
"extends": [
|
||||
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier/@typescript-eslint",
|
||||
"plugin:cypress/recommended",
|
||||
// Note: Please keep this as the last config to make sure that this (and by extension our .prettierrc file) overrides all configuration above it
|
||||
// https://www.npmjs.com/package/eslint-plugin-prettier#recommended-configuration
|
||||
|
|
@ -21,6 +20,8 @@
|
|||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
// enforce `import type` for all type-only imports so the bundler knows to erase them
|
||||
"@typescript-eslint/consistent-type-imports": "error",
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"@typescript-eslint/no-use-before-define": 0,
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,5 @@
|
|||
"semi": true,
|
||||
"singleQuote": false,
|
||||
"trailingComma": "all",
|
||||
"parser": "typescript",
|
||||
"arrowParens": "always"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ let homePage = ObjectsRegistry.HomePage,
|
|||
deployMode = ObjectsRegistry.DeployMode,
|
||||
propPane = ObjectsRegistry.PropertyPane;
|
||||
|
||||
describe("AForce - Community Issues page validations", function() {
|
||||
before(function() {
|
||||
describe("AForce - Community Issues page validations", function () {
|
||||
before(function () {
|
||||
agHelper.ClearLocalStorageCache();
|
||||
});
|
||||
|
||||
|
|
@ -66,8 +66,9 @@ describe("AForce - Community Issues page validations", function() {
|
|||
ee.SelectEntityByName("Table1", "Widgets");
|
||||
agHelper.AssertExistingToggleState("serversidepagination", "checked");
|
||||
|
||||
propPane.ValidatePropertyFieldValue("Default Selected Row", "0")
|
||||
.then(($selectedRow: any) => {
|
||||
propPane
|
||||
.ValidatePropertyFieldValue("Default Selected Row", "0")
|
||||
.then(($selectedRow: any) => {
|
||||
selectedRow = Number($selectedRow);
|
||||
table.AssertSelectedRow(selectedRow);
|
||||
});
|
||||
|
|
@ -237,20 +238,18 @@ describe("AForce - Community Issues page validations", function() {
|
|||
});
|
||||
}
|
||||
cy.wrap(filterTitle).as("filterTitleText"); // alias it for later
|
||||
cy.get("@filterTitleText")
|
||||
.its("length")
|
||||
.should("eq", 2);
|
||||
cy.get("@filterTitleText").its("length").should("eq", 2);
|
||||
|
||||
table.RemoveFilterNVerify("Question", true, false);
|
||||
|
||||
//Two filters - AND
|
||||
table.OpenNFilterTable("Votes", "greater than", "2");
|
||||
table.ReadTableRowColumnData(0, 1,"v1", 3000).then(($cellData) => {
|
||||
table.ReadTableRowColumnData(0, 1, "v1", 3000).then(($cellData) => {
|
||||
expect($cellData).to.eq("Combine queries from different datasources");
|
||||
});
|
||||
|
||||
table.OpenNFilterTable("Title", "contains", "button", "AND", 1);
|
||||
table.ReadTableRowColumnData(0, 1,"v1", 3000).then(($cellData) => {
|
||||
table.ReadTableRowColumnData(0, 1, "v1", 3000).then(($cellData) => {
|
||||
expect($cellData).to.eq(
|
||||
"Change the video in the video player with a button click",
|
||||
);
|
||||
|
|
@ -262,9 +261,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
// agHelper.DeployApp()
|
||||
// table.WaitUntilTableLoad()
|
||||
|
||||
cy.get(table._addIcon)
|
||||
.closest("div")
|
||||
.click();
|
||||
cy.get(table._addIcon).closest("div").click();
|
||||
agHelper.AssertElementVisible(locator._modal);
|
||||
agHelper.SelectFromDropDown("Suggestion", "t--modal-widget");
|
||||
|
||||
|
|
@ -297,7 +294,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
table.SearchTable("Suggestion", 2);
|
||||
table.WaitUntilTableLoad();
|
||||
|
||||
table.ReadTableRowColumnData(0, 0,"v1", 4000).then((cellData) => {
|
||||
table.ReadTableRowColumnData(0, 0, "v1", 4000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("Suggestion");
|
||||
});
|
||||
|
||||
|
|
@ -358,7 +355,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
);
|
||||
agHelper.ClickButton("Save");
|
||||
agHelper.Sleep(2000);
|
||||
table.ReadTableRowColumnData(0, 0,"v1",2000).then((cellData) => {
|
||||
table.ReadTableRowColumnData(0, 0, "v1", 2000).then((cellData) => {
|
||||
expect(cellData).to.be.equal("Troubleshooting");
|
||||
});
|
||||
|
||||
|
|
@ -376,9 +373,7 @@ describe("AForce - Community Issues page validations", function() {
|
|||
table.SelectTableRow(0);
|
||||
agHelper.AssertElementVisible(locator._widgetInDeployed("tabswidget"));
|
||||
agHelper.Sleep();
|
||||
cy.get(table._trashIcon)
|
||||
.closest("div")
|
||||
.click({ force: true });
|
||||
cy.get(table._trashIcon).closest("div").click({ force: true });
|
||||
agHelper.WaitUntilEleDisappear(locator._widgetInDeployed("tabswidget"));
|
||||
agHelper.AssertElementAbsence(locator._widgetInDeployed("tabswidget"));
|
||||
table.WaitForTableEmpty();
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ const widgetName = "currencyinputwidget";
|
|||
const wiggetClass = `.t--widget-${widgetName}`;
|
||||
const widgetInput = `${wiggetClass} input`;
|
||||
|
||||
describe("Currency Input Issue", function() {
|
||||
it("1. Import application json &should check that the widget input is not showing any error", function() {
|
||||
describe("Currency Input Issue", function () {
|
||||
it("1. Import application json &should check that the widget input is not showing any error", function () {
|
||||
cy.visit("/applications");
|
||||
homePage.ImportApp("CurrencyInputIssueExport.json");
|
||||
cy.wait("@importNewApplication").then((interception) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import appPage from "../../../locators/CMSApplocators";
|
||||
import * as _ from "../../../support/Objects/ObjectsCore";
|
||||
|
||||
describe("Content Management System App", function() {
|
||||
describe("Content Management System App", function () {
|
||||
before(() => {
|
||||
_.homePage.NavigateToHome();
|
||||
_.agHelper.GenerateUUID();
|
||||
|
|
@ -15,7 +15,7 @@ describe("Content Management System App", function() {
|
|||
});
|
||||
|
||||
let repoName;
|
||||
it("1.Create Get echo Api call", function() {
|
||||
it("1.Create Get echo Api call", function () {
|
||||
cy.fixture("datasources").then((datasourceFormData) => {
|
||||
_.apiPage.CreateAndFillApi(datasourceFormData["echoApiUrl"], "get_data");
|
||||
// creating get request using echo
|
||||
|
|
@ -29,7 +29,7 @@ describe("Content Management System App", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("2. Create Post echo Api call", function() {
|
||||
it("2. Create Post echo Api call", function () {
|
||||
cy.fixture("datasources").then((datasourceFormData) => {
|
||||
_.apiPage.CreateAndFillApi(
|
||||
datasourceFormData["echoApiUrl"],
|
||||
|
|
@ -48,7 +48,7 @@ describe("Content Management System App", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("3. Create Delete echo Api call", function() {
|
||||
it("3. Create Delete echo Api call", function () {
|
||||
cy.fixture("datasources").then((datasourceFormData) => {
|
||||
_.apiPage.CreateAndFillApi(
|
||||
datasourceFormData["echoApiUrl"],
|
||||
|
|
@ -67,14 +67,12 @@ describe("Content Management System App", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("4. Send mail and verify post request body", function() {
|
||||
it("4. Send mail and verify post request body", function () {
|
||||
// navigating to canvas
|
||||
cy.xpath(appPage.pagebutton).click();
|
||||
cy.get(appPage.submitButton).should("be.visible");
|
||||
cy.xpath("//span[text()='3']").click({ force: true });
|
||||
cy.get(appPage.mailButton)
|
||||
.closest("div")
|
||||
.click();
|
||||
cy.get(appPage.mailButton).closest("div").click();
|
||||
// verifying the mail to send and asserting post call's response
|
||||
cy.xpath(appPage.sendMailText).should("be.visible");
|
||||
cy.xpath("//input[@value='Curt50@gmail.com']").should("be.visible");
|
||||
|
|
@ -83,12 +81,8 @@ describe("Content Management System App", function() {
|
|||
.last()
|
||||
.find("textarea")
|
||||
.type("Task completed", { force: true });
|
||||
cy.get(appPage.confirmButton)
|
||||
.closest("div")
|
||||
.click({ force: true });
|
||||
cy.get(appPage.closeButton)
|
||||
.closest("div")
|
||||
.click({ force: true });
|
||||
cy.get(appPage.confirmButton).closest("div").click({ force: true });
|
||||
cy.get(appPage.closeButton).closest("div").click({ force: true });
|
||||
cy.xpath(appPage.pagebutton).click({ force: true });
|
||||
//cy.xpath(appPage.datasourcesbutton).click({ force: true });
|
||||
cy.CheckAndUnfoldEntityItem("Queries/JS");
|
||||
|
|
@ -98,19 +92,15 @@ describe("Content Management System App", function() {
|
|||
cy.ResponseCheck("Curt50@gmail.com");
|
||||
});
|
||||
|
||||
it("5. Delete proposal and verify delete request body", function() {
|
||||
it("5. Delete proposal and verify delete request body", function () {
|
||||
// navigating back to canvas
|
||||
cy.xpath(appPage.pagebutton).click({ force: true });
|
||||
cy.get(appPage.submitButton)
|
||||
.closest("div")
|
||||
.should("be.visible");
|
||||
cy.get(appPage.submitButton).closest("div").should("be.visible");
|
||||
cy.xpath("//span[text()='Dan.Wyman@hotmail.com']").click({ force: true });
|
||||
// deleting the proposal and asserting delete call's response
|
||||
cy.xpath(appPage.deleteButton).click({ force: true });
|
||||
cy.xpath(appPage.deleteTaskText).should("be.visible");
|
||||
cy.get(appPage.confirmButton)
|
||||
.closest("div")
|
||||
.click({ force: true });
|
||||
cy.get(appPage.confirmButton).closest("div").click({ force: true });
|
||||
cy.xpath(appPage.pagebutton).click({ force: true });
|
||||
//cy.xpath(appPage.datasourcesbutton).click({ force: true });
|
||||
cy.xpath(appPage.deleteApi).click({ force: true });
|
||||
|
|
@ -131,21 +121,15 @@ describe("Content Management System App", function() {
|
|||
cy.xpath("//span[text()='Curt50@gmail.com']")
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
cy.get(appPage.mailButton)
|
||||
.closest("div")
|
||||
.click();
|
||||
cy.get(appPage.mailButton).closest("div").click();
|
||||
cy.xpath(appPage.sendMailText).should("be.visible");
|
||||
cy.xpath(appPage.subjectField).type("Test");
|
||||
cy.get(appPage.contentField)
|
||||
.last()
|
||||
.find("textarea")
|
||||
.type("Task completed", { force: true });
|
||||
cy.get(appPage.confirmButton)
|
||||
.closest("div")
|
||||
.click({ force: true });
|
||||
cy.get(appPage.closeButton)
|
||||
.closest("div")
|
||||
.click({ force: true });
|
||||
cy.get(appPage.confirmButton).closest("div").click({ force: true });
|
||||
cy.get(appPage.closeButton).closest("div").click({ force: true });
|
||||
_.deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
const homePage = require("../../../locators/HomePage");
|
||||
const reconnectDatasourceModal = require("../../../locators/ReconnectLocators");
|
||||
|
||||
describe("Import, Export and Fork application and validate data binding", function() {
|
||||
describe("Import, Export and Fork application and validate data binding", function () {
|
||||
let workspaceId;
|
||||
let newWorkspaceName;
|
||||
let appName;
|
||||
it("1. Import application from json and validate data on pageload", function() {
|
||||
it("1. Import application from json and validate data on pageload", function () {
|
||||
// import application
|
||||
cy.get(homePage.homeIcon).click();
|
||||
cy.get(homePage.optionsIcon)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(homePage.optionsIcon).first().click();
|
||||
cy.get(homePage.workspaceImportAppOption).click({ force: true });
|
||||
cy.get(homePage.workspaceImportAppModal).should("be.visible");
|
||||
cy.xpath(homePage.uploadLogo).attachFile("forkedApp.json");
|
||||
|
|
@ -38,9 +36,7 @@ describe("Import, Export and Fork application and validate data binding", functi
|
|||
force: true,
|
||||
});
|
||||
cy.wait(2000);
|
||||
cy.get(homePage.applicationName)
|
||||
.clear()
|
||||
.type(appName);
|
||||
cy.get(homePage.applicationName).clear().type(appName);
|
||||
cy.get("body").click(0, 0);
|
||||
cy.wait("@updateApplication").should(
|
||||
"have.nested.property",
|
||||
|
|
@ -59,17 +55,13 @@ describe("Import, Export and Fork application and validate data binding", functi
|
|||
});
|
||||
});
|
||||
|
||||
it("2. Fork application and validate data binding for the widgets", function() {
|
||||
it("2. Fork application and validate data binding for the widgets", function () {
|
||||
// fork application
|
||||
cy.get(homePage.homeIcon).click();
|
||||
cy.get(homePage.searchInput).type(`${appName}`);
|
||||
cy.wait(3000);
|
||||
cy.get(homePage.applicationCard)
|
||||
.first()
|
||||
.trigger("mouseover");
|
||||
cy.get(homePage.appMoreIcon)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(homePage.applicationCard).first().trigger("mouseover");
|
||||
cy.get(homePage.appMoreIcon).first().click({ force: true });
|
||||
cy.get(homePage.forkAppFromMenu).click({ force: true });
|
||||
cy.get(homePage.forkAppWorkspaceButton).click({ force: true });
|
||||
cy.wait(4000);
|
||||
|
|
@ -81,18 +73,12 @@ describe("Import, Export and Fork application and validate data binding", functi
|
|||
cy.xpath("//span[text()='due']").should("be.visible");
|
||||
});
|
||||
|
||||
it("3. Export and import application and validate data binding for the widgets", function() {
|
||||
it("3. Export and import application and validate data binding for the widgets", function () {
|
||||
cy.NavigateToHome();
|
||||
cy.get(homePage.searchInput)
|
||||
.clear()
|
||||
.type(`${appName}`);
|
||||
cy.get(homePage.searchInput).clear().type(`${appName}`);
|
||||
cy.wait(2000);
|
||||
cy.get(homePage.applicationCard)
|
||||
.first()
|
||||
.trigger("mouseover");
|
||||
cy.get(homePage.appMoreIcon)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(homePage.applicationCard).first().trigger("mouseover");
|
||||
cy.get(homePage.appMoreIcon).first().click({ force: true });
|
||||
// export application
|
||||
cy.get(homePage.exportAppFromMenu).click({ force: true });
|
||||
cy.get(homePage.searchInput).clear();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const formControls = require("../../../locators/FormControl.json");
|
|||
import * as _ from "../../../support/Objects/ObjectsCore";
|
||||
|
||||
let repoName;
|
||||
describe("Shopping cart App", function() {
|
||||
describe("Shopping cart App", function () {
|
||||
let datasourceName;
|
||||
|
||||
before(() => {
|
||||
|
|
@ -21,7 +21,7 @@ describe("Shopping cart App", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("1. Create MongoDB datasource and add Insert, Find, Update and Delete queries", function() {
|
||||
it("1. Create MongoDB datasource and add Insert, Find, Update and Delete queries", function () {
|
||||
cy.NavigateToDatasourceEditor();
|
||||
cy.get(datasource.MongoDB).click();
|
||||
cy.fillMongoDatasourceForm();
|
||||
|
|
@ -32,19 +32,13 @@ describe("Shopping cart App", function() {
|
|||
cy.NavigateToQueryEditor();
|
||||
cy.NavigateToActiveTab();
|
||||
// GetProduct query to fetch all products
|
||||
cy.get(queryLocators.createQuery)
|
||||
.last()
|
||||
.click();
|
||||
cy.get(queryLocators.createQuery).last().click();
|
||||
cy.get(queryLocators.queryNameField).type("GetProduct");
|
||||
cy.get(".CodeEditorTarget")
|
||||
.first()
|
||||
.type("Productnames");
|
||||
cy.get(".CodeEditorTarget").first().type("Productnames");
|
||||
cy.assertPageSave();
|
||||
cy.get(appPage.dropdownChevronLeft).click();
|
||||
// EditProducts query to update the cart
|
||||
cy.get(queryLocators.createQuery)
|
||||
.last()
|
||||
.click();
|
||||
cy.get(queryLocators.createQuery).last().click();
|
||||
cy.get(queryLocators.queryNameField).type("EditProducts");
|
||||
|
||||
// Clicking outside to trigger the save
|
||||
|
|
@ -53,9 +47,7 @@ describe("Shopping cart App", function() {
|
|||
formControls.commandDropdown,
|
||||
"Update Document(s)",
|
||||
);
|
||||
cy.get(".CodeEditorTarget")
|
||||
.first()
|
||||
.type("Productnames");
|
||||
cy.get(".CodeEditorTarget").first().type("Productnames");
|
||||
cy.get(".CodeEditorTarget")
|
||||
.eq(1)
|
||||
.type('{"title": "{{Table1.selectedRow.title}}"}', {
|
||||
|
|
@ -75,9 +67,7 @@ describe("Shopping cart App", function() {
|
|||
cy.assertPageSave();
|
||||
cy.get(appPage.dropdownChevronLeft).click();
|
||||
// Add product query
|
||||
cy.get(queryLocators.createQuery)
|
||||
.last()
|
||||
.click();
|
||||
cy.get(queryLocators.createQuery).last().click();
|
||||
cy.wait(5000);
|
||||
cy.get(queryLocators.queryNameField).type("AddProduct");
|
||||
// Clicking outside to trigger the save
|
||||
|
|
@ -107,9 +97,7 @@ describe("Shopping cart App", function() {
|
|||
cy.assertPageSave();
|
||||
cy.get(appPage.dropdownChevronLeft).click();
|
||||
// delete product
|
||||
cy.get(queryLocators.createQuery)
|
||||
.last()
|
||||
.click();
|
||||
cy.get(queryLocators.createQuery).last().click();
|
||||
cy.wait(5000);
|
||||
cy.get(queryLocators.queryNameField).type("DeleteProduct");
|
||||
// Clicking outside to trigger the save
|
||||
|
|
@ -136,44 +124,27 @@ describe("Shopping cart App", function() {
|
|||
cy.get(appPage.dropdownChevronLeft).click();
|
||||
});
|
||||
|
||||
it("2. Perform CRUD operations and validate data", function() {
|
||||
it("2. Perform CRUD operations and validate data", function () {
|
||||
// Adding the books to the Add cart form
|
||||
cy.xpath(appPage.bookname).type("Atomic habits");
|
||||
cy.xpath(appPage.bookgenre).type("Self help");
|
||||
cy.xpath(appPage.bookprice).type(200);
|
||||
cy.xpath(appPage.bookquantity).type(2);
|
||||
cy.get("span:contains('Submit')")
|
||||
.closest("div")
|
||||
.eq(1)
|
||||
.click();
|
||||
cy.get("span:contains('Submit')").closest("div").eq(1).click();
|
||||
cy.assertPageSave();
|
||||
cy.wait(8000);
|
||||
cy.xpath(appPage.bookname)
|
||||
.click()
|
||||
.type("A man called ove");
|
||||
cy.xpath(appPage.bookgenre)
|
||||
.click()
|
||||
.type("Fiction");
|
||||
cy.xpath(appPage.bookprice)
|
||||
.click()
|
||||
.type(100);
|
||||
cy.xpath(appPage.bookquantity)
|
||||
.click()
|
||||
.type(1);
|
||||
cy.get("span:contains('Submit')")
|
||||
.closest("div")
|
||||
.eq(1)
|
||||
.click();
|
||||
cy.xpath(appPage.bookname).click().type("A man called ove");
|
||||
cy.xpath(appPage.bookgenre).click().type("Fiction");
|
||||
cy.xpath(appPage.bookprice).click().type(100);
|
||||
cy.xpath(appPage.bookquantity).click().type(1);
|
||||
cy.get("span:contains('Submit')").closest("div").eq(1).click();
|
||||
cy.assertPageSave();
|
||||
cy.wait("@postExecute");
|
||||
// Deleting the book from the cart
|
||||
cy.get(".tableWrap")
|
||||
.children()
|
||||
.within(() => {
|
||||
cy.get("span:contains('Delete')")
|
||||
.closest("div")
|
||||
.eq(1)
|
||||
.click();
|
||||
cy.get("span:contains('Delete')").closest("div").eq(1).click();
|
||||
cy.wait("@postExecute");
|
||||
cy.wait(5000);
|
||||
|
||||
|
|
@ -183,23 +154,15 @@ describe("Shopping cart App", function() {
|
|||
.should("have.length", 1);
|
||||
});
|
||||
// Updating the book quantity from edit cart
|
||||
cy.xpath(appPage.editbookquantity)
|
||||
.clear()
|
||||
.type("3");
|
||||
cy.get("span:contains('Submit')")
|
||||
.closest("div")
|
||||
.eq(0)
|
||||
.click();
|
||||
cy.xpath(appPage.editbookquantity).clear().type("3");
|
||||
cy.get("span:contains('Submit')").closest("div").eq(0).click();
|
||||
cy.assertPageSave();
|
||||
cy.wait(5000);
|
||||
// validating updated value in the cart
|
||||
cy.get(".selected-row")
|
||||
.children()
|
||||
.eq(3)
|
||||
.should("have.text", "3");
|
||||
cy.get(".selected-row").children().eq(3).should("have.text", "3");
|
||||
});
|
||||
|
||||
it("3. Connect the appplication to git and validate data in deploy mode and edit mode", function() {
|
||||
it("3. Connect the appplication to git and validate data in deploy mode and edit mode", function () {
|
||||
_.gitSync.CreateNConnectToGit(repoName);
|
||||
cy.get("@gitRepoName").then((repName) => {
|
||||
repoName = repName;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const dsl = require("../../../fixtures/PgAdmindsl.json");
|
|||
const widgetsPage = require("../../../locators/Widgets.json");
|
||||
const appPage = require("../../../locators/PgAdminlocators.json");
|
||||
|
||||
describe("PgAdmin Clone App", function() {
|
||||
describe("PgAdmin Clone App", function () {
|
||||
let datasourceName, tableName;
|
||||
|
||||
before("Add dsl and create datasource", () => {
|
||||
|
|
@ -15,7 +15,7 @@ describe("PgAdmin Clone App", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("1. Create queries", function() {
|
||||
it("1. Create queries", function () {
|
||||
// writing query to get all schema
|
||||
_.dataSources.CreateQueryAfterDSSaved(
|
||||
"SELECT schema_name FROM information_schema.schemata;",
|
||||
|
|
@ -58,15 +58,13 @@ describe("PgAdmin Clone App", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("2. Add new table from app page, View and Delete table", function() {
|
||||
it("2. Add new table from app page, View and Delete table", function () {
|
||||
_.deployMode.DeployApp();
|
||||
// adding new table
|
||||
cy.xpath(appPage.addNewtable).click({ force: true });
|
||||
cy.wait(500);
|
||||
cy.generateUUID().then((UUID) => {
|
||||
cy.xpath(appPage.addTablename)
|
||||
.clear()
|
||||
.type(`table${UUID}`);
|
||||
cy.xpath(appPage.addTablename).clear().type(`table${UUID}`);
|
||||
tableName = `table${UUID}`;
|
||||
});
|
||||
// adding column to the table
|
||||
|
|
@ -77,29 +75,19 @@ describe("PgAdmin Clone App", function() {
|
|||
_.agHelper.UpdateInput(appPage.addColumnName, "ID");
|
||||
_.agHelper.SelectFromDropDown("Varchar", "", 1);
|
||||
// switching on the Primary Key toggle
|
||||
cy.get(widgetsPage.switchWidgetInactive)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(widgetsPage.switchWidgetInactive).first().click();
|
||||
// switching on the Not Null toggle
|
||||
cy.get(widgetsPage.switchWidgetInactive)
|
||||
.last()
|
||||
.click();
|
||||
cy.get(widgetsPage.switchWidgetInactive).last().click();
|
||||
cy.xpath(appPage.submitButton).click({ force: true });
|
||||
cy.xpath(appPage.addColumn).should("be.visible");
|
||||
cy.wait(500);
|
||||
cy.xpath(appPage.submitButton)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.xpath(appPage.submitButton).first().click({ force: true });
|
||||
cy.xpath(appPage.closeButton).click({ force: true });
|
||||
cy.xpath(appPage.addNewtable).should("be.visible");
|
||||
// viewing the table's columns by clicking on view button
|
||||
cy.xpath(appPage.viewButton)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.xpath(appPage.viewButton).first().click({ force: true });
|
||||
// deleting the table through modal
|
||||
cy.xpath(appPage.deleteButton)
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.xpath(appPage.deleteButton).last().click({ force: true });
|
||||
cy.xpath(appPage.confirmButton).click({ force: true });
|
||||
cy.xpath(appPage.closeButton).click({ force: true });
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const homePage = require("../../../locators/HomePage");
|
|||
const dsl = require("../../../fixtures/promisesStoreValueDsl.json");
|
||||
const commonlocators = require("../../../locators/commonlocators.json");
|
||||
|
||||
describe("JSEditor tests", function() {
|
||||
describe("JSEditor tests", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
|
@ -68,9 +68,7 @@ describe("JSEditor tests", function() {
|
|||
|
||||
// select an option from select widget
|
||||
cy.get(".bp3-button.select-button").click({ force: true });
|
||||
cy.get(".menu-item-text")
|
||||
.eq(2)
|
||||
.click({ force: true });
|
||||
cy.get(".menu-item-text").eq(2).click({ force: true });
|
||||
cy.wait(2000);
|
||||
// verify text in the text widget
|
||||
cy.get(".t--draggable-textwidget span")
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const homePage = require("../../../locators/HomePage");
|
|||
const reconnectDatasourceModal = require("../../../locators/ReconnectLocators");
|
||||
const datasource = require("../../../locators/DatasourcesEditor.json");
|
||||
|
||||
describe("Reconnect Datasource Modal validation while importing application", function() {
|
||||
describe("Reconnect Datasource Modal validation while importing application", function () {
|
||||
let workspaceId;
|
||||
let appid;
|
||||
let newWorkspaceName;
|
||||
let appName;
|
||||
it("1. Import application from json with one postgres and success modal", function() {
|
||||
it("1. Import application from json with one postgres and success modal", function () {
|
||||
cy.NavigateToHome();
|
||||
// import application
|
||||
cy.generateUUID().then((uid) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import * as _ from "../../../../support/Objects/ObjectsCore"
|
||||
import * as _ from "../../../../support/Objects/ObjectsCore";
|
||||
|
||||
describe("clearStore Action test", () => {
|
||||
before(() => {
|
||||
|
|
@ -6,7 +6,7 @@ describe("clearStore Action test", () => {
|
|||
_.entityExplorer.NavigateToSwitcher("explorer");
|
||||
});
|
||||
|
||||
it("1. Feature 11639 : Clear all store value", function() {
|
||||
it("1. Feature 11639 : Clear all store value", function () {
|
||||
const JS_OBJECT_BODY = `export default {
|
||||
storeValue: async () => {
|
||||
let values =
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ const widgetsPage = require("../../../../locators/Widgets.json");
|
|||
const publishPage = require("../../../../locators/publishWidgetspage.json");
|
||||
let dataSet;
|
||||
|
||||
describe("Test Create Api and Bind to Button widget", function() {
|
||||
describe("Test Create Api and Bind to Button widget", function () {
|
||||
before("Test_Add users api and execute api", () => {
|
||||
cy.addDsl(dsl);
|
||||
cy.fixture("example").then(function(data) {
|
||||
cy.fixture("example").then(function (data) {
|
||||
dataSet = data;
|
||||
cy.createAndFillApi(dataSet.userApi, "/random");
|
||||
cy.RunAPI();
|
||||
|
|
@ -32,9 +32,7 @@ describe("Test Create Api and Bind to Button widget", function() {
|
|||
cy.PublishtheApp();
|
||||
|
||||
cy.wait(3000);
|
||||
cy.get("span:contains('Submit')")
|
||||
.closest("div")
|
||||
.click();
|
||||
cy.get("span:contains('Submit')").closest("div").click();
|
||||
|
||||
cy.wait("@postExecute").should(
|
||||
"have.nested.property",
|
||||
|
|
@ -59,9 +57,7 @@ describe("Test Create Api and Bind to Button widget", function() {
|
|||
cy.PublishtheApp();
|
||||
|
||||
cy.wait(3000);
|
||||
cy.get("span:contains('Submit')")
|
||||
.closest("div")
|
||||
.click();
|
||||
cy.get("span:contains('Submit')").closest("div").click();
|
||||
|
||||
cy.wait("@postExecute").should(
|
||||
"have.nested.property",
|
||||
|
|
|
|||
|
|
@ -45,27 +45,19 @@ describe("Post window message", () => {
|
|||
deployMode.DeployApp();
|
||||
|
||||
cy.get("#iframe-Iframe1").then((element) => {
|
||||
element
|
||||
.contents()
|
||||
.find("body")
|
||||
.find("#iframe-button")
|
||||
.click();
|
||||
element.contents().find("body").find("#iframe-button").click();
|
||||
});
|
||||
agHelper.ValidateToastMessage("I got a message from iframe");
|
||||
|
||||
cy.get("#iframe-Iframe1").then(($element) => {
|
||||
const $body = $element.contents().find("body");
|
||||
cy.wrap($body)
|
||||
.find("#txtMsg")
|
||||
.should("have.text", "Before postMessage");
|
||||
cy.wrap($body).find("#txtMsg").should("have.text", "Before postMessage");
|
||||
});
|
||||
|
||||
agHelper.ClickButton("Submit");
|
||||
cy.get("#iframe-Iframe1").then(($element) => {
|
||||
const $body = $element.contents().find("body");
|
||||
cy.wrap($body)
|
||||
.find("#txtMsg")
|
||||
.should("have.text", "After postMessage");
|
||||
cy.wrap($body).find("#txtMsg").should("have.text", "After postMessage");
|
||||
});
|
||||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ describe("removeValue Action test", () => {
|
|||
ee.NavigateToSwitcher("explorer");
|
||||
});
|
||||
|
||||
it("1. Feature 11639 : Remove store value", function() {
|
||||
it("1. Feature 11639 : Remove store value", function () {
|
||||
const JS_OBJECT_BODY = `export default {
|
||||
storeValue: async () => {
|
||||
await storeValue('val1', 'value 1');
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ describe("storeValue Action test", () => {
|
|||
ee.NavigateToSwitcher("explorer");
|
||||
});
|
||||
|
||||
it("1. Bug 14653: Running consecutive storeValue actions and await", function() {
|
||||
it("1. Bug 14653: Running consecutive storeValue actions and await", function () {
|
||||
const jsObjectBody = `export default {
|
||||
storeTest: () => {
|
||||
let values =
|
||||
|
|
@ -66,7 +66,7 @@ describe("storeValue Action test", () => {
|
|||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("2. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key", function() {
|
||||
it("2. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key", function () {
|
||||
const DEFAULT_STUDENT_OBJECT = {
|
||||
details: { isTopper: true, name: "Abhah", grade: 1 },
|
||||
};
|
||||
|
|
@ -148,7 +148,7 @@ describe("storeValue Action test", () => {
|
|||
deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("3. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key - object keys", function() {
|
||||
it("3. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key - object keys", function () {
|
||||
const TEST_OBJECT = { a: 1, two: {} };
|
||||
|
||||
const JS_OBJECT_BODY = `export default {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ const dsl = require("../../../../fixtures/buttonApiDsl.json");
|
|||
const widgetsPage = require("../../../../locators/Widgets.json");
|
||||
const publishPage = require("../../../../locators/publishWidgetspage.json");
|
||||
|
||||
describe("Test Create Api and Bind to Button widget", function() {
|
||||
describe("Test Create Api and Bind to Button widget", function () {
|
||||
let dataSet;
|
||||
before("Test_Add users api and execute api", () => {
|
||||
cy.addDsl(dsl);
|
||||
|
||||
cy.fixture("example").then(function(data) {
|
||||
cy.fixture("example").then(function (data) {
|
||||
dataSet = data;
|
||||
cy.createAndFillApi(dataSet.userApi, "/users");
|
||||
cy.RunAPI();
|
||||
|
|
@ -17,9 +17,7 @@ describe("Test Create Api and Bind to Button widget", function() {
|
|||
|
||||
it("1. Selects set interval function, Fill setInterval action creator and test code generated ", () => {
|
||||
cy.SearchEntityandOpen("Button1");
|
||||
cy.get(widgetsPage.buttonOnClick)
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.buttonOnClick).last().click({ force: true });
|
||||
cy.get(commonlocators.chooseAction)
|
||||
.children()
|
||||
.contains("Set interval")
|
||||
|
|
@ -63,9 +61,7 @@ describe("Test Create Api and Bind to Button widget", function() {
|
|||
it("2. Works in the published version", () => {
|
||||
cy.PublishtheApp();
|
||||
cy.wait(3000);
|
||||
cy.get("span:contains('Submit')")
|
||||
.closest("div")
|
||||
.click();
|
||||
cy.get("span:contains('Submit')").closest("div").click();
|
||||
cy.wait("@postExecute").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
|
|
@ -83,9 +79,7 @@ describe("Test Create Api and Bind to Button widget", function() {
|
|||
|
||||
it("3. Selects clear interval function, Fill clearInterval action creator and test code generated", () => {
|
||||
cy.SearchEntityandOpen("Button1");
|
||||
cy.get(widgetsPage.buttonOnClick)
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.buttonOnClick).last().click({ force: true });
|
||||
cy.get(commonlocators.chooseAction)
|
||||
.children()
|
||||
.contains("Clear interval")
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const {
|
|||
GOOGLE_SIGNUP_SETUP_DOC,
|
||||
} = require("../../../../../src/constants/ThirdPartyConstants");
|
||||
|
||||
describe("Admin settings page", function() {
|
||||
describe("Admin settings page", function () {
|
||||
beforeEach(() => {
|
||||
cy.intercept("GET", "/api/v1/admin/env", {
|
||||
body: { responseMeta: { status: 200, success: true }, data: {} },
|
||||
|
|
@ -119,9 +119,7 @@ describe("Admin settings page", function() {
|
|||
};
|
||||
assertVisibilityAndDisabledState();
|
||||
cy.get(adminsSettings.instanceName).should("be.visible");
|
||||
cy.get(adminsSettings.instanceName)
|
||||
.clear()
|
||||
.type("AppsmithInstance");
|
||||
cy.get(adminsSettings.instanceName).clear().type("AppsmithInstance");
|
||||
cy.get(adminsSettings.saveButton).should("be.visible");
|
||||
cy.get(adminsSettings.saveButton).should("not.be.disabled");
|
||||
cy.get(adminsSettings.resetButton).should("be.visible");
|
||||
|
|
@ -137,9 +135,7 @@ describe("Admin settings page", function() {
|
|||
let instanceName;
|
||||
cy.generateUUID().then((uuid) => {
|
||||
instanceName = uuid;
|
||||
cy.get(adminsSettings.instanceName)
|
||||
.clear()
|
||||
.type(uuid);
|
||||
cy.get(adminsSettings.instanceName).clear().type(uuid);
|
||||
});
|
||||
cy.get(adminsSettings.saveButton).should("be.visible");
|
||||
cy.get(adminsSettings.saveButton).should("not.be.disabled");
|
||||
|
|
@ -165,9 +161,7 @@ describe("Admin settings page", function() {
|
|||
let instanceName;
|
||||
cy.generateUUID().then((uuid) => {
|
||||
instanceName = uuid;
|
||||
cy.get(adminsSettings.instanceName)
|
||||
.clear()
|
||||
.type(uuid);
|
||||
cy.get(adminsSettings.instanceName).clear().type(uuid);
|
||||
});
|
||||
cy.get(adminsSettings.saveButton).should("be.visible");
|
||||
cy.get(adminsSettings.saveButton).should("not.be.disabled");
|
||||
|
|
@ -178,9 +172,7 @@ describe("Admin settings page", function() {
|
|||
let fromAddress;
|
||||
cy.generateUUID().then((uuid) => {
|
||||
fromAddress = uuid;
|
||||
cy.get(adminsSettings.fromAddress)
|
||||
.clear()
|
||||
.type(`${uuid}@appsmith.com`);
|
||||
cy.get(adminsSettings.fromAddress).clear().type(`${uuid}@appsmith.com`);
|
||||
});
|
||||
cy.intercept("POST", "/api/v1/admin/restart", {
|
||||
body: { responseMeta: { status: 200, success: true }, data: true },
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ const {
|
|||
PropertyPane: propPane,
|
||||
} = ObjectsRegistry;
|
||||
|
||||
describe("Autocomplete bug fixes", function() {
|
||||
it("1. Bug #12790 Verifies if selectedRow is in best match", function() {
|
||||
describe("Autocomplete bug fixes", function () {
|
||||
it("1. Bug #12790 Verifies if selectedRow is in best match", function () {
|
||||
ee.DragDropWidgetNVerify(WIDGET.TABLE, 200, 200);
|
||||
ee.DragDropWidgetNVerify(WIDGET.TEXT, 200, 600);
|
||||
ee.SelectEntityByName("Text1");
|
||||
|
|
@ -24,7 +24,7 @@ describe("Autocomplete bug fixes", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("2. Bug #14990 Checks if copied widget show up on autocomplete suggestions", function() {
|
||||
it("2. Bug #14990 Checks if copied widget show up on autocomplete suggestions", function () {
|
||||
ee.CopyPasteWidget("Text1");
|
||||
ee.SelectEntityByName("Text1");
|
||||
propPane.UpdatePropertyFieldValue("Text", "");
|
||||
|
|
@ -39,7 +39,7 @@ describe("Autocomplete bug fixes", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("3. Bug #14100 Custom columns name label change should reflect in autocomplete", function() {
|
||||
it("3. Bug #14100 Custom columns name label change should reflect in autocomplete", function () {
|
||||
// select table widget
|
||||
ee.SelectEntityByName("Table1");
|
||||
// add new column
|
||||
|
|
@ -64,7 +64,7 @@ describe("Autocomplete bug fixes", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("4. feat #16426 Autocomplete for fast-xml-parser", function() {
|
||||
it("4. feat #16426 Autocomplete for fast-xml-parser", function () {
|
||||
ee.SelectEntityByName("Text1");
|
||||
propPane.TypeTextIntoField("Text", "{{xmlParser.j");
|
||||
agHelper.GetNAssertElementText(locator._hints, "j2xParser");
|
||||
|
|
@ -73,7 +73,7 @@ describe("Autocomplete bug fixes", function() {
|
|||
agHelper.GetNAssertElementText(locator._hints, "parse");
|
||||
});
|
||||
|
||||
it("5. Installed library should show up in autocomplete", function() {
|
||||
it("5. Installed library should show up in autocomplete", function () {
|
||||
ee.ExpandCollapseEntity("Libraries");
|
||||
installer.openInstaller();
|
||||
installer.installLibrary("uuidjs", "UUID");
|
||||
|
|
@ -83,7 +83,7 @@ describe("Autocomplete bug fixes", function() {
|
|||
agHelper.GetNAssertElementText(locator._hints, "UUID");
|
||||
});
|
||||
|
||||
it("6. No autocomplete for Removed libraries", function() {
|
||||
it("6. No autocomplete for Removed libraries", function () {
|
||||
ee.RenameEntityFromExplorer("Text1Copy", "UUIDTEXT");
|
||||
installer.uninstallLibrary("uuidjs");
|
||||
propPane.TypeTextIntoField("Text", "{{UUID.");
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
|
||||
const {
|
||||
AggregateHelper,
|
||||
CommonLocators,
|
||||
EntityExplorer,
|
||||
PropertyPane,
|
||||
} = ObjectsRegistry;
|
||||
const { AggregateHelper, CommonLocators, EntityExplorer, PropertyPane } =
|
||||
ObjectsRegistry;
|
||||
|
||||
describe("Property Pane Suggestions", () => {
|
||||
before(() => {
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ const dsl = require("../../../../fixtures/MultipleInput.json");
|
|||
const widgetsPage = require("../../../../locators/Widgets.json");
|
||||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
|
||||
describe("Binding the API with pageOnLoad and input Widgets", function() {
|
||||
describe("Binding the API with pageOnLoad and input Widgets", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Will load an api on load", function() {
|
||||
it("1. Will load an api on load", function () {
|
||||
cy.NavigateToAPI_Panel();
|
||||
cy.CreateAPI("PageLoadApi");
|
||||
cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods);
|
||||
|
|
@ -20,7 +20,7 @@ describe("Binding the API with pageOnLoad and input Widgets", function() {
|
|||
cy.reload();
|
||||
});
|
||||
|
||||
it("2. Input widget updated with deafult data", function() {
|
||||
it("2. Input widget updated with deafult data", function () {
|
||||
cy.selectEntityByName("Widgets");
|
||||
cy.selectEntityByName("Input1");
|
||||
cy.get(widgetsPage.defaultInput).type("3");
|
||||
|
|
@ -36,7 +36,7 @@ describe("Binding the API with pageOnLoad and input Widgets", function() {
|
|||
.should("contain", "3");
|
||||
});
|
||||
|
||||
it("3. Binding second input widget with API on PageLoad data and default data from input1 widget ", function() {
|
||||
it("3. Binding second input widget with API on PageLoad data and default data from input1 widget ", function () {
|
||||
cy.selectEntityByName("Input3");
|
||||
cy.get(widgetsPage.defaultInput).type(testdata.pageloadBinding, {
|
||||
parseSpecialCharSequences: false,
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ const locator = ObjectsRegistry.CommonLocators,
|
|||
agHelper = ObjectsRegistry.AggregateHelper,
|
||||
propPane = ObjectsRegistry.PropertyPane;
|
||||
|
||||
describe("Binding the Button widget with Text widget using Recpatcha v3", function() {
|
||||
describe("Binding the Button widget with Text widget using Recpatcha v3", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it.only("1. Validate the Button binding with Text Widget with Recaptcha token with empty key", function() {
|
||||
it.only("1. Validate the Button binding with Text Widget with Recaptcha token with empty key", function () {
|
||||
agHelper.ClickButton("Submit");
|
||||
agHelper
|
||||
.GetText(locator._widgetInCanvas("textwidget") + " span")
|
||||
|
|
@ -27,7 +27,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi
|
|||
});
|
||||
|
||||
//This test to be enabled once the product bug is fixed
|
||||
it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function() {
|
||||
it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function () {
|
||||
cy.get("button")
|
||||
.contains("Submit")
|
||||
.should("be.visible")
|
||||
|
|
@ -65,7 +65,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi
|
|||
});
|
||||
});
|
||||
|
||||
it.only("2. Validate the Button binding with Text Widget with Recaptcha Token with v2Key & upward compatibilty doesnt work", function() {
|
||||
it.only("2. Validate the Button binding with Text Widget with Recaptcha Token with v2Key & upward compatibilty doesnt work", function () {
|
||||
ee.SelectEntityByName("Button1");
|
||||
propPane.UpdatePropertyFieldValue("Google reCAPTCHA Key", testdata.v2Key);
|
||||
agHelper.ClickButton("Submit");
|
||||
|
|
@ -85,7 +85,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi
|
|||
agHelper.Sleep();
|
||||
});
|
||||
|
||||
it.only("3. Validate the Button binding with Text Widget with Recaptcha Token with v3Key & v2key for backward compatible", function() {
|
||||
it.only("3. Validate the Button binding with Text Widget with Recaptcha Token with v3Key & v2key for backward compatible", function () {
|
||||
ee.SelectEntityByName("Button1");
|
||||
propPane.UpdatePropertyFieldValue("Google reCAPTCHA Key", testdata.v3Key);
|
||||
agHelper.SelectDropdownList("Google reCAPTCHA Version", "reCAPTCHA v3");
|
||||
|
|
@ -104,7 +104,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi
|
|||
});
|
||||
|
||||
//This test to be enabled once the product bug is fixed
|
||||
it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function() {
|
||||
it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function () {
|
||||
cy.get("button")
|
||||
.contains("Submit")
|
||||
.should("be.visible")
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@ const dsl = require("../../../../fixtures/listwidgetdsl.json");
|
|||
const publishPage = require("../../../../locators/publishWidgetspage.json");
|
||||
import apiPage from "../../../../locators/ApiEditor";
|
||||
|
||||
describe("Test Create Api and Bind to List widget", function() {
|
||||
describe("Test Create Api and Bind to List widget", function () {
|
||||
let valueToTest;
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Test_Add users api and execute api", function() {
|
||||
it("1. Test_Add users api and execute api", function () {
|
||||
cy.createAndFillApi(this.data.userApi, "/mock-api?records=10");
|
||||
cy.RunAPI();
|
||||
cy.get(apiPage.jsonResponseTab).click();
|
||||
|
|
@ -28,7 +28,7 @@ describe("Test Create Api and Bind to List widget", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("2. Test_Validate the Api data is updated on List widget", function() {
|
||||
it("2. Test_Validate the Api data is updated on List widget", function () {
|
||||
cy.SearchEntityandOpen("List1");
|
||||
cy.testJsontext("items", "{{Api1.data}}");
|
||||
cy.get(".t--draggable-textwidget span").should("have.length", 8);
|
||||
|
|
@ -62,7 +62,7 @@ describe("Test Create Api and Bind to List widget", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("3. Test_Validate the list widget ", function() {
|
||||
it("3. Test_Validate the list widget ", function () {
|
||||
cy.get(publishPage.backToEditor).click({ force: true });
|
||||
cy.wait("@postExecute").then((interception) => {
|
||||
valueToTest = JSON.stringify(
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ const widgetsPage = require("../../../../locators/Widgets.json");
|
|||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
import apiPage from "../../../../locators/ApiEditor";
|
||||
|
||||
describe("Bind a button and Api usecase", function() {
|
||||
describe("Bind a button and Api usecase", function () {
|
||||
let apiData;
|
||||
let valueToTest;
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Add an API by binding a button in its header", function() {
|
||||
it("1. Add an API by binding a button in its header", function () {
|
||||
cy.createAndFillApi(this.data.userApi, "/mock-api?records=10");
|
||||
cy.get(apiwidget.headerKey)
|
||||
.first()
|
||||
|
|
@ -39,7 +39,7 @@ describe("Bind a button and Api usecase", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("2. Button-Name updation", function() {
|
||||
it("2. Button-Name updation", function () {
|
||||
cy.SearchEntityandOpen("Button1");
|
||||
//changing the Button Name
|
||||
cy.widgetText(
|
||||
|
|
@ -49,7 +49,7 @@ describe("Bind a button and Api usecase", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("3. API datasource binding with button name validation", function() {
|
||||
it("3. API datasource binding with button name validation", function () {
|
||||
cy.CheckAndUnfoldEntityItem("Queries/JS");
|
||||
cy.SearchEntityandOpen("Api1");
|
||||
cy.get(apiwidget.headerValue)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json");
|
|||
const dsl = require("../../../../fixtures/uiBindDsl.json");
|
||||
const publishPage = require("../../../../locators/publishWidgetspage.json");
|
||||
|
||||
describe("Binding the Datepicker and Text Widget", function() {
|
||||
describe("Binding the Datepicker and Text Widget", function () {
|
||||
let nextDay;
|
||||
let dateDp2;
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ describe("Binding the Datepicker and Text Widget", function() {
|
|||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("DatePicker-Text, Validate selectedDate functionality", function() {
|
||||
it("DatePicker-Text, Validate selectedDate functionality", function () {
|
||||
/**
|
||||
* Bind DatePicker1 to Text for "selectedDate"
|
||||
*/
|
||||
|
|
@ -48,7 +48,7 @@ describe("Binding the Datepicker and Text Widget", function() {
|
|||
cy.get(commonlocators.backToEditor).click();
|
||||
});
|
||||
|
||||
it("DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function() {
|
||||
it("DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function () {
|
||||
cy.openPropertyPane("textwidget");
|
||||
|
||||
/**
|
||||
|
|
@ -86,7 +86,7 @@ describe("Binding the Datepicker and Text Widget", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("Validate the Date is not changed in DatePicker2", function() {
|
||||
it("Validate the Date is not changed in DatePicker2", function () {
|
||||
cy.log("dateDp2:" + dateDp2);
|
||||
cy.get(formWidgetsPage.datepickerWidget + commonlocators.inputField)
|
||||
.eq(1)
|
||||
|
|
@ -100,7 +100,7 @@ describe("Binding the Datepicker and Text Widget", function() {
|
|||
cy.get(publishPage.backToEditor).click({ force: true });
|
||||
});
|
||||
|
||||
it("DatePicker-Text, Validate Multiple Binding", function() {
|
||||
it("DatePicker-Text, Validate Multiple Binding", function () {
|
||||
/**
|
||||
* Bind the DatePicker1 and DatePicker2 along with hard coded text to Text widget
|
||||
*/
|
||||
|
|
@ -115,7 +115,7 @@ describe("Binding the Datepicker and Text Widget", function() {
|
|||
cy.get(publishPage.backToEditor).click({ force: true });
|
||||
});
|
||||
|
||||
it("Checks if on deselection of date triggers the onDateSelected action or not.", function() {
|
||||
it("Checks if on deselection of date triggers the onDateSelected action or not.", function () {
|
||||
/**
|
||||
* bind datepicker to show a message "Hello" on date selected
|
||||
*/
|
||||
|
|
@ -129,9 +129,7 @@ describe("Binding the Datepicker and Text Widget", function() {
|
|||
/**
|
||||
* checking if on selecting the date triggers the message
|
||||
*/
|
||||
cy.get(formWidgetsPage.datepickerWidget)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(formWidgetsPage.datepickerWidget).first().click();
|
||||
cy.ClearDateFooter();
|
||||
cy.SetDateToToday();
|
||||
cy.get(commonlocators.toastmsg).contains("hello");
|
||||
|
|
@ -140,12 +138,8 @@ describe("Binding the Datepicker and Text Widget", function() {
|
|||
* checking if on deselecting the date triggers the message or not.
|
||||
* It should not trigger any message on deselection
|
||||
*/
|
||||
cy.get(formWidgetsPage.datepickerWidget)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(formWidgetsPage.datepickerFooter)
|
||||
.contains("Clear")
|
||||
.click();
|
||||
cy.get(formWidgetsPage.datepickerWidget).first().click();
|
||||
cy.get(formWidgetsPage.datepickerFooter).contains("Clear").click();
|
||||
cy.get(commonlocators.toastmsg).should("not.exist");
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the Table and input Widget", function() {
|
||||
describe("Binding the Table and input Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Input widget test with default value from table widget", function() {
|
||||
it("1. Input widget test with default value from table widget", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
||||
|
||||
|
|
@ -18,12 +18,10 @@ describe("Binding the Table and input Widget", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("2. validation of data displayed in input widgets based on sorting", function() {
|
||||
it("2. validation of data displayed in input widgets based on sorting", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.testJsontext("defaultselectedrow", "0");
|
||||
cy.get(".draggable-header")
|
||||
.contains("id")
|
||||
.click({ force: true });
|
||||
cy.get(".draggable-header").contains("id").click({ force: true });
|
||||
cy.wait(1000);
|
||||
cy.readTableV2dataPublish("0", "0").then((tabData) => {
|
||||
const tabValue = tabData;
|
||||
|
|
@ -34,9 +32,7 @@ describe("Binding the Table and input Widget", function() {
|
|||
.invoke("attr", "value")
|
||||
.should("contain", tabValue);
|
||||
});
|
||||
cy.get(".draggable-header")
|
||||
.contains("id")
|
||||
.click({ force: true });
|
||||
cy.get(".draggable-header").contains("id").click({ force: true });
|
||||
cy.wait(1000);
|
||||
cy.readTableV2dataPublish("0", "0").then((tabData) => {
|
||||
const tabValue = tabData;
|
||||
|
|
@ -49,7 +45,7 @@ describe("Binding the Table and input Widget", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("3. validation of column id displayed in input widgets based on sorted column", function() {
|
||||
it("3. validation of column id displayed in input widgets based on sorted column", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.sortedColumn + "}}");
|
||||
cy.wait("@updateLayout").should(
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the Table and input Widget", function() {
|
||||
describe("Binding the Table and input Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Input widget test with default value from table widget", function() {
|
||||
it("1. Input widget test with default value from table widget", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
||||
|
||||
|
|
@ -18,12 +18,10 @@ describe("Binding the Table and input Widget", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("2. Validation of data displayed in input widgets based on sorting", function() {
|
||||
it("2. Validation of data displayed in input widgets based on sorting", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.testJsontext("defaultselectedrow", "0");
|
||||
cy.get(".draggable-header")
|
||||
.contains("id")
|
||||
.click({ force: true });
|
||||
cy.get(".draggable-header").contains("id").click({ force: true });
|
||||
cy.wait(1000);
|
||||
cy.readTabledataPublish("0", "0").then((tabData) => {
|
||||
const tabValue = tabData;
|
||||
|
|
@ -34,9 +32,7 @@ describe("Binding the Table and input Widget", function() {
|
|||
.invoke("attr", "value")
|
||||
.should("contain", tabValue);
|
||||
});
|
||||
cy.get(".draggable-header")
|
||||
.contains("id")
|
||||
.click({ force: true });
|
||||
cy.get(".draggable-header").contains("id").click({ force: true });
|
||||
cy.wait(1000);
|
||||
cy.readTabledataPublish("0", "0").then((tabData) => {
|
||||
const tabValue = tabData;
|
||||
|
|
@ -49,7 +45,7 @@ describe("Binding the Table and input Widget", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("3. Validation of column id displayed in input widgets based on sorted column", function() {
|
||||
it("3. Validation of column id displayed in input widgets based on sorted column", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.sortedColumn + "}}");
|
||||
cy.wait("@updateLayout").should(
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const publish = require("../../../../locators/publishWidgetspage.json");
|
|||
let datasourceName;
|
||||
let currentUrl;
|
||||
|
||||
describe("Addwidget from Query and bind with other widgets", function() {
|
||||
describe("Addwidget from Query and bind with other widgets", function () {
|
||||
beforeEach(() => {
|
||||
cy.startRoutesForDatasource();
|
||||
});
|
||||
|
|
@ -34,9 +34,7 @@ describe("Addwidget from Query and bind with other widgets", function() {
|
|||
cy.get(queryEditor.suggestedTableWidget).click();
|
||||
cy.createJSObject("return Query1.data;");
|
||||
cy.CheckAndUnfoldEntityItem("Widgets");
|
||||
cy.get(".t--entity-name")
|
||||
.contains("Table1")
|
||||
.click({ force: true });
|
||||
cy.get(".t--entity-name").contains("Table1").click({ force: true });
|
||||
cy.testJsontext("tabledata", "{{JSObject1.myFun1()}}");
|
||||
cy.isSelectRow(1);
|
||||
cy.readTableV2dataPublish("1", "0").then((tabData) => {
|
||||
|
|
@ -52,9 +50,7 @@ describe("Addwidget from Query and bind with other widgets", function() {
|
|||
cy.url().then((url) => {
|
||||
currentUrl = url;
|
||||
cy.log("Published url is: " + currentUrl);
|
||||
cy.get(publish.backToEditor)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(publish.backToEditor).first().click();
|
||||
cy.wait(2000);
|
||||
cy.visit(currentUrl);
|
||||
cy.wait("@getPagesForViewApp").should(
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ const widgetsToTest = {
|
|||
};
|
||||
|
||||
Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => {
|
||||
describe(`${testConfig.widgetName} widget test for validating reset action`, function() {
|
||||
describe(`${testConfig.widgetName} widget test for validating reset action`, function () {
|
||||
beforeEach(() => {
|
||||
agHelper.RestoreLocalStorageCache();
|
||||
});
|
||||
|
|
@ -40,17 +40,15 @@ Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => {
|
|||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it(`1. DragDrop Widget ${testConfig.widgetName}`, function() {
|
||||
it(`1. DragDrop Widget ${testConfig.widgetName}`, function () {
|
||||
cy.get(explorer.addWidget).click();
|
||||
cy.dragAndDropToCanvas(widgetSelector, { x: 300, y: 200 });
|
||||
cy.get(getWidgetSelector(widgetSelector)).should("exist");
|
||||
});
|
||||
|
||||
it("2. Bind Button on click and Text widget content", function() {
|
||||
it("2. Bind Button on click and Text widget content", function () {
|
||||
cy.openPropertyPane(WIDGET.BUTTON);
|
||||
cy.get(PROPERTY_SELECTOR.onClick)
|
||||
.find(".t--js-toggle")
|
||||
.click();
|
||||
cy.get(PROPERTY_SELECTOR.onClick).find(".t--js-toggle").click();
|
||||
cy.updateCodeInput(
|
||||
PROPERTY_SELECTOR.onClick,
|
||||
`{{resetWidget("${testConfig.widgetPrefixName}",true).then(() => showAlert("success"))}}`,
|
||||
|
|
@ -78,7 +76,7 @@ Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => {
|
|||
cy.wait(4000);
|
||||
});
|
||||
|
||||
it("3. Publish the app and validate reset action", function() {
|
||||
it("3. Publish the app and validate reset action", function () {
|
||||
cy.PublishtheApp();
|
||||
cy.get(".rc-select-selection-overflow").click({ force: true });
|
||||
cy.get(".rc-select-item-option:contains('Blue')").click({ force: true });
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/tabInputDsl.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the input Widget with tab Widget", function() {
|
||||
describe("Binding the input Widget with tab Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Input widget test with default value from tab widget", function() {
|
||||
it("Input widget test with default value from tab widget", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.tabBinding + "}}");
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ describe("Binding the input Widget with tab Widget", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("validation of data displayed in input widgets based on tab selected", function() {
|
||||
it("validation of data displayed in input widgets based on tab selected", function () {
|
||||
cy.PublishtheApp();
|
||||
cy.get(publish.tabWidget)
|
||||
.contains("Tab 2")
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@ const publishPage = require("../../../../locators/publishWidgetspage.json");
|
|||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
import apiPage from "../../../../locators/ApiEditor";
|
||||
|
||||
describe("Test Create Api and Bind to Table widget", function() {
|
||||
describe("Test Create Api and Bind to Table widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
it("1. Test_Add Paginate with Table Page No and Execute the Api", function() {
|
||||
it("1. Test_Add Paginate with Table Page No and Execute the Api", function () {
|
||||
cy.wait(3000);
|
||||
/**Create an Api1 of Paginate with Table Page No */
|
||||
cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam);
|
||||
cy.RunAPI();
|
||||
});
|
||||
|
||||
it("2. Table-Text, Validate Server Side Pagination of Paginate with Table Page No", function() {
|
||||
it("2. Table-Text, Validate Server Side Pagination of Paginate with Table Page No", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.EnableAllCodeEditors();
|
||||
/**Bind Api1 with Table widget */
|
||||
|
|
@ -44,7 +44,7 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
//cy.ValidateTableData("11");
|
||||
});
|
||||
|
||||
it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table Page No", function() {
|
||||
it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table Page No", function () {
|
||||
cy.PublishtheApp();
|
||||
cy.wait(500);
|
||||
// Make sure onPageLoad action has run before validating the data
|
||||
|
|
@ -64,22 +64,18 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("4. Table-Text, Validate Server Side Pagination of Paginate with Total Records Count", function() {
|
||||
it("4. Table-Text, Validate Server Side Pagination of Paginate with Total Records Count", function () {
|
||||
cy.get(publishPage.backToEditor).click({ force: true });
|
||||
cy.wait(3000);
|
||||
cy.CheckAndUnfoldEntityItem("Widgets");
|
||||
cy.get(".t--entity-name")
|
||||
.contains("Table1")
|
||||
.click({ force: true });
|
||||
cy.get(".t--entity-name").contains("Table1").click({ force: true });
|
||||
cy.testJsontext("totalrecordcount", 20);
|
||||
cy.PublishtheApp();
|
||||
cy.wait(500);
|
||||
cy.wait("@postExecute");
|
||||
cy.wait(500);
|
||||
cy.get(".show-page-items").should("contain", "20 Records");
|
||||
cy.get(".page-item")
|
||||
.next()
|
||||
.should("contain", "of 2");
|
||||
cy.get(".page-item").next().should("contain", "of 2");
|
||||
|
||||
cy.get(".t--table-widget-next-page").should("not.have.attr", "disabled");
|
||||
cy.readTabledata("0", "4").then((tabData) => {
|
||||
|
|
@ -92,7 +88,7 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
cy.get(".t--table-widget-next-page").should("have.attr", "disabled");
|
||||
});
|
||||
|
||||
it("5. Test_Add Paginate with Response URL and Execute the Api", function() {
|
||||
it("5. Test_Add Paginate with Response URL and Execute the Api", function () {
|
||||
cy.get(publishPage.backToEditor).click({ force: true });
|
||||
cy.wait(3000);
|
||||
/** Create Api2 of Paginate with Response URL*/
|
||||
|
|
@ -122,7 +118,7 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
cy.callApi("Api2");
|
||||
});
|
||||
|
||||
it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function() {
|
||||
it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function () {
|
||||
/**Validate Response data with Table data in Text Widget */
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.ValidatePaginateResponseUrlData(apiPage.apiPaginationPrevTest, false);
|
||||
|
|
|
|||
|
|
@ -4,19 +4,19 @@ const publishPage = require("../../../../locators/publishWidgetspage.json");
|
|||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
import apiPage from "../../../../locators/ApiEditor";
|
||||
|
||||
describe("Test Create Api and Bind to Table widget", function() {
|
||||
describe("Test Create Api and Bind to Table widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Test_Add Paginate with Table Page No and Execute the Api", function() {
|
||||
it("1. Test_Add Paginate with Table Page No and Execute the Api", function () {
|
||||
cy.wait(3000);
|
||||
/**Create an Api1 of Paginate with Table Page No */
|
||||
cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam);
|
||||
cy.RunAPI();
|
||||
});
|
||||
|
||||
it("2. Table-Text, Validate Server Side Pagination of Paginate with Table v2 Page No", function() {
|
||||
it("2. Table-Text, Validate Server Side Pagination of Paginate with Table v2 Page No", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
/**Bind Api1 with Table widget */
|
||||
cy.testJsontext("tabledata", "{{Api1.data}}");
|
||||
|
|
@ -48,7 +48,7 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
//cy.ValidateTableData("11");
|
||||
});
|
||||
|
||||
it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table v2 Page No", function() {
|
||||
it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table v2 Page No", function () {
|
||||
cy.PublishtheApp();
|
||||
cy.wait(500);
|
||||
// Make sure onPageLoad action has run before validating the data
|
||||
|
|
@ -68,22 +68,18 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("4. Table-Text, Validate Server Side Pagination of Paginate with Total v2 Records Count", function() {
|
||||
it("4. Table-Text, Validate Server Side Pagination of Paginate with Total v2 Records Count", function () {
|
||||
cy.get(publishPage.backToEditor).click({ force: true });
|
||||
cy.wait(3000);
|
||||
cy.CheckAndUnfoldEntityItem("Widgets");
|
||||
cy.get(".t--entity-name")
|
||||
.contains("Table1")
|
||||
.click({ force: true });
|
||||
cy.get(".t--entity-name").contains("Table1").click({ force: true });
|
||||
cy.testJsontext("totalrecords", 20);
|
||||
cy.PublishtheApp();
|
||||
cy.wait(500);
|
||||
cy.wait("@postExecute");
|
||||
cy.wait(500);
|
||||
cy.get(".show-page-items").should("contain", "20 Records");
|
||||
cy.get(".page-item")
|
||||
.next()
|
||||
.should("contain", "of 2");
|
||||
cy.get(".page-item").next().should("contain", "of 2");
|
||||
|
||||
cy.get(".t--table-widget-next-page").should("not.have.attr", "disabled");
|
||||
cy.readTableV2data("0", "4").then((tabData) => {
|
||||
|
|
@ -96,7 +92,7 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
cy.get(".t--table-widget-next-page").should("have.attr", "disabled");
|
||||
});
|
||||
|
||||
it("5. Test_Add Paginate with Response URL and Execute the Api", function() {
|
||||
it("5. Test_Add Paginate with Response URL and Execute the Api", function () {
|
||||
cy.get(publishPage.backToEditor).click({ force: true });
|
||||
cy.wait(3000);
|
||||
/** Create Api2 of Paginate with Response URL*/
|
||||
|
|
@ -126,7 +122,7 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
cy.callApi("Api2");
|
||||
});
|
||||
|
||||
it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function() {
|
||||
it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function () {
|
||||
/**Validate Response data with Table data in Text Widget */
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.ValidatePaginateResponseUrlDataV2(apiPage.apiPaginationPrevTest, false);
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the table widget and input Widget", function() {
|
||||
describe("Binding the table widget and input Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Input widget test with default value from table widget v2", function() {
|
||||
it("1. Input widget test with default value from table widget v2", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
||||
cy.wait("@updateLayout").should(
|
||||
|
|
@ -19,7 +19,7 @@ describe("Binding the table widget and input Widget", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("2. validation of data displayed in input widgets based on selected row", function() {
|
||||
it("2. validation of data displayed in input widgets based on selected row", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.testJsontext("defaultselectedrow", "2");
|
||||
cy.readTableV2dataPublish("2", "0").then((tabData) => {
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@ const dsl = require("../../../../fixtures/tableV2TextPaginationDsl.json");
|
|||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
const widgetsPage = require("../../../../locators/Widgets.json");
|
||||
|
||||
describe("Test Create Api and Bind to Table widget", function() {
|
||||
describe("Test Create Api and Bind to Table widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
it("1. Create an API and Execute the API and bind with TableV2", function() {
|
||||
it("1. Create an API and Execute the API and bind with TableV2", function () {
|
||||
cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam);
|
||||
cy.RunAPI();
|
||||
});
|
||||
|
||||
it("2. Validate TableV2 with API data and then add a column", function() {
|
||||
it("2. Validate TableV2 with API data and then add a column", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.testJsontext("tabledata", "{{Api1.data}}");
|
||||
cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox);
|
||||
|
|
@ -41,7 +41,7 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
cy.closePropertyPane();
|
||||
});
|
||||
|
||||
it("3. Check Image alignment is working as expected", function() {
|
||||
it("3. Check Image alignment is working as expected", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.editColumn("avatar");
|
||||
cy.changeColumnType("Image");
|
||||
|
|
@ -49,34 +49,28 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
cy.SearchEntityandOpen("Table1");
|
||||
cy.backFromPropertyPanel();
|
||||
cy.moveToStyleTab();
|
||||
cy.get(widgetsPage.centerAlign)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.centerAlign).first().click({ force: true });
|
||||
cy.closePropertyPane();
|
||||
cy.get(`.t--widget-tablewidgetv2 .tbody .image-cell-wrapper`)
|
||||
.first()
|
||||
.should("have.css", "justify-content", "center");
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.moveToStyleTab();
|
||||
cy.get(widgetsPage.rightAlign)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.rightAlign).first().click({ force: true });
|
||||
cy.closePropertyPane();
|
||||
cy.get(`.t--widget-tablewidgetv2 .tbody .image-cell-wrapper`)
|
||||
.first()
|
||||
.should("have.css", "justify-content", "flex-end");
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.moveToStyleTab();
|
||||
cy.get(widgetsPage.leftAlign)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.leftAlign).first().click({ force: true });
|
||||
cy.closePropertyPane();
|
||||
cy.get(`.t--widget-tablewidgetv2 .tbody .image-cell-wrapper`)
|
||||
.first()
|
||||
.should("have.css", "justify-content", "flex-start");
|
||||
});
|
||||
|
||||
it("4. Update table json data and check the derived column values after update", function() {
|
||||
it("4. Update table json data and check the derived column values after update", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.moveToContentTab();
|
||||
cy.tableV2ColumnDataValidation("id");
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
const commonlocators = require("../../../../locators/commonlocators.json");
|
||||
const dsl = require("../../../../fixtures/tableV2TextPaginationDsl.json");
|
||||
|
||||
describe("Test Create Api and Bind to Table widget V2", function() {
|
||||
describe("Test Create Api and Bind to Table widget V2", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
it("1. Create an API and Execute the API and bind with Table", function() {
|
||||
it("1. Create an API and Execute the API and bind with Table", function () {
|
||||
cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam);
|
||||
cy.RunAPI();
|
||||
});
|
||||
|
||||
it("2. Validate Table V2 with API data and then add a column", function() {
|
||||
it("2. Validate Table V2 with API data and then add a column", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.testJsontext("tabledata", "{{Api1.data}}");
|
||||
cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox);
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the table widget and input Widget", function() {
|
||||
describe("Binding the table widget and input Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Input widget test with default value from table widget", function() {
|
||||
it("Input widget test with default value from table widget", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
||||
cy.wait("@updateLayout").should(
|
||||
|
|
@ -19,7 +19,7 @@ describe("Binding the table widget and input Widget", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("validation of data displayed in input widgets based on selected row", function() {
|
||||
it("validation of data displayed in input widgets based on selected row", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.testJsontext("defaultselectedrow", "2");
|
||||
cy.readTabledataPublish("2", "0").then((tabData) => {
|
||||
|
|
|
|||
|
|
@ -3,17 +3,17 @@ const dsl = require("../../../../fixtures/tableTextPaginationDsl.json");
|
|||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
const widgetsPage = require("../../../../locators/Widgets.json");
|
||||
|
||||
describe("Test Create Api and Bind to Table widget", function() {
|
||||
describe("Test Create Api and Bind to Table widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Create an API and Execute the API and bind with Table", function() {
|
||||
it("1. Create an API and Execute the API and bind with Table", function () {
|
||||
cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam);
|
||||
cy.RunAPI();
|
||||
});
|
||||
|
||||
it("2. Validate Table with API data and then add a column", function() {
|
||||
it("2. Validate Table with API data and then add a column", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.testJsontext("tabledata", "{{Api1.data}}");
|
||||
cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox);
|
||||
|
|
@ -42,38 +42,32 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
cy.closePropertyPane();
|
||||
});
|
||||
|
||||
it("3. Check Image alignment is working as expected", function() {
|
||||
it("3. Check Image alignment is working as expected", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.editColumn("avatar");
|
||||
cy.changeColumnType("Image", false);
|
||||
cy.closePropertyPane();
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.get(widgetsPage.centerAlign)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.centerAlign).first().click({ force: true });
|
||||
cy.closePropertyPane();
|
||||
cy.get(`.t--widget-tablewidget .tbody .image-cell`)
|
||||
.first()
|
||||
.should("have.css", "background-position", "50% 50%");
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.get(widgetsPage.rightAlign)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.rightAlign).first().click({ force: true });
|
||||
cy.closePropertyPane();
|
||||
cy.get(`.t--widget-tablewidget .tbody .image-cell`)
|
||||
.first()
|
||||
.should("have.css", "background-position", "100% 50%");
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.get(widgetsPage.leftAlign)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.leftAlign).first().click({ force: true });
|
||||
cy.closePropertyPane();
|
||||
cy.get(`.t--widget-tablewidget .tbody .image-cell`)
|
||||
.first()
|
||||
.should("have.css", "background-position", "0% 50%");
|
||||
});
|
||||
|
||||
it("4. Update table json data and check the derived column values after update", function() {
|
||||
it("4. Update table json data and check the derived column values after update", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.backFromPropertyPanel();
|
||||
cy.tableColumnDataValidation("id");
|
||||
|
|
|
|||
|
|
@ -1,27 +1,23 @@
|
|||
const commonlocators = require("../../../../locators/commonlocators.json");
|
||||
const dsl = require("../../../../fixtures/tableTextPaginationDsl.json");
|
||||
|
||||
describe("Test Create Api and Bind to Table widget", function() {
|
||||
describe("Test Create Api and Bind to Table widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Create an API and Execute the API and bind with Table", function() {
|
||||
it("1. Create an API and Execute the API and bind with Table", function () {
|
||||
cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam);
|
||||
cy.RunAPI();
|
||||
});
|
||||
|
||||
it("2. Validate Table with API data and then add a column", function() {
|
||||
it("2. Validate Table with API data and then add a column", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.testJsontext("tabledata", "{{Api1.data.users}}");
|
||||
cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox);
|
||||
cy.get(`.t--widget-tablewidget .page-item`)
|
||||
.first()
|
||||
.should("contain", "1");
|
||||
cy.get(`.t--widget-tablewidget .page-item`).first().should("contain", "1");
|
||||
cy.intercept("/api/v1/actions/execute").as("getNextPage");
|
||||
cy.get(`.t--widget-tablewidget .t--table-widget-next-page`)
|
||||
.first()
|
||||
.click();
|
||||
cy.get(`.t--widget-tablewidget .t--table-widget-next-page`).first().click();
|
||||
cy.wait("@getNextPage").then((interception) => {
|
||||
const hasPaginationField = interception.request.body.includes(
|
||||
'"paginationField":"NEXT"',
|
||||
|
|
@ -29,9 +25,7 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
expect(hasPaginationField).to.equal(true);
|
||||
});
|
||||
cy.wait(2000);
|
||||
cy.get(`.t--widget-tablewidget .page-item`)
|
||||
.first()
|
||||
.should("contain", "2");
|
||||
cy.get(`.t--widget-tablewidget .page-item`).first().should("contain", "2");
|
||||
cy.closePropertyPane();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
const dsl = require("../../../../fixtures/tableV2WidgetDsl.json");
|
||||
|
||||
describe("Test Create Api and Bind to Table widget V2", function() {
|
||||
describe("Test Create Api and Bind to Table widget V2", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Test_Add users api, execute it and go to sniping mode.", function() {
|
||||
it("1. Test_Add users api, execute it and go to sniping mode.", function () {
|
||||
cy.createAndFillApi(this.data.userApi, "/mock-api?records=10");
|
||||
cy.RunAPI();
|
||||
cy.get(".t--select-in-canvas").click();
|
||||
cy.get(".t--sniping-mode-banner").should("be.visible");
|
||||
});
|
||||
|
||||
it("2. Click on table name controller to bind the data and exit sniping mode", function() {
|
||||
it("2. Click on table name controller to bind the data and exit sniping mode", function () {
|
||||
cy.get(".t--draggable-tablewidgetv2").trigger("mouseover");
|
||||
cy.get(".t--settings-sniping-control").click();
|
||||
cy.get(".t--property-control-tabledata .CodeMirror").contains(
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
const dsl = require("../../../../fixtures/tableWidgetDsl.json");
|
||||
|
||||
describe("Test Create Api and Bind to Table widget", function() {
|
||||
describe("Test Create Api and Bind to Table widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Test_Add users api, execute it and go to sniping mode.", function() {
|
||||
it("Test_Add users api, execute it and go to sniping mode.", function () {
|
||||
cy.createAndFillApi(this.data.userApi, "/mock-api?records=10");
|
||||
cy.RunAPI();
|
||||
cy.get(".t--select-in-canvas").click();
|
||||
cy.get(".t--sniping-mode-banner").should("be.visible");
|
||||
});
|
||||
|
||||
it("Click on table name controller to bind the data and exit sniping mode", function() {
|
||||
it("Click on table name controller to bind the data and exit sniping mode", function () {
|
||||
cy.get(".t--draggable-tablewidget").trigger("mouseover");
|
||||
cy.get(".t--settings-sniping-control").click();
|
||||
cy.get(".t--property-control-tabledata .CodeMirror").contains(
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ const commonlocators = require("../../../../locators/commonlocators.json");
|
|||
const dsl = require("../../../../fixtures/tableWidgetDsl.json");
|
||||
import apiPage from "../../../../locators/ApiEditor";
|
||||
|
||||
describe("Test Create Api and Bind to Table widget", function() {
|
||||
describe("Test Create Api and Bind to Table widget", function () {
|
||||
let apiData;
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Test_Add users api and execute api", function() {
|
||||
it("1. Test_Add users api and execute api", function () {
|
||||
cy.createAndFillApi(this.data.userApi, "/mock-api?records=10");
|
||||
cy.RunAPI();
|
||||
cy.get(apiPage.jsonResponseTab).click();
|
||||
|
|
@ -25,7 +25,7 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("2. Test_Validate the Api data is updated on Table widget", function() {
|
||||
it("2. Test_Validate the Api data is updated on Table widget", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
//cy.openPropertyPane("tablewidget");
|
||||
cy.testJsontext("tabledata", "{{ Api1.data}}");
|
||||
|
|
@ -47,14 +47,12 @@ describe("Test Create Api and Bind to Table widget", function() {
|
|||
cy.get(commonlocators.backToEditor).click();
|
||||
});
|
||||
|
||||
it("3. Validate onSearchTextChanged function is called when configured for search text", function() {
|
||||
it("3. Validate onSearchTextChanged function is called when configured for search text", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.togglebarDisable(
|
||||
".t--property-control-enableclientsidesearch input[type='checkbox']",
|
||||
);
|
||||
cy.get(".t--widget-tablewidget .t--search-input")
|
||||
.first()
|
||||
.type("Currey");
|
||||
cy.get(".t--widget-tablewidget .t--search-input").first().type("Currey");
|
||||
cy.wait("@postExecute").then((interception) => {
|
||||
apiData = JSON.stringify(interception.response.body.data.body[0].name);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const commonlocators = require("../../../../locators/commonlocators.json");
|
|||
const dsl = require("../../../../fixtures/tableV2WidgetDsl.json");
|
||||
import apiPage from "../../../../locators/ApiEditor";
|
||||
|
||||
describe("Test Create Api and Bind to Table widget V2", function() {
|
||||
describe("Test Create Api and Bind to Table widget V2", function () {
|
||||
let apiData;
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
it("1. Test_Add users api and execute api", function() {
|
||||
it("1. Test_Add users api and execute api", function () {
|
||||
cy.createAndFillApi(this.data.userApi, "/mock-api?records=100");
|
||||
cy.RunAPI();
|
||||
cy.get(apiPage.jsonResponseTab).click();
|
||||
|
|
@ -24,7 +24,7 @@ describe("Test Create Api and Bind to Table widget V2", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("2. Test_Validate the Api data is updated on Table widget", function() {
|
||||
it("2. Test_Validate the Api data is updated on Table widget", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.testJsontext("tabledata", "{{Api1.data}}");
|
||||
|
|
@ -46,15 +46,13 @@ describe("Test Create Api and Bind to Table widget V2", function() {
|
|||
cy.get(commonlocators.backToEditor).click();
|
||||
});
|
||||
|
||||
it("3. Validate onSearchTextChanged function is called when configured for search text", function() {
|
||||
it("3. Validate onSearchTextChanged function is called when configured for search text", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.togglebarDisable(
|
||||
".t--property-control-clientsidesearch input[type='checkbox']",
|
||||
);
|
||||
cy.get(".t--widget-tablewidgetv2 .t--search-input")
|
||||
.first()
|
||||
.type("Currey");
|
||||
cy.get(".t--widget-tablewidgetv2 .t--search-input").first().type("Currey");
|
||||
cy.wait("@postExecute").then((interception) => {
|
||||
apiData = JSON.stringify(interception.response.body.data.body[0].name);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the Table and input Widget", function() {
|
||||
describe("Binding the Table and input Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Input widget test with default value from table widget", function() {
|
||||
it("1. Input widget test with default value from table widget", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ describe("Binding the Table and input Widget", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("2. validation of data displayed in input widgets based on search value set", function() {
|
||||
it("2. validation of data displayed in input widgets based on search value set", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.get(".t--property-control-allowsearching input").click({ force: true });
|
||||
cy.testJsontext("defaultsearchtext", "2736212");
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the Table and input Widget", function() {
|
||||
describe("Binding the Table and input Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Input widget test with default value from table widget", function() {
|
||||
it("Input widget test with default value from table widget", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ describe("Binding the Table and input Widget", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("validation of data displayed in input widgets based on search value set", function() {
|
||||
it("validation of data displayed in input widgets based on search value set", function () {
|
||||
cy.SearchEntityandOpen("Table1");
|
||||
cy.testJsontext("defaultsearchtext", "2736212");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
const dsl = require("../../../../fixtures/buttonGroupDsl.json");
|
||||
const commonlocators = require("../../../../locators/commonlocators.json");
|
||||
|
||||
describe("Widget Grouping", function() {
|
||||
describe("Widget Grouping", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
it("Button widgets widget on click info message valdiation with font family", function() {
|
||||
it("Button widgets widget on click info message valdiation with font family", function () {
|
||||
cy.get(".t--buttongroup-widget button")
|
||||
.contains("Add")
|
||||
.click({ force: true });
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ const widgetsPage = require("../../../../locators/Widgets.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the button Widgets and validating NavigateTo Page functionality", function() {
|
||||
describe("Binding the button Widgets and validating NavigateTo Page functionality", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Button widget with action navigate to page", function() {
|
||||
it("Button widget with action navigate to page", function () {
|
||||
cy.openPropertyPane("buttonwidget");
|
||||
cy.get(widgetsPage.actionSelect).click();
|
||||
cy.get(commonlocators.chooseAction)
|
||||
|
|
@ -28,7 +28,7 @@ describe("Binding the button Widgets and validating NavigateTo Page functionalit
|
|||
cy.wait(300);
|
||||
});
|
||||
|
||||
it("Button click should take the control to page link validation", function() {
|
||||
it("Button click should take the control to page link validation", function () {
|
||||
cy.PublishtheApp();
|
||||
cy.wait(2000);
|
||||
cy.get(publish.buttonWidget).click();
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ const viewWidgetsPage = require("../../../../locators/ViewWidgets.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const dsl = require("../../../../fixtures/ChartTextDsl.json");
|
||||
|
||||
describe("Text-Chart Binding Functionality", function() {
|
||||
describe("Text-Chart Binding Functionality", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
it("Text-Chart Binding Functionality View", function() {
|
||||
it("Text-Chart Binding Functionality View", function () {
|
||||
cy.openPropertyPane("textwidget");
|
||||
cy.testJsontext("text", JSON.stringify(this.data.chartInputValidate));
|
||||
cy.get(commonlocators.TextInside).should(
|
||||
|
|
@ -16,13 +16,8 @@ describe("Text-Chart Binding Functionality", function() {
|
|||
);
|
||||
cy.closePropertyPane();
|
||||
cy.openPropertyPane("chartwidget");
|
||||
cy.get(viewWidgetsPage.chartType)
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(".t--dropdown-option")
|
||||
.children()
|
||||
.contains("Column Chart")
|
||||
.click();
|
||||
cy.get(viewWidgetsPage.chartType).last().click({ force: true });
|
||||
cy.get(".t--dropdown-option").children().contains("Column Chart").click();
|
||||
cy.get(" .t--property-control-charttype .bp3-popover-target")
|
||||
.last()
|
||||
.should("have.text", "Column Chart");
|
||||
|
|
@ -37,13 +32,11 @@ describe("Text-Chart Binding Functionality", function() {
|
|||
cy.get(viewWidgetsPage.rectangleChart)
|
||||
.eq(k)
|
||||
.trigger("mousemove", { force: true });
|
||||
cy.get(viewWidgetsPage.Chartlabel)
|
||||
.eq(k)
|
||||
.should("have.text", labels[k]);
|
||||
cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]);
|
||||
});
|
||||
cy.PublishtheApp();
|
||||
});
|
||||
it("Text-Chart Binding Functionality Publish", function() {
|
||||
it("Text-Chart Binding Functionality Publish", function () {
|
||||
cy.get(publish.chartCanvasVal).should("be.visible");
|
||||
cy.get(publish.chartWidget).should("have.css", "opacity", "1");
|
||||
const labels = [
|
||||
|
|
@ -52,12 +45,8 @@ describe("Text-Chart Binding Functionality", function() {
|
|||
this.data.Chartval[2],
|
||||
];
|
||||
[0, 1, 2].forEach((k) => {
|
||||
cy.get(publish.rectChart)
|
||||
.eq(k)
|
||||
.trigger("mousemove", { force: true });
|
||||
cy.get(publish.chartLab)
|
||||
.eq(k)
|
||||
.should("have.text", labels[k]);
|
||||
cy.get(publish.rectChart).eq(k).trigger("mousemove", { force: true });
|
||||
cy.get(publish.chartLab).eq(k).should("have.text", labels[k]);
|
||||
});
|
||||
cy.get(commonlocators.TextInside).should(
|
||||
"have.text",
|
||||
|
|
|
|||
|
|
@ -1,19 +1,15 @@
|
|||
const dsl = require("../../../../fixtures/SimpleBinding.json");
|
||||
const widgetsPage = require("../../../../locators/Widgets.json");
|
||||
|
||||
describe("Binding the multiple widgets and validating default data", function() {
|
||||
describe("Binding the multiple widgets and validating default data", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Checks if delete will remove bindings", function() {
|
||||
cy.get(widgetsPage.textWidget)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
it("Checks if delete will remove bindings", function () {
|
||||
cy.get(widgetsPage.textWidget).first().click({ force: true });
|
||||
cy.get("body").type("{del}", { force: true });
|
||||
|
||||
cy.get(widgetsPage.textWidget)
|
||||
.first()
|
||||
.should("not.have.text", "Label");
|
||||
cy.get(widgetsPage.textWidget).first().should("not.have.text", "Label");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const pageid = "MyPage";
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
const agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Binding the multiple Widgets and validating NavigateTo Page", function() {
|
||||
describe("Binding the multiple Widgets and validating NavigateTo Page", function () {
|
||||
afterEach(() => {
|
||||
agHelper.SaveLocalStorageCache();
|
||||
});
|
||||
|
|
@ -24,7 +24,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function
|
|||
cy.wait(5000); //dsl to settle!
|
||||
});
|
||||
|
||||
it("1. Create MyPage and valdiate if its successfully created", function() {
|
||||
it("1. Create MyPage and valdiate if its successfully created", function () {
|
||||
cy.Createpage(pageid);
|
||||
cy.addDsl(dsl2);
|
||||
cy.wait(5000); //dsl to settle!
|
||||
|
|
@ -34,15 +34,13 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function
|
|||
cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible");
|
||||
});
|
||||
|
||||
it("2. Input widget test with default value from table widget", function() {
|
||||
it("2. Input widget test with default value from table widget", function () {
|
||||
cy.get(`.t--entity-name:contains("Page1")`)
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
cy.openPropertyPane("inputwidgetv2");
|
||||
cy.get(widgetsPage.defaultInput).type(testdata.defaultInputWidget);
|
||||
cy.get(widgetsPage.inputOnTextChange)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.inputOnTextChange).first().click({ force: true });
|
||||
cy.get(commonlocators.chooseAction)
|
||||
.children()
|
||||
.contains("Navigate to")
|
||||
|
|
@ -54,7 +52,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function
|
|||
cy.assertPageSave();
|
||||
});
|
||||
|
||||
it("3. Validate NavigateTo Page functionality ", function() {
|
||||
it("3. Validate NavigateTo Page functionality ", function () {
|
||||
cy.wait(4000);
|
||||
cy.isSelectRow(1);
|
||||
cy.readTabledataPublish("1", "0").then((tabData) => {
|
||||
|
|
@ -66,10 +64,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function
|
|||
.invoke("attr", "value")
|
||||
.should("contain", tabValue);
|
||||
cy.get(widgetsPage.chartWidget).should("not.exist");
|
||||
cy.get(publish.inputGrp)
|
||||
.first()
|
||||
.type("123")
|
||||
.wait(2000);
|
||||
cy.get(publish.inputGrp).first().type("123").wait(2000);
|
||||
cy.waitUntil(() => cy.get(widgetsPage.chartWidget).should("be.visible"), {
|
||||
errorMsg: "Execute call did not complete evn after 20 secs",
|
||||
timeout: 20000,
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
const dsl = require("../../../../fixtures/Invalid_binding_dsl.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the multiple widgets and validating default data", function() {
|
||||
describe("Binding the multiple widgets and validating default data", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Dropdown widget test with invalid binding value", function() {
|
||||
it("Dropdown widget test with invalid binding value", function () {
|
||||
cy.openPropertyPane("selectwidget");
|
||||
cy.testJsontext("options", JSON.stringify(testdata.defaultdataBinding));
|
||||
cy.evaluateErrorMessage(testdata.dropdownErrorMsg);
|
||||
});
|
||||
|
||||
it("Table widget test with invalid binding value", function() {
|
||||
it("Table widget test with invalid binding value", function () {
|
||||
cy.openPropertyPane("tablewidget");
|
||||
cy.testJsontext("tabledata", JSON.stringify(testdata.defaultdataBinding));
|
||||
cy.evaluateErrorMessage(testdata.tableWidgetErrorMsg);
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ describe("Validate JSObjects binding to Input widget", () => {
|
|||
|
||||
let jsOjbNameReceived: any;
|
||||
|
||||
it("1. Bind Input widget with JSObject", function() {
|
||||
jsEditor.CreateJSObject(`export default {
|
||||
it("1. Bind Input widget with JSObject", function () {
|
||||
jsEditor.CreateJSObject(
|
||||
`export default {
|
||||
myVar1: [],
|
||||
myVar2: {},
|
||||
myFun1: () => {
|
||||
|
|
@ -26,12 +27,14 @@ describe("Validate JSObjects binding to Input widget", () => {
|
|||
myFun2: async () => {
|
||||
//use async-await or promises
|
||||
}
|
||||
}`, {
|
||||
paste: true,
|
||||
completeReplace: true,
|
||||
toRun: true,
|
||||
shouldCreateNewJSObj: true,
|
||||
});
|
||||
}`,
|
||||
{
|
||||
paste: true,
|
||||
completeReplace: true,
|
||||
toRun: true,
|
||||
shouldCreateNewJSObj: true,
|
||||
},
|
||||
);
|
||||
ee.ExpandCollapseEntity("Widgets"); //to expand widgets
|
||||
ee.ExpandCollapseEntity("Form1");
|
||||
ee.SelectEntityByName("Input2");
|
||||
|
|
@ -41,7 +44,10 @@ describe("Validate JSObjects binding to Input widget", () => {
|
|||
.should("equal", "Hello"); //Before mapping JSObject value of input
|
||||
cy.get("@jsObjName").then((jsObjName) => {
|
||||
jsOjbNameReceived = jsObjName;
|
||||
propPane.UpdatePropertyFieldValue("Default Value", "{{" + jsObjName + ".myFun1()}}");
|
||||
propPane.UpdatePropertyFieldValue(
|
||||
"Default Value",
|
||||
"{{" + jsObjName + ".myFun1()}}",
|
||||
);
|
||||
});
|
||||
cy.get(locator._inputWidget)
|
||||
.last()
|
||||
|
|
@ -65,7 +71,7 @@ describe("Validate JSObjects binding to Input widget", () => {
|
|||
// });
|
||||
});
|
||||
|
||||
it("2. Bug 11529 - Verify autosave while editing JSObj & reference changes when JSObj is mapped", function() {
|
||||
it("2. Bug 11529 - Verify autosave while editing JSObj & reference changes when JSObj is mapped", function () {
|
||||
const jsBody = `export default {
|
||||
myVar1: [],
|
||||
myVar2: {},
|
||||
|
|
@ -81,9 +87,16 @@ describe("Validate JSObjects binding to Input widget", () => {
|
|||
ee.ExpandCollapseEntity("Widgets");
|
||||
ee.ExpandCollapseEntity("Form1");
|
||||
ee.SelectEntityByName("Input2");
|
||||
cy.get(locator._inputWidget).last().invoke("attr", "value").should("equal", 'Success'); //Function is renamed & reference is checked if updated properly!
|
||||
deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2"))
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2")).first().should('have.value', 'Hello')
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2")).last().should('have.value', 'Success')
|
||||
cy.get(locator._inputWidget)
|
||||
.last()
|
||||
.invoke("attr", "value")
|
||||
.should("equal", "Success"); //Function is renamed & reference is checked if updated properly!
|
||||
deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2"));
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2"))
|
||||
.first()
|
||||
.should("have.value", "Hello");
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2"))
|
||||
.last()
|
||||
.should("have.value", "Success");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,22 +1,21 @@
|
|||
import * as _ from "../../../../support/Objects/ObjectsCore";
|
||||
let dataSet: any, valueToTest: any, jsName: any;
|
||||
|
||||
|
||||
describe("Validate JSObj binding to Table widget", () => {
|
||||
before(() => {
|
||||
cy.fixture("listwidgetdsl").then((val: any) => {
|
||||
_.agHelper.AddDsl(val);
|
||||
});
|
||||
|
||||
cy.fixture("example").then(function(data: any) {
|
||||
cy.fixture("example").then(function (data: any) {
|
||||
dataSet = data;
|
||||
});
|
||||
});
|
||||
|
||||
it("1. Add users api and bind to JSObject", () => {
|
||||
cy.fixture("datasources").then((datasourceFormData : any) => {
|
||||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
||||
_.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]);
|
||||
})
|
||||
});
|
||||
_.apiPage.RunAPI();
|
||||
_.agHelper.GetNClick(_.dataSources._queryResponse("JSON"));
|
||||
_.apiPage.ReadApiResponsebyKey("name");
|
||||
|
|
@ -38,7 +37,7 @@ describe("Validate JSObj binding to Table widget", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("2. Validate the Api data is updated on List widget + Bug 12438", function() {
|
||||
it("2. Validate the Api data is updated on List widget + Bug 12438", function () {
|
||||
_.entityExplorer.SelectEntityByName("List1", "Widgets");
|
||||
_.propPane.UpdatePropertyFieldValue(
|
||||
"Items",
|
||||
|
|
@ -74,7 +73,7 @@ describe("Validate JSObj binding to Table widget", () => {
|
|||
_.deployMode.NavigateBacktoEditor();
|
||||
});
|
||||
|
||||
it("3. Validate the List widget + Bug 12438 ", function() {
|
||||
it("3. Validate the List widget + Bug 12438 ", function () {
|
||||
_.entityExplorer.SelectEntityByName("List1", "Widgets");
|
||||
_.propPane.moveToStyleTab();
|
||||
_.propPane.UpdatePropertyFieldValue("Item Spacing (px)", "50");
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ describe("JS Toggle tests", () => {
|
|||
|
||||
it("switches the toggle to Button widget", () => {
|
||||
cy.openPropertyPane("buttonwidget");
|
||||
cy.get(".t--property-control-visible")
|
||||
.find(".t--js-toggle")
|
||||
.click();
|
||||
cy.get(".t--property-control-visible").find(".t--js-toggle").click();
|
||||
|
||||
cy.get(".t--property-control-visible")
|
||||
.find(".t--js-toggle")
|
||||
|
|
@ -21,9 +19,7 @@ describe("JS Toggle tests", () => {
|
|||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
|
||||
cy.get(".t--property-control-visible")
|
||||
.find(".t--js-toggle")
|
||||
.click();
|
||||
cy.get(".t--property-control-visible").find(".t--js-toggle").click();
|
||||
|
||||
cy.get(".t--property-control-visible")
|
||||
.find(".t--js-toggle")
|
||||
|
|
|
|||
|
|
@ -1,41 +1,50 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry"
|
||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
|
||||
let dataSet: any;
|
||||
let agHelper = ObjectsRegistry.AggregateHelper,
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
propPane = ObjectsRegistry.PropertyPane,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
propPane = ObjectsRegistry.PropertyPane,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
|
||||
describe("Loadash basic test with input Widget", () => {
|
||||
|
||||
before(() => {
|
||||
cy.fixture('inputBindingdsl').then((val: any) => {
|
||||
agHelper.AddDsl(val)
|
||||
});
|
||||
|
||||
cy.fixture("testdata").then(function (data: any) {
|
||||
dataSet = data;
|
||||
});
|
||||
before(() => {
|
||||
cy.fixture("inputBindingdsl").then((val: any) => {
|
||||
agHelper.AddDsl(val);
|
||||
});
|
||||
|
||||
it("1. Input widget test with default value for atob method", () => {
|
||||
ee.SelectEntityByName("Input1", 'Widgets')
|
||||
propPane.UpdatePropertyFieldValue("Default Value", dataSet.defaultInputBinding + "}}");
|
||||
agHelper.ValidateNetworkStatus('@updateLayout')
|
||||
cy.fixture("testdata").then(function (data: any) {
|
||||
dataSet = data;
|
||||
});
|
||||
});
|
||||
|
||||
it("2. Input widget test with default value for btoa method", function () {
|
||||
ee.SelectEntityByName("Input2")
|
||||
propPane.UpdatePropertyFieldValue("Default Value", dataSet.loadashInput + "}}");
|
||||
agHelper.ValidateNetworkStatus('@updateLayout')
|
||||
});
|
||||
it("1. Input widget test with default value for atob method", () => {
|
||||
ee.SelectEntityByName("Input1", "Widgets");
|
||||
propPane.UpdatePropertyFieldValue(
|
||||
"Default Value",
|
||||
dataSet.defaultInputBinding + "}}",
|
||||
);
|
||||
agHelper.ValidateNetworkStatus("@updateLayout");
|
||||
});
|
||||
|
||||
it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () {
|
||||
deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2"))
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2")).first().invoke("attr", "value")
|
||||
.should("contain", "7")
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2")).last().invoke("attr", "value")
|
||||
.should("contain", "7");
|
||||
});
|
||||
});
|
||||
it("2. Input widget test with default value for btoa method", function () {
|
||||
ee.SelectEntityByName("Input2");
|
||||
propPane.UpdatePropertyFieldValue(
|
||||
"Default Value",
|
||||
dataSet.loadashInput + "}}",
|
||||
);
|
||||
agHelper.ValidateNetworkStatus("@updateLayout");
|
||||
});
|
||||
|
||||
it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () {
|
||||
deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2"));
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2"))
|
||||
.first()
|
||||
.invoke("attr", "value")
|
||||
.should("contain", "7");
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2"))
|
||||
.last()
|
||||
.invoke("attr", "value")
|
||||
.should("contain", "7");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,42 +1,49 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry"
|
||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
|
||||
let dataSet: any;
|
||||
let agHelper = ObjectsRegistry.AggregateHelper,
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
propPane = ObjectsRegistry.PropertyPane,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
propPane = ObjectsRegistry.PropertyPane,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
|
||||
describe("Validate basic binding of Input widget to Input widget", () => {
|
||||
|
||||
before(() => {
|
||||
cy.fixture('inputBindingdsl').then((val: any) => {
|
||||
agHelper.AddDsl(val)
|
||||
});
|
||||
|
||||
cy.fixture("testdata").then(function (data: any) {
|
||||
dataSet = data;
|
||||
});
|
||||
before(() => {
|
||||
cy.fixture("inputBindingdsl").then((val: any) => {
|
||||
agHelper.AddDsl(val);
|
||||
});
|
||||
|
||||
it("1. Input widget test with default value from another Input widget", () => {
|
||||
ee.SelectEntityByName("Input1", 'Widgets')
|
||||
propPane.UpdatePropertyFieldValue("Default Value", dataSet.defaultInputBinding + "}}");
|
||||
agHelper.ValidateNetworkStatus('@updateLayout')
|
||||
cy.fixture("testdata").then(function (data: any) {
|
||||
dataSet = data;
|
||||
});
|
||||
});
|
||||
|
||||
it("2. Binding second input widget with first input widget and validating", function () {
|
||||
ee.SelectEntityByName("Input2")
|
||||
propPane.UpdatePropertyFieldValue("Default Value", dataSet.momentInput + "}}");
|
||||
agHelper.ValidateNetworkStatus('@updateLayout')
|
||||
});
|
||||
it("1. Input widget test with default value from another Input widget", () => {
|
||||
ee.SelectEntityByName("Input1", "Widgets");
|
||||
propPane.UpdatePropertyFieldValue(
|
||||
"Default Value",
|
||||
dataSet.defaultInputBinding + "}}",
|
||||
);
|
||||
agHelper.ValidateNetworkStatus("@updateLayout");
|
||||
});
|
||||
|
||||
it("3. Publish widget and validate the data displayed in input widgets", function () {
|
||||
var currentTime = new Date();
|
||||
deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2"))
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2")).first()
|
||||
.should("contain.value", currentTime.getFullYear());
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2")).last()
|
||||
.should("contain.value", currentTime.getFullYear());
|
||||
});
|
||||
});
|
||||
it("2. Binding second input widget with first input widget and validating", function () {
|
||||
ee.SelectEntityByName("Input2");
|
||||
propPane.UpdatePropertyFieldValue(
|
||||
"Default Value",
|
||||
dataSet.momentInput + "}}",
|
||||
);
|
||||
agHelper.ValidateNetworkStatus("@updateLayout");
|
||||
});
|
||||
|
||||
it("3. Publish widget and validate the data displayed in input widgets", function () {
|
||||
var currentTime = new Date();
|
||||
deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2"));
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2"))
|
||||
.first()
|
||||
.should("contain.value", currentTime.getFullYear());
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2"))
|
||||
.last()
|
||||
.should("contain.value", currentTime.getFullYear());
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const pageid = "MyPage";
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
let agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Table Widget with Input Widget and Navigate to functionality validation", function() {
|
||||
describe("Table Widget with Input Widget and Navigate to functionality validation", function () {
|
||||
beforeEach(() => {
|
||||
agHelper.RestoreLocalStorageCache();
|
||||
});
|
||||
|
|
@ -21,7 +21,7 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio
|
|||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Table Widget Functionality with multiple page", function() {
|
||||
it("Table Widget Functionality with multiple page", function () {
|
||||
cy.openPropertyPane("tablewidget");
|
||||
cy.widgetText(
|
||||
"Table1",
|
||||
|
|
@ -31,7 +31,7 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio
|
|||
cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination));
|
||||
});
|
||||
|
||||
it("Create MyPage and valdiate if its successfully created", function() {
|
||||
it("Create MyPage and valdiate if its successfully created", function () {
|
||||
cy.Createpage(pageid);
|
||||
cy.addDsl(dsl2);
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
|
|
@ -40,7 +40,7 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio
|
|||
cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible");
|
||||
});
|
||||
|
||||
it("Validate NavigateTo Page functionality ", function() {
|
||||
it("Validate NavigateTo Page functionality ", function () {
|
||||
cy.get(`.t--entity-name:contains("Page1")`)
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ const dsl = require("../../../../fixtures/inputdsl.json");
|
|||
const widgetsPage = require("../../../../locators/Widgets.json");
|
||||
const dynamicInput = require("../../../../locators/DynamicInput.json");
|
||||
|
||||
describe("Binding prompt", function() {
|
||||
describe("Binding prompt", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ describe("Validate basic binding of Input widget to Input widget", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("1. Validation of default displayed in Select widget based on row selected", function() {
|
||||
it("1. Validation of default displayed in Select widget based on row selected", function () {
|
||||
deployMode.DeployApp();
|
||||
|
||||
//Verify Default selected row is selected by default
|
||||
|
|
@ -46,7 +46,7 @@ describe("Validate basic binding of Input widget to Input widget", () => {
|
|||
});
|
||||
|
||||
//Till bug fixed
|
||||
it.skip("2. Validation of default displayed in Select widget based on row selected + Bug 12531", function() {
|
||||
it.skip("2. Validation of default displayed in Select widget based on row selected + Bug 12531", function () {
|
||||
table.SelectTableRow(1);
|
||||
agHelper.ReadSelectedDropDownValue().then(($selectedValue) => {
|
||||
expect($selectedValue).to.eq("#2");
|
||||
|
|
@ -75,8 +75,8 @@ describe("Validate basic binding of Input widget to Input widget", () => {
|
|||
});
|
||||
|
||||
it("3. Verify Selecting the already selected row deselects it", () => {
|
||||
table.SelectTableRow(0);//select here
|
||||
table.SelectTableRow(0, 0, false);//deselect here
|
||||
table.SelectTableRow(0); //select here
|
||||
table.SelectTableRow(0, 0, false); //deselect here
|
||||
agHelper.ReadSelectedDropDownValue().then(($selectedValue) => {
|
||||
expect($selectedValue).to.eq("Select option");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const publish = require("../../../../locators/publishWidgetspage.json");
|
|||
const dsl = require("../../../../fixtures/tableAndChart.json");
|
||||
const viewWidgetsPage = require("../../../../locators/ViewWidgets.json");
|
||||
|
||||
describe("Text-Table Binding Functionality", function() {
|
||||
describe("Text-Table Binding Functionality", function () {
|
||||
const updateData = `[
|
||||
{
|
||||
"x": "Product1",
|
||||
|
|
@ -22,7 +22,7 @@ describe("Text-Table Binding Functionality", function() {
|
|||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Update table data and assert", function() {
|
||||
it("1. Update table data and assert", function () {
|
||||
cy.openPropertyPane("tablewidget");
|
||||
cy.get(widgetLocators.tabedataField).then(($el) => {
|
||||
cy.updateCodeInput($el, updateData);
|
||||
|
|
@ -32,7 +32,7 @@ describe("Text-Table Binding Functionality", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("2. Update chart data and assert", function() {
|
||||
it("2. Update chart data and assert", function () {
|
||||
cy.openPropertyPane("chartwidget");
|
||||
cy.get(".t--property-control-chart-series-data-control").then(($el) => {
|
||||
cy.updateCodeInput($el, updateData);
|
||||
|
|
@ -48,7 +48,7 @@ describe("Text-Table Binding Functionality", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("3. Publish and assert", function() {
|
||||
it("3. Publish and assert", function () {
|
||||
cy.PublishtheApp(false);
|
||||
cy.readTabledata("1", "0").then((cellData) => {
|
||||
cy.wrap(cellData).should("equal", "Product2");
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const pageid = "MyPage";
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
const agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Table Widget V2 and Navigate to functionality validation", function() {
|
||||
describe("Table Widget V2 and Navigate to functionality validation", function () {
|
||||
afterEach(() => {
|
||||
agHelper.SaveLocalStorageCache();
|
||||
});
|
||||
|
|
@ -22,7 +22,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function()
|
|||
cy.wait(2000); //dsl to settle!
|
||||
});
|
||||
|
||||
it("1. Create MyPage and validate if its successfully created", function() {
|
||||
it("1. Create MyPage and validate if its successfully created", function () {
|
||||
cy.Createpage(pageid);
|
||||
cy.addDsl(dsl2);
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
|
|
@ -31,7 +31,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function()
|
|||
cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible");
|
||||
});
|
||||
|
||||
it("2. Table Widget V2 Functionality with multiple page", function() {
|
||||
it("2. Table Widget V2 Functionality with multiple page", function () {
|
||||
cy.get(`.t--entity-name:contains("Page1")`)
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
|
|
@ -43,9 +43,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function()
|
|||
);
|
||||
cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination));
|
||||
cy.focused().blur();
|
||||
cy.get(widgetsPage.tableOnRowSelect)
|
||||
.scrollIntoView()
|
||||
.should("be.visible");
|
||||
cy.get(widgetsPage.tableOnRowSelect).scrollIntoView().should("be.visible");
|
||||
cy.get(widgetsPage.tableOnRowSelect).click();
|
||||
cy.get(commonlocators.chooseAction)
|
||||
.children()
|
||||
|
|
@ -58,7 +56,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function()
|
|||
cy.assertPageSave();
|
||||
});
|
||||
|
||||
it("3. Validate NavigateTo Page functionality ", function() {
|
||||
it("3. Validate NavigateTo Page functionality ", function () {
|
||||
cy.wait(2000);
|
||||
cy.PublishtheApp();
|
||||
cy.get(widgetsPage.chartWidget).should("not.exist");
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
const dsl = require("../../../../fixtures/TableV2ClientSearch.json");
|
||||
|
||||
describe("Test Create Api and Bind to Table widget V2", function() {
|
||||
describe("Test Create Api and Bind to Table widget V2", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Validate onSearchTextChanged function is called when configured for search text", function() {
|
||||
it("1. Validate onSearchTextChanged function is called when configured for search text", function () {
|
||||
cy.wait(5000);
|
||||
// input text in search bar
|
||||
cy.get(".t--widget-tablewidgetv2 .t--search-input input")
|
||||
.first()
|
||||
.type("2");
|
||||
cy.get(".t--widget-tablewidgetv2 .t--search-input input").first().type("2");
|
||||
cy.wait(5000);
|
||||
// Verify it filtered the table
|
||||
cy.readTableV2dataPublish("0", "0").then((tabData) => {
|
||||
|
|
|
|||
|
|
@ -4,18 +4,16 @@ const widgetsPage = require("../../../../locators/Widgets.json");
|
|||
const dsl = require("../../../../fixtures/tableV2NewDsl.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Table Widget V2 property pane feature validation", function() {
|
||||
describe("Table Widget V2 property pane feature validation", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Table widget V2 toggle test for text alignment", function() {
|
||||
it("1. Table widget V2 toggle test for text alignment", function () {
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.editColumn("id");
|
||||
cy.moveToStyleTab();
|
||||
cy.get(widgetsPage.toggleTextAlign)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleTextAlign).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.toggleJsAndUpdate("tabledata", testdata.bindingAlign);
|
||||
|
|
@ -24,20 +22,16 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-end");
|
||||
});
|
||||
|
||||
it("2. Table widget V2 change text size and validate", function() {
|
||||
it("2. Table widget V2 change text size and validate", function () {
|
||||
cy.readTableV2dataValidateCSS("0", "0", "font-size", "14px");
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.get(".t--property-pane-back-btn").click({ force: true });
|
||||
cy.editColumn("id");
|
||||
cy.moveToStyleTab();
|
||||
cy.get(widgetsPage.toggleTextAlign)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleTextAlign).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.get(widgetsPage.textSize)
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.textSize).last().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.selectTxtSize("XL");
|
||||
|
|
@ -45,14 +39,12 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("0", "0", "font-size", "30px");
|
||||
});
|
||||
|
||||
it("3. Table widget toggle test for text size", function() {
|
||||
it("3. Table widget toggle test for text size", function () {
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.get(".t--property-pane-back-btn").click({ force: true });
|
||||
cy.editColumn("id");
|
||||
cy.moveToStyleTab();
|
||||
cy.get(widgetsPage.toggleTextSize)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleTextSize).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingNewSize, 0);
|
||||
|
|
@ -61,19 +53,15 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "font-size", "24px");
|
||||
});
|
||||
|
||||
it("4. Table widget toggle test for vertical Alignment", function() {
|
||||
it("4. Table widget toggle test for vertical Alignment", function () {
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.get(".t--property-pane-back-btn").click({ force: true });
|
||||
cy.editColumn("id");
|
||||
cy.moveToStyleTab();
|
||||
cy.get(widgetsPage.toggleTextSize)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleTextSize).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.get(widgetsPage.toggleVerticalAlig)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleVerticalAlig).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingVerticalAlig, 2);
|
||||
|
|
@ -82,7 +70,7 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-end");
|
||||
});
|
||||
|
||||
it("5. Table widget V2 toggle test for style Alignment", function() {
|
||||
it("5. Table widget V2 toggle test for style Alignment", function () {
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.get(".t--property-pane-back-btn").click({ force: true });
|
||||
cy.editColumn("id");
|
||||
|
|
@ -94,9 +82,7 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
*/
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.get(widgetsPage.toggleTextStyle)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleTextStyle).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingStyle, 1);
|
||||
|
|
@ -105,19 +91,15 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "font-style", "italic");
|
||||
});
|
||||
|
||||
it("6. Table widget toggle test for text color", function() {
|
||||
it("6. Table widget toggle test for text color", function () {
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.get(".t--property-pane-back-btn").click({ force: true });
|
||||
cy.editColumn("id");
|
||||
cy.moveToStyleTab();
|
||||
cy.get(widgetsPage.toggleVerticalAlig)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleVerticalAlig).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.get(widgetsPage.toggleJsColor)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleJsColor).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor);
|
||||
|
|
@ -127,19 +109,15 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "color", "rgb(255, 0, 0)");
|
||||
});
|
||||
|
||||
it("7. Table widget toggle test for background color", function() {
|
||||
it("7. Table widget toggle test for background color", function () {
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.get(".t--property-pane-back-btn").click({ force: true });
|
||||
cy.editColumn("id");
|
||||
cy.moveToStyleTab();
|
||||
cy.get(widgetsPage.toggleJsColor)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleJsColor).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.get(widgetsPage.toggleJsBcgColor)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.toggleJsBcgColor).first().click({ force: true });
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(1000);
|
||||
cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingTextColor, 4);
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ const propPane = ObjectsRegistry.PropertyPane,
|
|||
ee = ObjectsRegistry.EntityExplorer,
|
||||
agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Table Widget V2 property pane feature validation", function() {
|
||||
describe("Table Widget V2 property pane feature validation", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Table widget V2 toggle test for text alignment", function() {
|
||||
it("1. Table widget V2 toggle test for text alignment", function () {
|
||||
ee.SelectEntityByName("Table1");
|
||||
cy.editColumn("id");
|
||||
cy.moveToStyleTab();
|
||||
|
|
@ -25,18 +25,16 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-end");
|
||||
});
|
||||
|
||||
it("2. Table widget V2 change text size and validate", function() {
|
||||
it("2. Table widget V2 change text size and validate", function () {
|
||||
cy.readTableV2dataValidateCSS("0", "0", "font-size", "14px");
|
||||
//cy.movetoStyleTab();
|
||||
cy.get(widgetsPage.textSize)
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.textSize).last().click({ force: true });
|
||||
agHelper.Sleep();
|
||||
cy.selectTxtSize("XL");
|
||||
cy.readTableV2dataValidateCSS("0", "0", "font-size", "30px");
|
||||
});
|
||||
|
||||
it("3. Table widget toggle test for vertical Alignment", function() {
|
||||
it("3. Table widget toggle test for vertical Alignment", function () {
|
||||
//cy.movetoStyleTab();
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Vertical Alignment", testdata.bindingVerticalAlig);
|
||||
|
|
@ -45,7 +43,7 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-end");
|
||||
});
|
||||
|
||||
it("4. Table widget toggle test for text size", function() {
|
||||
it("4. Table widget toggle test for text size", function () {
|
||||
//cy.movetoStyleTab();
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Text Size", testdata.bindingNewSize);
|
||||
|
|
@ -54,7 +52,7 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "font-size", "24px");
|
||||
});
|
||||
|
||||
it("5. Table widget V2 toggle test for style Alignment", function() {
|
||||
it("5. Table widget V2 toggle test for style Alignment", function () {
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Emphasis", testdata.bindingStyle);
|
||||
cy.wait("@updateLayout");
|
||||
|
|
@ -62,7 +60,7 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "font-style", "italic");
|
||||
});
|
||||
|
||||
it("6. Table widget toggle test for text color", function() {
|
||||
it("6. Table widget toggle test for text color", function () {
|
||||
//cy.movetoStyleTab();
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Text Color", testdata.bindingTextColor);
|
||||
|
|
@ -71,7 +69,7 @@ describe("Table Widget V2 property pane feature validation", function() {
|
|||
cy.readTableV2dataValidateCSS("1", "0", "color", "rgb(255, 0, 0)");
|
||||
});
|
||||
|
||||
it("7. Table widget toggle test for background color", function() {
|
||||
it("7. Table widget toggle test for background color", function () {
|
||||
//cy.movetoStyleTab();
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Cell Background", testdata.bindingTextColor);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/* eslint-disable cypress/no-unnecessary-waiting */
|
||||
const dsl = require("../../../../fixtures/tableV2WidgetCondnFormatDsl.json");
|
||||
|
||||
describe("Table Widget V2 condtional formatting to remain consistent", function() {
|
||||
describe("Table Widget V2 condtional formatting to remain consistent", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. check the cell styles before and after sorting", function() {
|
||||
it("1. check the cell styles before and after sorting", function () {
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
//Check Font weight, font style, and text color before sorting
|
||||
cy.readTableV2dataValidateCSS("0", "1", "font-weight", "700");
|
||||
|
|
@ -15,9 +15,7 @@ describe("Table Widget V2 condtional formatting to remain consistent", function(
|
|||
cy.readTableV2dataValidateCSS("1", "1", "font-weight", "400");
|
||||
cy.readTableV2dataValidateCSS("1", "1", "font-style", "italic");
|
||||
cy.readTableV2dataValidateCSS("1", "1", "color", "rgb(255, 0, 0)");
|
||||
cy.get(".draggable-header")
|
||||
.contains("id")
|
||||
.click({ force: true });
|
||||
cy.get(".draggable-header").contains("id").click({ force: true });
|
||||
//Check Font weight, font style, and text color after sorting
|
||||
cy.readTableV2dataValidateCSS("3", "1", "font-weight", "700");
|
||||
cy.readTableV2dataValidateCSS("3", "1", "font-style", "normal");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const pageid = "MyPage";
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
const agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Table Widget and Navigate to functionality validation", function() {
|
||||
describe("Table Widget and Navigate to functionality validation", function () {
|
||||
afterEach(() => {
|
||||
agHelper.SaveLocalStorageCache();
|
||||
});
|
||||
|
|
@ -21,7 +21,7 @@ describe("Table Widget and Navigate to functionality validation", function() {
|
|||
cy.wait(2000); //dsl to settle!
|
||||
});
|
||||
|
||||
it("Create MyPage and valdiate if its successfully created", function() {
|
||||
it("Create MyPage and valdiate if its successfully created", function () {
|
||||
cy.Createpage(pageid);
|
||||
cy.addDsl(dsl2);
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
|
|
@ -30,7 +30,7 @@ describe("Table Widget and Navigate to functionality validation", function() {
|
|||
cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible");
|
||||
});
|
||||
|
||||
it("Table Widget Functionality with multiple page", function() {
|
||||
it("Table Widget Functionality with multiple page", function () {
|
||||
cy.get(`.t--entity-name:contains("Page1")`)
|
||||
.should("be.visible")
|
||||
.click({ force: true });
|
||||
|
|
@ -42,9 +42,7 @@ describe("Table Widget and Navigate to functionality validation", function() {
|
|||
);
|
||||
cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination));
|
||||
cy.focused().blur();
|
||||
cy.get(widgetsPage.tableOnRowSelect)
|
||||
.scrollIntoView()
|
||||
.click();
|
||||
cy.get(widgetsPage.tableOnRowSelect).scrollIntoView().click();
|
||||
cy.get(commonlocators.chooseAction)
|
||||
.children()
|
||||
.contains("Navigate to")
|
||||
|
|
@ -56,7 +54,7 @@ describe("Table Widget and Navigate to functionality validation", function() {
|
|||
cy.assertPageSave();
|
||||
});
|
||||
|
||||
it("Validate NavigateTo Page functionality ", function() {
|
||||
it("Validate NavigateTo Page functionality ", function () {
|
||||
cy.wait(2000);
|
||||
cy.PublishtheApp();
|
||||
cy.get(widgetsPage.chartWidget).should("not.exist");
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
const dsl = require("../../../../fixtures/TableClientSearch.json");
|
||||
|
||||
describe("Test Create Api and Bind to Table widget", function() {
|
||||
describe("Test Create Api and Bind to Table widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Validate onSearchTextChanged function is called when configured for search text", function() {
|
||||
it("Validate onSearchTextChanged function is called when configured for search text", function () {
|
||||
cy.wait(5000);
|
||||
// input text in search bar
|
||||
cy.get(".t--widget-tablewidget .t--search-input input")
|
||||
.first()
|
||||
.type("2");
|
||||
cy.get(".t--widget-tablewidget .t--search-input input").first().type("2");
|
||||
cy.wait(5000);
|
||||
// Verify it filtered the table
|
||||
cy.readTabledataPublish("0", "0").then((tabData) => {
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ const propPane = ObjectsRegistry.PropertyPane,
|
|||
ee = ObjectsRegistry.EntityExplorer,
|
||||
agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Table Widget property pane feature validation", function() {
|
||||
describe("Table Widget property pane feature validation", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Table widget toggle test for text alignment", function() {
|
||||
it("1. Table widget toggle test for text alignment", function () {
|
||||
ee.SelectEntityByName("Table1");
|
||||
cy.editColumn("id");
|
||||
//cy.movetoStyleTab();
|
||||
|
|
@ -25,18 +25,16 @@ describe("Table Widget property pane feature validation", function() {
|
|||
cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-end");
|
||||
});
|
||||
|
||||
it("2. Table widget change text size and validate", function() {
|
||||
it("2. Table widget change text size and validate", function () {
|
||||
cy.readTabledataValidateCSS("0", "0", "font-size", "14px");
|
||||
//cy.movetoStyleTab();
|
||||
cy.get(widgetsPage.textSize)
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.textSize).last().click({ force: true });
|
||||
agHelper.Sleep();
|
||||
cy.selectTxtSize("XL");
|
||||
cy.readTabledataValidateCSS("0", "0", "font-size", "30px");
|
||||
});
|
||||
|
||||
it("3. Table widget toggle test for vertical Alignment", function() {
|
||||
it("3. Table widget toggle test for vertical Alignment", function () {
|
||||
//cy.movetoStyleTab();
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Vertical Alignment", testdata.bindingVerticalAlig);
|
||||
|
|
@ -45,7 +43,7 @@ describe("Table Widget property pane feature validation", function() {
|
|||
cy.readTabledataValidateCSS("1", "0", "align-items", "flex-end");
|
||||
});
|
||||
|
||||
it("4. Table widget toggle test for text size", function() {
|
||||
it("4. Table widget toggle test for text size", function () {
|
||||
//cy.movetoStyleTab();
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Text Size", testdata.bindingSize);
|
||||
|
|
@ -54,7 +52,7 @@ describe("Table Widget property pane feature validation", function() {
|
|||
cy.readTabledataValidateCSS("1", "0", "font-size", "24px");
|
||||
});
|
||||
|
||||
it("5. Table widget toggle test for style Alignment", function() {
|
||||
it("5. Table widget toggle test for style Alignment", function () {
|
||||
//cy.movetoStyleTab();
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Font Style", testdata.bindingStyle);
|
||||
|
|
@ -63,7 +61,7 @@ describe("Table Widget property pane feature validation", function() {
|
|||
cy.readTabledataValidateCSS("1", "0", "font-style", "italic");
|
||||
});
|
||||
|
||||
it("6. Table widget toggle test for text color", function() {
|
||||
it("6. Table widget toggle test for text color", function () {
|
||||
//cy.movetoStyleTab();
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Text Color", testdata.bindingTextColor);
|
||||
|
|
@ -72,7 +70,7 @@ describe("Table Widget property pane feature validation", function() {
|
|||
cy.readTabledataValidateCSS("1", "0", "color", "rgb(255, 0, 0)");
|
||||
});
|
||||
|
||||
it("7. Table widget toggle test for background color", function() {
|
||||
it("7. Table widget toggle test for background color", function () {
|
||||
//cy.movetoStyleTab();
|
||||
agHelper.Sleep();
|
||||
propPane.EnterJSContext("Cell Background", testdata.bindingTextColor);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/* eslint-disable cypress/no-unnecessary-waiting */
|
||||
const dsl = require("../../../../fixtures/tableWidgetCondnFormatDsl.json");
|
||||
|
||||
describe("Table Widget condtional formatting to remain consistent", function() {
|
||||
describe("Table Widget condtional formatting to remain consistent", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("check the cell styles before and after sorting", function() {
|
||||
it("check the cell styles before and after sorting", function () {
|
||||
cy.openPropertyPane("tablewidget");
|
||||
|
||||
//Check Font weight, font style, and text color before sorting
|
||||
|
|
@ -18,9 +18,7 @@ describe("Table Widget condtional formatting to remain consistent", function() {
|
|||
cy.readTabledataValidateCSS("1", "1", "font-style", "italic");
|
||||
cy.readTabledataValidateCSS("1", "1", "color", "rgb(255, 0, 0)");
|
||||
|
||||
cy.get(".draggable-header")
|
||||
.contains("id")
|
||||
.click({ force: true });
|
||||
cy.get(".draggable-header").contains("id").click({ force: true });
|
||||
|
||||
//Check Font weight, font style, and text color after sorting
|
||||
cy.readTabledataValidateCSS("3", "1", "font-weight", "700");
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ const commonlocators = require("../../../../locators/commonlocators.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const dsl = require("../../../../fixtures/TextTableV2dsl.json");
|
||||
|
||||
describe("Text-Table v2 Binding Functionality", function() {
|
||||
describe("Text-Table v2 Binding Functionality", function () {
|
||||
Cypress.on("uncaught:exception", (err, runnable) => {
|
||||
// returning false here prevents Cypress from
|
||||
// failing the test
|
||||
|
|
@ -13,7 +13,7 @@ describe("Text-Table v2 Binding Functionality", function() {
|
|||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Text-Table Binding Functionality For Id", function() {
|
||||
it("1. Text-Table Binding Functionality For Id", function () {
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
/**
|
||||
* @param(Index) Provide index value to select the row.
|
||||
|
|
@ -40,7 +40,7 @@ describe("Text-Table v2 Binding Functionality", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("2. Text-Table Binding Functionality For Email", function() {
|
||||
it("2. Text-Table Binding Functionality For Email", function () {
|
||||
cy.get(publish.backToEditor).click();
|
||||
cy.isSelectRow(2);
|
||||
cy.openPropertyPane("textwidget");
|
||||
|
|
@ -64,7 +64,7 @@ describe("Text-Table v2 Binding Functionality", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("3. Text-Table Binding Functionality For Total Length", function() {
|
||||
it("3. Text-Table Binding Functionality For Total Length", function () {
|
||||
cy.get(publish.backToEditor).click();
|
||||
cy.openPropertyPane("textwidget");
|
||||
cy.testJsontext("text", "{{Table1.pageSize}}");
|
||||
|
|
@ -87,7 +87,7 @@ describe("Text-Table v2 Binding Functionality", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("4. Table Widget Functionality To Verify Default Row Selection is working", function() {
|
||||
it("4. Table Widget Functionality To Verify Default Row Selection is working", function () {
|
||||
cy.get(publish.backToEditor).click();
|
||||
cy.openPropertyPane("tablewidgetv2");
|
||||
cy.testJsontext("defaultselectedrow", "2");
|
||||
|
|
@ -107,7 +107,7 @@ describe("Text-Table v2 Binding Functionality", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("5. Text-Table Binding Functionality For Username", function() {
|
||||
it("5. Text-Table Binding Functionality For Username", function () {
|
||||
cy.get(publish.backToEditor).click();
|
||||
/**
|
||||
* @param(Index) Provide index value to select the row.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ const commonlocators = require("../../../../locators/commonlocators.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const dsl = require("../../../../fixtures/TextTabledsl.json");
|
||||
|
||||
describe("Text-Table Binding Functionality", function() {
|
||||
describe("Text-Table Binding Functionality", function () {
|
||||
Cypress.on("uncaught:exception", (err, runnable) => {
|
||||
// returning false here prevents Cypress from
|
||||
// failing the test
|
||||
|
|
@ -12,7 +12,7 @@ describe("Text-Table Binding Functionality", function() {
|
|||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
it("Text-Table Binding Functionality For Id", function() {
|
||||
it("Text-Table Binding Functionality For Id", function () {
|
||||
cy.openPropertyPane("tablewidget");
|
||||
/**
|
||||
* @param(Index) Provide index value to select the row.
|
||||
|
|
@ -38,7 +38,7 @@ describe("Text-Table Binding Functionality", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
it("Text-Table Binding Functionality For Email", function() {
|
||||
it("Text-Table Binding Functionality For Email", function () {
|
||||
cy.get(publish.backToEditor).click();
|
||||
cy.isSelectRow(2);
|
||||
cy.openPropertyPane("textwidget");
|
||||
|
|
@ -61,7 +61,7 @@ describe("Text-Table Binding Functionality", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
it("Text-Table Binding Functionality For Total Length", function() {
|
||||
it("Text-Table Binding Functionality For Total Length", function () {
|
||||
cy.get(publish.backToEditor).click();
|
||||
cy.openPropertyPane("textwidget");
|
||||
cy.testJsontext("text", "{{Table1.pageSize}}");
|
||||
|
|
@ -82,7 +82,7 @@ describe("Text-Table Binding Functionality", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
it("Table Widget Functionality To Verify Default Row Selection is working", function() {
|
||||
it("Table Widget Functionality To Verify Default Row Selection is working", function () {
|
||||
cy.get(publish.backToEditor).click();
|
||||
cy.openPropertyPane("tablewidget");
|
||||
cy.testJsontext("defaultselectedrow", "2");
|
||||
|
|
@ -101,7 +101,7 @@ describe("Text-Table Binding Functionality", function() {
|
|||
cy.get(commonlocators.TextInside).should("have.text", tabValueP);
|
||||
});
|
||||
});
|
||||
it("Text-Table Binding Functionality For Username", function() {
|
||||
it("Text-Table Binding Functionality For Username", function () {
|
||||
cy.get(publish.backToEditor).click();
|
||||
/**
|
||||
* @param(Index) Provide index value to select the row.
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
|||
const dataSources = ObjectsRegistry.DataSources;
|
||||
let datasourceName;
|
||||
|
||||
describe("Binding the multiple widgets and validating default data", function() {
|
||||
describe("Binding the multiple widgets and validating default data", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Create a postgres datasource", function() {
|
||||
it("1. Create a postgres datasource", function () {
|
||||
cy.NavigateToDatasourceEditor();
|
||||
cy.get(datasource.PostgreSQL).click();
|
||||
cy.fillPostgresDatasourceForm();
|
||||
|
|
@ -34,7 +34,7 @@ describe("Binding the multiple widgets and validating default data", function()
|
|||
dataSources.RunQuery();
|
||||
});
|
||||
|
||||
it("3. Button widget test with on action query run", function() {
|
||||
it("3. Button widget test with on action query run", function () {
|
||||
cy.SearchEntityandOpen("Button1");
|
||||
cy.executeDbQuery("Query1");
|
||||
cy.wait("@updateLayout").should(
|
||||
|
|
@ -44,7 +44,7 @@ describe("Binding the multiple widgets and validating default data", function()
|
|||
);
|
||||
});
|
||||
|
||||
it("4. Input widget test with default value update with query data", function() {
|
||||
it("4. Input widget test with default value update with query data", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.get(widgetsPage.defaultInput).type(testdata.defaultInputQuery);
|
||||
cy.wait("@updateLayout").should(
|
||||
|
|
@ -54,13 +54,11 @@ describe("Binding the multiple widgets and validating default data", function()
|
|||
);
|
||||
});
|
||||
|
||||
it("5. Publish App and validate loading functionalty", function() {
|
||||
it("5. Publish App and validate loading functionalty", function () {
|
||||
cy.PublishtheApp();
|
||||
//eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(2000);
|
||||
cy.get(widgetsPage.widgetBtn)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get(widgetsPage.widgetBtn).first().click({ force: true });
|
||||
cy.wait("@postExecute").should(
|
||||
"have.nested.property",
|
||||
"response.body.responseMeta.status",
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ const widgetsPage = require("../../../../locators/Widgets.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the multiple widgets and validating default data", function() {
|
||||
describe("Binding the multiple widgets and validating default data", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("Input widget test with default value from table widget", function() {
|
||||
it("Input widget test with default value from table widget", function () {
|
||||
cy.openPropertyPane("inputwidgetv2");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ describe("Binding the multiple widgets and validating default data", function()
|
|||
});
|
||||
|
||||
//To be enabled once the single select multi select issues are resolved
|
||||
it("Dropdown widget test with default value from table widget", function() {
|
||||
it("Dropdown widget test with default value from table widget", function () {
|
||||
cy.openPropertyPane("selectwidget");
|
||||
cy.testJsontext("options", JSON.stringify(testdata.deafultDropDownWidget));
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ describe("Binding the multiple widgets and validating default data", function()
|
|||
);
|
||||
});
|
||||
|
||||
it("validation of default data displayed in all widgets based on row selected", function() {
|
||||
it("validation of default data displayed in all widgets based on row selected", function () {
|
||||
cy.isSelectRow(1);
|
||||
cy.readTabledataPublish("1", "0").then((tabData) => {
|
||||
const tabValue = tabData;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const dsl = require("../../../../fixtures/MultipleInput.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the multiple input Widget", function() {
|
||||
describe("Binding the multiple input Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
|
@ -14,7 +14,7 @@ describe("Binding the multiple input Widget", function() {
|
|||
return false;
|
||||
});
|
||||
|
||||
it("1. Cyclic depedancy error message validation", function() {
|
||||
it("1. Cyclic depedancy error message validation", function () {
|
||||
cy.openPropertyPane("inputwidgetv2");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}");
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ describe("Binding the multiple input Widget", function() {
|
|||
cy.get(commonlocators.toastmsg).contains("Cyclic dependency");
|
||||
});
|
||||
|
||||
it("2. Binding input widget1 and validating", function() {
|
||||
it("2. Binding input widget1 and validating", function () {
|
||||
cy.openPropertyPane("inputwidgetv2");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultdata);
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ describe("Binding the multiple input Widget", function() {
|
|||
.should("contain", testdata.defaultdata);
|
||||
});
|
||||
|
||||
it("3. Binding second input widget with first input widget and validating", function() {
|
||||
it("3. Binding second input widget with first input widget and validating", function () {
|
||||
cy.selectEntityByName("Input2");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}");
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ describe("Binding the multiple input Widget", function() {
|
|||
cy.get(publish.backToEditor).click();
|
||||
});
|
||||
|
||||
it("4. Binding third input widget with first input widget and validating", function() {
|
||||
it("4. Binding third input widget with first input widget and validating", function () {
|
||||
cy.CheckAndUnfoldWidgets();
|
||||
cy.selectEntityByName("Input3");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}");
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the multiple input Widget", function() {
|
||||
describe("Binding the multiple input Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Input widget test with default value from table widget v2", function() {
|
||||
it("1. Input widget test with default value from table widget v2", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ describe("Binding the multiple input Widget", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("2. Validation of data displayed in all widgets based on row selected", function() {
|
||||
it("2. Validation of data displayed in all widgets based on row selected", function () {
|
||||
cy.isSelectRow(1);
|
||||
cy.readTableV2dataPublish("1", "0").then((tabData) => {
|
||||
const tabValue = tabData;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json");
|
|||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
const testdata = require("../../../../fixtures/testdata.json");
|
||||
|
||||
describe("Binding the multiple input Widget", function() {
|
||||
describe("Binding the multiple input Widget", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
|
||||
it("1. Input widget test with default value from table widget", function() {
|
||||
it("1. Input widget test with default value from table widget", function () {
|
||||
cy.SearchEntityandOpen("Input1");
|
||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ describe("Binding the multiple input Widget", function() {
|
|||
);
|
||||
});
|
||||
|
||||
it("2. Validation of data displayed in all widgets based on row selected", function() {
|
||||
it("2. Validation of data displayed in all widgets based on row selected", function () {
|
||||
cy.isSelectRow(1);
|
||||
cy.readTabledataPublish("1", "0").then((tabData) => {
|
||||
const tabValue = tabData;
|
||||
|
|
|
|||
|
|
@ -1,43 +1,58 @@
|
|||
import { ObjectsRegistry } from "../../../../support/Objects/Registry"
|
||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||
|
||||
let dataSet: any;
|
||||
let agHelper = ObjectsRegistry.AggregateHelper,
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
propPane = ObjectsRegistry.PropertyPane,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
ee = ObjectsRegistry.EntityExplorer,
|
||||
propPane = ObjectsRegistry.PropertyPane,
|
||||
locator = ObjectsRegistry.CommonLocators,
|
||||
deployMode = ObjectsRegistry.DeployMode;
|
||||
|
||||
describe("Validate basic binding of Input widget to Input widget", () => {
|
||||
|
||||
before(() => {
|
||||
cy.fixture('inputBindingdsl').then((val: any) => {
|
||||
agHelper.AddDsl(val)
|
||||
});
|
||||
|
||||
cy.fixture("testdata").then(function (data: any) {
|
||||
dataSet = data;
|
||||
});
|
||||
before(() => {
|
||||
cy.fixture("inputBindingdsl").then((val: any) => {
|
||||
agHelper.AddDsl(val);
|
||||
});
|
||||
|
||||
it("1. Input widget test with default value for atob method", () => {
|
||||
ee.SelectEntityByName("Input1", 'Widgets')
|
||||
propPane.UpdatePropertyFieldValue("Default Value", dataSet.atobInput + "}}");
|
||||
agHelper.ValidateNetworkStatus('@updateLayout')
|
||||
cy.get(locator._inputWidget).first().invoke("attr", "value").should("equal", 'A');//Before mapping JSObject value of input
|
||||
cy.fixture("testdata").then(function (data: any) {
|
||||
dataSet = data;
|
||||
});
|
||||
});
|
||||
|
||||
it("2. Input widget test with default value for btoa method", function () {
|
||||
ee.SelectEntityByName("Input2")
|
||||
propPane.UpdatePropertyFieldValue("Default Value", dataSet.btoaInput + "}}");
|
||||
agHelper.ValidateNetworkStatus('@updateLayout')
|
||||
cy.get(locator._inputWidget).last().invoke("attr", "value").should("equal", 'QQ==');//Before mapping JSObject value of input
|
||||
});
|
||||
it("1. Input widget test with default value for atob method", () => {
|
||||
ee.SelectEntityByName("Input1", "Widgets");
|
||||
propPane.UpdatePropertyFieldValue(
|
||||
"Default Value",
|
||||
dataSet.atobInput + "}}",
|
||||
);
|
||||
agHelper.ValidateNetworkStatus("@updateLayout");
|
||||
cy.get(locator._inputWidget)
|
||||
.first()
|
||||
.invoke("attr", "value")
|
||||
.should("equal", "A"); //Before mapping JSObject value of input
|
||||
});
|
||||
|
||||
it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () {
|
||||
deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2"))
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2")).first().invoke("attr", "value")
|
||||
.should("contain", "A")
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2")).last().invoke("attr", "value")
|
||||
.should("contain", "QQ==");
|
||||
});
|
||||
});
|
||||
it("2. Input widget test with default value for btoa method", function () {
|
||||
ee.SelectEntityByName("Input2");
|
||||
propPane.UpdatePropertyFieldValue(
|
||||
"Default Value",
|
||||
dataSet.btoaInput + "}}",
|
||||
);
|
||||
agHelper.ValidateNetworkStatus("@updateLayout");
|
||||
cy.get(locator._inputWidget)
|
||||
.last()
|
||||
.invoke("attr", "value")
|
||||
.should("equal", "QQ=="); //Before mapping JSObject value of input
|
||||
});
|
||||
|
||||
it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () {
|
||||
deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2"));
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2"))
|
||||
.first()
|
||||
.invoke("attr", "value")
|
||||
.should("contain", "A");
|
||||
cy.get(locator._widgetInputSelector("inputwidgetv2"))
|
||||
.last()
|
||||
.invoke("attr", "value")
|
||||
.should("contain", "QQ==");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
const dsl = require("../../../../fixtures/xmlParser.json");
|
||||
const publish = require("../../../../locators/publishWidgetspage.json");
|
||||
|
||||
describe("xml2json text", function() {
|
||||
describe("xml2json text", function () {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
it("publish widget and validate the data displayed in text widget from xmlParser function", function() {
|
||||
it("publish widget and validate the data displayed in text widget from xmlParser function", function () {
|
||||
cy.PublishtheApp();
|
||||
cy.get(publish.textWidget)
|
||||
.first()
|
||||
|
|
|
|||
|
|
@ -40,10 +40,7 @@ describe("Branding", () => {
|
|||
|
||||
it("2. Should test that changing logo,favicon and color changes the preview", () => {
|
||||
// branding color
|
||||
cy.get(locators.AdminSettingsColorInput)
|
||||
.focus()
|
||||
.clear()
|
||||
.type("red");
|
||||
cy.get(locators.AdminSettingsColorInput).focus().clear().type("red");
|
||||
|
||||
cy.get(".t--branding-bg").should(
|
||||
"have.css",
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import {
|
|||
const largeResponseApiUrl = "https://api.publicapis.org/entries";
|
||||
//"https://jsonplaceholder.typicode.com/photos";//Commenting since this is faster sometimes & case is failing
|
||||
|
||||
describe("Abort Action Execution", function() {
|
||||
it("1. Bug #14006, #16093 - Cancel Request button should abort API action execution", function() {
|
||||
describe("Abort Action Execution", function () {
|
||||
it("1. Bug #14006, #16093 - Cancel Request button should abort API action execution", function () {
|
||||
_.apiPage.CreateAndFillApi(largeResponseApiUrl, "AbortApi", 0);
|
||||
_.apiPage.RunAPI(false, 0);
|
||||
_.agHelper.GetNClick(_.locators._cancelActionExecution, 0, true);
|
||||
|
|
@ -23,7 +23,7 @@ describe("Abort Action Execution", function() {
|
|||
// Queries were resolving quicker than we could cancel them
|
||||
// Commenting this out till we can find a query that resolves slow enough for us to cancel its execution.
|
||||
|
||||
it("2. Bug #14006, #16093 Cancel Request button should abort Query action execution", function() {
|
||||
it("2. Bug #14006, #16093 Cancel Request button should abort Query action execution", function () {
|
||||
_.dataSources.CreateDataSource("MySql");
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
_.dataSources.CreateQueryAfterDSSaved(
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ function selectTabAndReset() {
|
|||
}
|
||||
|
||||
function selectTableAndReset() {
|
||||
table.SelectTableRow(1,0, true, "v2");
|
||||
table.SelectTableRow(1, 0, true, "v2");
|
||||
agHelper.GetNAssertElementText(
|
||||
locator._textWidgetInDeployed,
|
||||
"#2",
|
||||
|
|
@ -202,9 +202,7 @@ function selectTableAndReset() {
|
|||
}
|
||||
|
||||
function selectSwitchGroupAndReset() {
|
||||
cy.get(".bp3-control-indicator")
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(".bp3-control-indicator").last().click({ force: true });
|
||||
agHelper.GetNAssertElementText(
|
||||
locator._textWidgetInDeployed,
|
||||
"RED",
|
||||
|
|
@ -219,9 +217,7 @@ function selectSwitchGroupAndReset() {
|
|||
}
|
||||
|
||||
function selectSwitchAndReset() {
|
||||
cy.get(".bp3-control-indicator")
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(".bp3-control-indicator").last().click({ force: true });
|
||||
cy.get(".t--switch-widget-active").should("not.exist");
|
||||
agHelper.ClickButton("Submit");
|
||||
cy.get(".t--switch-widget-active").should("be.visible");
|
||||
|
|
@ -229,9 +225,7 @@ function selectSwitchAndReset() {
|
|||
|
||||
function selectAndReset() {
|
||||
cy.get(".select-button").click({ force: true });
|
||||
cy.get(".menu-item-text")
|
||||
.contains("Blue")
|
||||
.click({ force: true });
|
||||
cy.get(".menu-item-text").contains("Blue").click({ force: true });
|
||||
cy.wait(1000);
|
||||
agHelper.GetNAssertElementText(
|
||||
locator._textWidgetInDeployed,
|
||||
|
|
@ -247,9 +241,7 @@ function selectAndReset() {
|
|||
}
|
||||
|
||||
function selectCurrencyInputAndReset() {
|
||||
cy.get(".bp3-input")
|
||||
.click({ force: true })
|
||||
.type("123");
|
||||
cy.get(".bp3-input").click({ force: true }).type("123");
|
||||
cy.wait(1000);
|
||||
agHelper.GetNAssertElementText(
|
||||
locator._textWidgetInDeployed,
|
||||
|
|
@ -284,9 +276,7 @@ function multiTreeSelectAndReset() {
|
|||
}
|
||||
|
||||
function radiogroupAndReset() {
|
||||
cy.get("input")
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get("input").last().click({ force: true });
|
||||
cy.wait(1000);
|
||||
agHelper.GetNAssertElementText(
|
||||
locator._textWidgetInDeployed,
|
||||
|
|
@ -320,9 +310,7 @@ function listwidgetAndReset() {
|
|||
}
|
||||
|
||||
function ratingwidgetAndReset() {
|
||||
cy.get(".bp3-icon-star svg")
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(".bp3-icon-star svg").last().click({ force: true });
|
||||
cy.wait(1000);
|
||||
agHelper.GetNAssertElementText(
|
||||
locator._textWidgetInDeployed,
|
||||
|
|
@ -358,9 +346,7 @@ function checkboxGroupAndReset() {
|
|||
}
|
||||
|
||||
function checkboxAndReset() {
|
||||
cy.get("input")
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get("input").last().click({ force: true });
|
||||
cy.wait(1000);
|
||||
agHelper.GetNAssertElementText(
|
||||
locator._textWidgetInDeployed,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import * as _ from "../../../../support/Objects/ObjectsCore";
|
||||
|
||||
describe("Invalid JSObject export statement", function() {
|
||||
it("Shows error toast for invalid js object export statement", function() {
|
||||
describe("Invalid JSObject export statement", function () {
|
||||
it("Shows error toast for invalid js object export statement", function () {
|
||||
const JSObjectWithInvalidExport = `{
|
||||
myFun1: ()=>{
|
||||
return (name)=>name
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import * as _ from "../../../../support/Objects/ObjectsCore";
|
||||
|
||||
describe("Error logged when adding a suggested table widget", function() {
|
||||
it("Bug 14037: User gets an error even when table widget is added from the API page successfully", function() {
|
||||
cy.fixture("datasources").then((datasourceFormData : any) => {
|
||||
_.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "Api1");
|
||||
_.apiPage.RunAPI();
|
||||
describe("Error logged when adding a suggested table widget", function () {
|
||||
it("Bug 14037: User gets an error even when table widget is added from the API page successfully", function () {
|
||||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
||||
_.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "Api1");
|
||||
_.apiPage.RunAPI();
|
||||
|
||||
_.apiPage.AddSuggestedWidget("TABLE_WIDGET_V2");
|
||||
_.apiPage.AddSuggestedWidget("TABLE_WIDGET_V2");
|
||||
|
||||
_.debuggerHelper.AssertErrorCount(0);
|
||||
_.debuggerHelper.AssertErrorCount(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,19 +6,19 @@ let guid, datasourceName;
|
|||
let dataSources = ObjectsRegistry.DataSources,
|
||||
agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Verify setting tab form controls not to have tooltip and tooltip (underline) styles", function() {
|
||||
describe("Verify setting tab form controls not to have tooltip and tooltip (underline) styles", function () {
|
||||
beforeEach(() => {
|
||||
cy.startRoutesForDatasource();
|
||||
});
|
||||
|
||||
it("1. Creates a new Mongo datasource", function() {
|
||||
it("1. Creates a new Mongo datasource", function () {
|
||||
dataSources.CreateDataSource("Mongo");
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
datasourceName = $dsName;
|
||||
});
|
||||
});
|
||||
|
||||
it("2. We make sure the label in the settings tab does not have any underline styles", function() {
|
||||
it("2. We make sure the label in the settings tab does not have any underline styles", function () {
|
||||
cy.NavigateToActiveDSQueryPane(datasourceName);
|
||||
|
||||
cy.get(queryLocators.querySettingsTab).click();
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ const jsEditor = ObjectsRegistry.JSEditor;
|
|||
const apiPage = ObjectsRegistry.ApiPage;
|
||||
const ee = ObjectsRegistry.EntityExplorer;
|
||||
|
||||
describe("JS data update on button click", function() {
|
||||
describe("JS data update on button click", function () {
|
||||
before(() => {
|
||||
agHelper.AddDsl(dsl);
|
||||
});
|
||||
|
||||
it("Populates js function data when triggered via button click", function() {
|
||||
it("Populates js function data when triggered via button click", function () {
|
||||
apiPage.CreateAndFillApi(
|
||||
"https://jsonplaceholder.typicode.com/posts",
|
||||
"Api1",
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ const jsEditor = ObjectsRegistry.JSEditor,
|
|||
propPane = ObjectsRegistry.PropertyPane,
|
||||
CommonLocators = ObjectsRegistry.CommonLocators;
|
||||
|
||||
describe("JS Function Execution", function() {
|
||||
describe("JS Function Execution", function () {
|
||||
before(() => {
|
||||
ee.DragDropWidgetNVerify(WIDGET.BUTTON, 200, 200);
|
||||
});
|
||||
it("1. Shows js function data as part of autocompletion hints", function() {
|
||||
it("1. Shows js function data as part of autocompletion hints", function () {
|
||||
jsEditor.CreateJSObject(
|
||||
`export default {
|
||||
myFun1: ()=>{
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ const locator = ObjectsRegistry.CommonLocators,
|
|||
apiPage = ObjectsRegistry.ApiPage,
|
||||
agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Binding Expressions should not be truncated in Url and path extraction", function() {
|
||||
it("Bug 16377, When Api url has dynamic binding expressions, ensure the url and path derived is not corrupting Api execution", function() {
|
||||
describe("Binding Expressions should not be truncated in Url and path extraction", function () {
|
||||
it("Bug 16377, When Api url has dynamic binding expressions, ensure the url and path derived is not corrupting Api execution", function () {
|
||||
//Since the specified expression always returns true - it will never run mock-apis - which actually doesn't exist
|
||||
const apiUrl = `http://host.docker.internal:5001/v1/{{true ? 'mock-api' : 'mock-apis'}}?records=10`;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ const locator = ObjectsRegistry.CommonLocators,
|
|||
apiPage = ObjectsRegistry.ApiPage,
|
||||
agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Binding Expressions should not be truncated in Url Query Param", function() {
|
||||
it("Bug 16683, When Api url has dynamic binding expressions, ensures the query params is not truncated", function() {
|
||||
describe("Binding Expressions should not be truncated in Url Query Param", function () {
|
||||
it("Bug 16683, When Api url has dynamic binding expressions, ensures the query params is not truncated", function () {
|
||||
const apiUrl = `https://echo.hoppscotch.io/v6/deployments?limit=4{{Math.random() > 0.5 ? '¶m1=5' : '¶m2=6'}}`;
|
||||
|
||||
apiPage.CreateAndFillApi(apiUrl, "BindingExpressions");
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ const GRAPHQL_RESPONSE = {
|
|||
mission_name: "Sentinel-6 Michael Freilich",
|
||||
};
|
||||
|
||||
describe("Binding Expressions should not be truncated in Url and path extraction", function() {
|
||||
it.skip("Bug 16702, Moustache+Quotes formatting goes wrong in graphql body resulting in autocomplete failure", function() {
|
||||
describe("Binding Expressions should not be truncated in Url and path extraction", function () {
|
||||
it.skip("Bug 16702, Moustache+Quotes formatting goes wrong in graphql body resulting in autocomplete failure", function () {
|
||||
const jsObjectBody = `export default {
|
||||
limitValue: 1,
|
||||
offsetValue: 1,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
|||
const dataSources = ObjectsRegistry.DataSources,
|
||||
agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("Bug 18035: Updates save button text on datasource discard popup", function() {
|
||||
it("1. Create gsheet datasource, click on back button, discard popup should contain save and authorize", function() {
|
||||
describe("Bug 18035: Updates save button text on datasource discard popup", function () {
|
||||
it("1. Create gsheet datasource, click on back button, discard popup should contain save and authorize", function () {
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
dataSources.CreatePlugIn("Google Sheets");
|
||||
agHelper.GoBack();
|
||||
|
|
@ -16,7 +16,7 @@ describe("Bug 18035: Updates save button text on datasource discard popup", func
|
|||
cy.get(dataSources._datasourceModalDoNotSave).click();
|
||||
});
|
||||
|
||||
it("2. Create any other datasource, click on back button, discard popup should contain save", function() {
|
||||
it("2. Create any other datasource, click on back button, discard popup should contain save", function () {
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
dataSources.CreatePlugIn("PostgreSQL");
|
||||
agHelper.GoBack();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const ee = ObjectsRegistry.EntityExplorer,
|
|||
locator = ObjectsRegistry.CommonLocators,
|
||||
agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("JS Function Execution", function() {
|
||||
describe("JS Function Execution", function () {
|
||||
before(() => {
|
||||
cy.fixture("formWithtabdsl.json").then((val: any) => {
|
||||
agHelper.AddDsl(val);
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@ describe("Application crashes when saving datasource", () => {
|
|||
"POST",
|
||||
);
|
||||
apiPage.SelectPaneTab("Authentication");
|
||||
cy.get(apiPage._saveAsDS)
|
||||
.last()
|
||||
.click({ force: true });
|
||||
cy.get(apiPage._saveAsDS).last().click({ force: true });
|
||||
cy.get(".t--close-editor").click({ force: true });
|
||||
cy.get(datasource._datasourceModalSave).click();
|
||||
// ensures app does not crash and datasource is saved.
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
|||
|
||||
const dataSources = ObjectsRegistry.DataSources;
|
||||
|
||||
describe("Testing empty datasource without saving should not throw 404", function() {
|
||||
it("Bug 19426: Create empty S3 datasource, test it", function() {
|
||||
describe("Testing empty datasource without saving should not throw 404", function () {
|
||||
it("Bug 19426: Create empty S3 datasource, test it", function () {
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
dataSources.CreatePlugIn("S3");
|
||||
dataSources.TestDatasource(false);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ let dsName: any;
|
|||
const agHelper = ObjectsRegistry.AggregateHelper,
|
||||
dataSources = ObjectsRegistry.DataSources;
|
||||
|
||||
describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function() {
|
||||
it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function() {
|
||||
describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function () {
|
||||
it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function () {
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
agHelper.GenerateUUID();
|
||||
cy.get("@guid").then((uid) => {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ let dsName: string;
|
|||
|
||||
const testString = "test";
|
||||
|
||||
describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function() {
|
||||
it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function() {
|
||||
describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function () {
|
||||
it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function () {
|
||||
_.dataSources.NavigateToDSCreateNew();
|
||||
_.agHelper.GenerateUUID();
|
||||
cy.get("@guid").then((uid) => {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
|||
const jsEditor = ObjectsRegistry.JSEditor,
|
||||
agHelper = ObjectsRegistry.AggregateHelper;
|
||||
|
||||
describe("JS Execution of Higher-order-functions", function() {
|
||||
it("Completes execution properly", function() {
|
||||
describe("JS Execution of Higher-order-functions", function () {
|
||||
it("Completes execution properly", function () {
|
||||
const JSObjectWithHigherOrderFunction = `export default{
|
||||
myFun1: ()=>{
|
||||
return (name)=>name
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ const jsEditor = ObjectsRegistry.JSEditor,
|
|||
ee = ObjectsRegistry.EntityExplorer,
|
||||
propPane = ObjectsRegistry.PropertyPane;
|
||||
|
||||
describe("Testing if user.email is avaible on page load", function() {
|
||||
it("Bug: 20275: {{appsmith.user.email}} is not available on page load", function() {
|
||||
describe("Testing if user.email is avaible on page load", function () {
|
||||
it("Bug: 20275: {{appsmith.user.email}} is not available on page load", function () {
|
||||
const JS_OBJECT_BODY = `export default{
|
||||
myFun1: ()=>{
|
||||
showAlert(appsmith.user.email)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import * as _ from "../../../../support/Objects/ObjectsCore";
|
||||
import { WIDGET } from "../../../../locators/WidgetLocators";
|
||||
|
||||
describe("Evaluations causing error when page is cloned", function() {
|
||||
it("Bug: 20841: JSObjects | Sync methods | Not run consistently when Page is cloned", function() {
|
||||
describe("Evaluations causing error when page is cloned", function () {
|
||||
it("Bug: 20841: JSObjects | Sync methods | Not run consistently when Page is cloned", function () {
|
||||
const JS_OBJECT_BODY = `export default{
|
||||
myFun1: ()=>{
|
||||
return "Default text";
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ const agHelper = ObjectsRegistry.AggregateHelper,
|
|||
table = ObjectsRegistry.Table,
|
||||
appSettings = ObjectsRegistry.AppSettings;
|
||||
|
||||
describe("Bug 9334: The Select widget value is sent as null when user switches between the pages", function() {
|
||||
describe("Bug 9334: The Select widget value is sent as null when user switches between the pages", function () {
|
||||
before(() => {
|
||||
appSettings.OpenPaneAndChangeTheme("Pampas");
|
||||
});
|
||||
|
||||
it("1. Create Postgress DS", function() {
|
||||
it("1. Create Postgress DS", function () {
|
||||
dataSources.CreateDataSource("Postgres");
|
||||
cy.get("@dsName").then(($dsName) => {
|
||||
dsName = $dsName;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const {
|
|||
AggregateHelper: agHelper,
|
||||
ApiPage: apiPage,
|
||||
JSEditor: jsEditor,
|
||||
EntityExplorer : ee
|
||||
EntityExplorer: ee,
|
||||
} = ObjectsRegistry;
|
||||
|
||||
describe("Bug #15372 Catch block was not triggering in Safari/firefox", () => {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const agHelper = ObjectsRegistry.AggregateHelper,
|
|||
|
||||
const testString = "test";
|
||||
|
||||
describe("datasource unsaved changes popup shows even without changes", function() {
|
||||
describe("datasource unsaved changes popup shows even without changes", function () {
|
||||
// In case of postgres and other plugins, host address and port key values are initialized by default making form dirty
|
||||
it("1. Bug 18664: Create postgres datasource, save it and edit it and go back, now unsaved changes popup should not be shown", () => {
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const agHelper = ObjectsRegistry.AggregateHelper,
|
|||
|
||||
let guid;
|
||||
let dataSourceName: string;
|
||||
describe("Datasource form related tests", function() {
|
||||
describe("Datasource form related tests", function () {
|
||||
it("1. Bug - 17238 Verify datasource structure refresh on save - invalid datasource", () => {
|
||||
agHelper.GenerateUUID();
|
||||
cy.get("@guid").then((uid) => {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user