test: Cypress | Flaky Fixes (#25217)
## Description - This PR fixes below specs: - /ListV2/Listv2_dataIdentifierProperty_spec.js - Improves validations in /Autocomplete/JS_AC2_spec.ts - Moving all mockApi call to TEDTestConfigs - Datasources/Airtable_Basic_Spec.ts - ListV2/Listv2_onItemClick_spec.js - FirstTimeUserOnboarding_spec.js - 5th - flaky fix - /Binding/Widgets_Default_data_validation_spec.js - AssertDocumentReady() improved - added timeout to check page load - TableV2/TableV2_Widget_Add_button_spec.js - Binding/ButtonWidgets_NavigateTo_validation_spec.js - UpdatePropertyFieldValue() improved - added intercept validation #### Type of change - Script fix (non-breaking change which fixes an issue) ## Testing > #### How Has This Been Tested? - [X] Cypress CI runs - ## Checklist: #### QA activity: - [X] Added `Test Plan Approved` label after changes were reviewed
This commit is contained in:
parent
71240f254e
commit
a8eef88e6c
|
|
@ -208,8 +208,8 @@ Lets build great software together.
|
||||||
[](https://github.com/dhruvikn)
|
[](https://github.com/dhruvikn)
|
||||||
[](https://github.com/megaconfidence)
|
[](https://github.com/megaconfidence)
|
||||||
[](https://github.com/tanvibhakta)
|
[](https://github.com/tanvibhakta)
|
||||||
[](https://github.com/sondermanish)
|
|
||||||
[](https://github.com/NilanshBansal)
|
[](https://github.com/NilanshBansal)
|
||||||
|
[](https://github.com/sondermanish)
|
||||||
[](https://github.com/rajatagrawal)
|
[](https://github.com/rajatagrawal)
|
||||||
[](https://github.com/subrata71)
|
[](https://github.com/subrata71)
|
||||||
[](https://github.com/Druthi)
|
[](https://github.com/Druthi)
|
||||||
|
|
@ -315,19 +315,19 @@ Lets build great software together.
|
||||||
[](https://github.com/akshayrangasaid)
|
[](https://github.com/akshayrangasaid)
|
||||||
[](https://github.com/mojtab23)
|
[](https://github.com/mojtab23)
|
||||||
[](https://github.com/iamrkcheers)
|
[](https://github.com/iamrkcheers)
|
||||||
[](https://github.com/iamakulov)
|
|
||||||
[](https://github.com/sumanthyedoti)
|
[](https://github.com/sumanthyedoti)
|
||||||
[](https://github.com/vaibh1297)
|
[](https://github.com/vaibh1297)
|
||||||
[](https://github.com/vnodecg)
|
[](https://github.com/vnodecg)
|
||||||
|
[](https://github.com/iamakulov)
|
||||||
[](https://github.com/pc9795)
|
[](https://github.com/pc9795)
|
||||||
[](https://github.com/Rhitottam)
|
[](https://github.com/Rhitottam)
|
||||||
[](https://github.com/iSatVeerSingh)
|
|
||||||
[](https://github.com/akshay11298)
|
[](https://github.com/akshay11298)
|
||||||
[](https://github.com/daniel-shuy)
|
[](https://github.com/daniel-shuy)
|
||||||
[](https://github.com/daniloff200)
|
[](https://github.com/daniloff200)
|
||||||
[](https://github.com/osis)
|
[](https://github.com/osis)
|
||||||
[](https://github.com/harshitpandey0426)
|
[](https://github.com/harshitpandey0426)
|
||||||
[](https://github.com/ganganimaulik)
|
[](https://github.com/ganganimaulik)
|
||||||
|
[](https://github.com/iSatVeerSingh)
|
||||||
[](https://github.com/jyash97)
|
[](https://github.com/jyash97)
|
||||||
[](https://github.com/ram-primathon)
|
[](https://github.com/ram-primathon)
|
||||||
[](https://github.com/sub1983)
|
[](https://github.com/sub1983)
|
||||||
|
|
@ -398,7 +398,6 @@ Lets build great software together.
|
||||||
[](https://github.com/felixsuarez0727)
|
[](https://github.com/felixsuarez0727)
|
||||||
[](https://github.com/gitstart)
|
[](https://github.com/gitstart)
|
||||||
[](https://github.com/harshmange44)
|
[](https://github.com/harshmange44)
|
||||||
[](https://github.com/indrajitbnikam)
|
|
||||||
[](https://github.com/ishaanmehta4)
|
[](https://github.com/ishaanmehta4)
|
||||||
[](https://github.com/jaikanthjay46)
|
[](https://github.com/jaikanthjay46)
|
||||||
[](https://github.com/jarimayenburg)
|
[](https://github.com/jarimayenburg)
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ export default defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
baseUrl: "https://dev.appsmith.com/",
|
baseUrl: "https://dev.appsmith.com/",
|
||||||
env: {
|
env: {
|
||||||
USERNAME: "XXXX",
|
USERNAME: "xxxx",
|
||||||
PASSWORD: "XXXX",
|
PASSWORD: "xxx",
|
||||||
},
|
},
|
||||||
setupNodeEvents(on, config) {
|
setupNodeEvents(on, config) {
|
||||||
return require("./cypress/plugins/index.js")(on, config);
|
return require("./cypress/plugins/index.js")(on, config);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import {
|
||||||
entityExplorer,
|
entityExplorer,
|
||||||
jsEditor,
|
jsEditor,
|
||||||
apiPage,
|
apiPage,
|
||||||
|
tedTestConfig,
|
||||||
} from "../../../support/Objects/ObjectsCore";
|
} from "../../../support/Objects/ObjectsCore";
|
||||||
const commonlocators = require("../../../locators/commonlocators.json");
|
const commonlocators = require("../../../locators/commonlocators.json");
|
||||||
|
|
||||||
|
|
@ -12,8 +13,7 @@ describe("JSEditor tests", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("1. Testing promises with resetWidget, storeValue action and API call", () => {
|
it("1. Testing promises with resetWidget, storeValue action and API call", () => {
|
||||||
cy.fixture("datasources").then((datasourceFormData) => {
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl, "TC1api");
|
||||||
apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "TC1api");
|
|
||||||
apiPage.RunAPI();
|
apiPage.RunAPI();
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
|
|
@ -112,7 +112,6 @@ describe("JSEditor tests", function () {
|
||||||
"GREEN",
|
"GREEN",
|
||||||
); */
|
); */
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
//Skipping reason? to add
|
//Skipping reason? to add
|
||||||
it.skip("2. Testing dynamic widgets display using consecutive storeValue calls", () => {
|
it.skip("2. Testing dynamic widgets display using consecutive storeValue calls", () => {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ describe("Navigate To feature", () => {
|
||||||
}
|
}
|
||||||
}}`,
|
}}`,
|
||||||
);
|
);
|
||||||
agHelper.AssertAutoSave();
|
|
||||||
agHelper.PopupClose("onClick");
|
agHelper.PopupClose("onClick");
|
||||||
agHelper.ClickButton("Submit");
|
agHelper.ClickButton("Submit");
|
||||||
cy.url().should("include", "a=b").and("include", "test=123");
|
cy.url().should("include", "a=b").and("include", "test=123");
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import {
|
||||||
draggableWidgets,
|
draggableWidgets,
|
||||||
entityExplorer,
|
entityExplorer,
|
||||||
entityItems,
|
entityItems,
|
||||||
|
tedTestConfig,
|
||||||
jsEditor,
|
jsEditor,
|
||||||
locators,
|
locators,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
@ -172,8 +173,7 @@ describe("Autocomplete tests", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("5. Api data with array of object autocompletion test", () => {
|
it("5. Api data with array of object autocompletion test", () => {
|
||||||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl);
|
||||||
apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]);
|
|
||||||
agHelper.Sleep(2000);
|
agHelper.Sleep(2000);
|
||||||
apiPage.RunAPI();
|
apiPage.RunAPI();
|
||||||
// Using same js object
|
// Using same js object
|
||||||
|
|
@ -195,7 +195,6 @@ describe("Autocomplete tests", () => {
|
||||||
entityType: entityItems.JSObject,
|
entityType: entityItems.JSObject,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it("6. Local variables & complex data autocompletion test", () => {
|
it("6. Local variables & complex data autocompletion test", () => {
|
||||||
jsEditor.CreateJSObject(jsObjectBody, {
|
jsEditor.CreateJSObject(jsObjectBody, {
|
||||||
|
|
|
||||||
|
|
@ -146,20 +146,28 @@ describe("Autocomplete tests", () => {
|
||||||
|
|
||||||
agHelper.GetElement(jsEditor._lineinJsEditor(4)).click();
|
agHelper.GetElement(jsEditor._lineinJsEditor(4)).click();
|
||||||
agHelper.WaitUntilAllToastsDisappear();
|
agHelper.WaitUntilAllToastsDisappear();
|
||||||
|
|
||||||
//Assert that hints are not present inside the string
|
//Assert that hints are not present inside the string
|
||||||
agHelper.TypeText(locators._codeMirrorTextArea, `const x = "`);
|
agHelper.TypeText(locators._codeMirrorTextArea, `const x = "`);
|
||||||
|
|
||||||
agHelper.AssertElementAbsence(locators._hints);
|
agHelper.AssertElementAbsence(locators._hints);
|
||||||
|
|
||||||
agHelper.SelectNRemoveLineText(jsEditor._lineinJsEditor(4));
|
//Assert that hints are not present when comment line added into already existing code
|
||||||
|
agHelper.SelectNRemoveLineText(jsEditor._lineinJsEditor(4)); //remove only ""
|
||||||
//Assert that hints are not present when line is cleared with backspace
|
agHelper.AssertElementAbsence(locators._hints); //Assert that hints are not present when line is cleared with backspace
|
||||||
agHelper.AssertElementAbsence(locators._hints);
|
|
||||||
|
|
||||||
//Assert that hints are not present when token is a comment
|
|
||||||
agHelper.TypeText(locators._codeMirrorTextArea, "// showA'");
|
agHelper.TypeText(locators._codeMirrorTextArea, "// showA'");
|
||||||
|
agHelper.AssertElementAbsence(locators._hints);
|
||||||
|
|
||||||
|
//Check for no showAlert() hint
|
||||||
|
agHelper.GetNClick(jsEditor._lineinJsEditor(4), 0, true);
|
||||||
|
agHelper.SelectNRemoveLineText(locators._codeMirrorTextArea);
|
||||||
|
agHelper.AssertElementAbsence(locators._hints); //Assert that hints are not present when line is removed
|
||||||
|
agHelper.TypeText(locators._codeMirrorTextArea, "// showA");
|
||||||
|
agHelper.AssertElementAbsence(locators._hints); //Assert that hints are not present when token is a comment
|
||||||
|
|
||||||
|
//Check for no hint with any A in it
|
||||||
|
agHelper.GetNClick(jsEditor._lineinJsEditor(4), 0, true);
|
||||||
|
agHelper.SelectNRemoveLineText(locators._codeMirrorTextArea);
|
||||||
|
agHelper.AssertElementAbsence(locators._hints);
|
||||||
|
agHelper.TypeText(locators._codeMirrorTextArea, "// showA'");
|
||||||
agHelper.AssertElementAbsence(locators._hints);
|
agHelper.AssertElementAbsence(locators._hints);
|
||||||
|
|
||||||
cy.get("@jsObjName").then((jsObjName) => {
|
cy.get("@jsObjName").then((jsObjName) => {
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
const publish = require("../../../../locators/publishWidgetspage.json");
|
|
||||||
const testdata = require("../../../../fixtures/testdata.json");
|
|
||||||
import {
|
import {
|
||||||
entityExplorer,
|
entityExplorer,
|
||||||
propPane,
|
propPane,
|
||||||
agHelper,
|
agHelper,
|
||||||
deployMode,
|
deployMode,
|
||||||
|
locators,
|
||||||
|
draggableWidgets,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
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(() => {
|
before(() => {
|
||||||
agHelper.AddDsl("buttondsl");
|
entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("1. Button widget with action navigate to page", function () {
|
it("1. Button widget with action navigate to page", function () {
|
||||||
entityExplorer.SelectEntityByName("Button1");
|
|
||||||
propPane.SelectPlatformFunction("onClick", "Navigate to");
|
propPane.SelectPlatformFunction("onClick", "Navigate to");
|
||||||
agHelper.GetNClick(propPane._navigateToType("URL"));
|
agHelper.GetNClick(propPane._navigateToType("URL"));
|
||||||
cy.get("label")
|
cy.get("label")
|
||||||
|
|
@ -22,22 +22,15 @@ describe("Binding the button Widgets and validating NavigateTo Page functionalit
|
||||||
.within(() => {
|
.within(() => {
|
||||||
cy.get(".t--code-editor-wrapper").type(testdata.externalPage);
|
cy.get(".t--code-editor-wrapper").type(testdata.externalPage);
|
||||||
});
|
});
|
||||||
|
|
||||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
||||||
cy.wait(300);
|
cy.wait(300);
|
||||||
});
|
//. Button click should take the control to page link validation", function () {
|
||||||
|
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON));
|
||||||
it("2. Button click should take the control to page link validation", function () {
|
|
||||||
deployMode.DeployApp();
|
|
||||||
cy.wait(2000);
|
cy.wait(2000);
|
||||||
cy.get(publish.buttonWidget).click();
|
agHelper.ClickButton("Submit");
|
||||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
cy.wait(2000); //for page to load
|
||||||
cy.wait(500);
|
agHelper.AssertElementAbsence(
|
||||||
cy.get(publish.buttonWidget).should("not.exist");
|
locators._widgetInDeployed(draggableWidgets.BUTTON),
|
||||||
cy.go("back");
|
);
|
||||||
deployMode.NavigateBacktoEditor();
|
agHelper.AssertElementVisible(locators._visibleTextSpan("Build the tools"));
|
||||||
cy.wait("@getPage")
|
|
||||||
.its("response.body.responseMeta.status")
|
|
||||||
.should("eq", 200);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,7 @@ describe("Validate JSObj binding to Table widget", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("1. Add users api and bind to JSObject", () => {
|
it("1. Add users api and bind to JSObject", () => {
|
||||||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
_.apiPage.CreateAndFillApi(_.tedTestConfig.mockApiUrl);
|
||||||
_.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]);
|
|
||||||
});
|
|
||||||
_.apiPage.RunAPI();
|
_.apiPage.RunAPI();
|
||||||
_.agHelper.GetNClick(_.dataSources._queryResponse("JSON"));
|
_.agHelper.GetNClick(_.dataSources._queryResponse("JSON"));
|
||||||
_.apiPage.ReadApiResponsebyKey("name");
|
_.apiPage.ReadApiResponsebyKey("name");
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ const testdata = require("../../../../fixtures/testdata.json");
|
||||||
import {
|
import {
|
||||||
entityExplorer,
|
entityExplorer,
|
||||||
agHelper,
|
agHelper,
|
||||||
|
propPane,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Binding the multiple widgets and validating default data", function () {
|
describe("Binding the multiple widgets and validating default data", function () {
|
||||||
|
|
@ -13,21 +14,15 @@ describe("Binding the multiple widgets and validating default data", function ()
|
||||||
|
|
||||||
it("1. Input widget test with default value from table widget", function () {
|
it("1. Input widget test with default value from table widget", function () {
|
||||||
entityExplorer.SelectEntityByName("Input1");
|
entityExplorer.SelectEntityByName("Input1");
|
||||||
cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}");
|
propPane.UpdatePropertyFieldValue(
|
||||||
|
"Default value",
|
||||||
cy.wait("@updateLayout").should(
|
testdata.defaultInputWidget + "}}",
|
||||||
"have.nested.property",
|
|
||||||
"response.body.responseMeta.status",
|
|
||||||
200,
|
|
||||||
);
|
);
|
||||||
//Dropdown widget test with default value from table widget
|
//Dropdown widget test with default value from table widget
|
||||||
entityExplorer.SelectEntityByName("Dropdown1");
|
entityExplorer.SelectEntityByName("Dropdown1");
|
||||||
cy.testJsontext("options", JSON.stringify(testdata.deafultDropDownWidget));
|
propPane.UpdatePropertyFieldValue(
|
||||||
|
"Options",
|
||||||
cy.wait("@updateLayout").should(
|
JSON.stringify(testdata.deafultDropDownWidget),
|
||||||
"have.nested.property",
|
|
||||||
"response.body.responseMeta.status",
|
|
||||||
200,
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ import {
|
||||||
apiPage,
|
apiPage,
|
||||||
dataSources,
|
dataSources,
|
||||||
debuggerHelper,
|
debuggerHelper,
|
||||||
|
tedTestConfig,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
import { Widgets } from "../../../../support/Pages/DataSources";
|
import { Widgets } from "../../../../support/Pages/DataSources";
|
||||||
import datasourceFormData from "../../../../fixtures/datasources.json";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ERROR_ACTION_EXECUTE_FAIL,
|
ERROR_ACTION_EXECUTE_FAIL,
|
||||||
|
|
@ -16,7 +16,7 @@ import {
|
||||||
|
|
||||||
describe("API Bugs", function () {
|
describe("API Bugs", function () {
|
||||||
it("1. Bug 14037: User gets an error even when table widget is added from the API page successfully", function () {
|
it("1. Bug 14037: User gets an error even when table widget is added from the API page successfully", function () {
|
||||||
apiPage.CreateAndFillApi(datasourceFormData.mockApiUrl, "Api1");
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl, "Api1");
|
||||||
apiPage.RunAPI();
|
apiPage.RunAPI();
|
||||||
|
|
||||||
dataSources.AddSuggesstedWidget(Widgets.Table);
|
dataSources.AddSuggesstedWidget(Widgets.Table);
|
||||||
|
|
@ -44,7 +44,7 @@ describe("API Bugs", function () {
|
||||||
|
|
||||||
it("3. Bug 18876 Ensures application does not crash when saving datasource", () => {
|
it("3. Bug 18876 Ensures application does not crash when saving datasource", () => {
|
||||||
apiPage.CreateAndFillApi(
|
apiPage.CreateAndFillApi(
|
||||||
datasourceFormData.mockApiUrl,
|
tedTestConfig.mockApiUrl,
|
||||||
"FirstAPI",
|
"FirstAPI",
|
||||||
10000,
|
10000,
|
||||||
"POST",
|
"POST",
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
import {
|
||||||
import datasourceFormData from "../../../../fixtures/datasources.json";
|
tedTestConfig,
|
||||||
|
agHelper,
|
||||||
const agHelper = ObjectsRegistry.AggregateHelper;
|
jsEditor,
|
||||||
const jsEditor = ObjectsRegistry.JSEditor;
|
apiPage,
|
||||||
const apiPage = ObjectsRegistry.ApiPage;
|
entityExplorer,
|
||||||
const ee = ObjectsRegistry.EntityExplorer;
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("JS data update on button click", function () {
|
describe("JS data update on button click", function () {
|
||||||
before(() => {
|
before(() => {
|
||||||
|
|
@ -12,7 +12,7 @@ describe("JS data update on button click", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("1. Populates js function data when triggered via button click", function () {
|
it("1. Populates js function data when triggered via button click", function () {
|
||||||
apiPage.CreateAndFillApi(datasourceFormData.mockApiUrl, "Api1");
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl, "Api1");
|
||||||
|
|
||||||
const jsObjectString = `export default {
|
const jsObjectString = `export default {
|
||||||
myVar1: [],
|
myVar1: [],
|
||||||
|
|
@ -35,7 +35,7 @@ describe("JS data update on button click", function () {
|
||||||
toRun: false,
|
toRun: false,
|
||||||
shouldCreateNewJSObj: true,
|
shouldCreateNewJSObj: true,
|
||||||
});
|
});
|
||||||
ee.SelectEntityByName("Button2", "Widgets");
|
entityExplorer.SelectEntityByName("Button2", "Widgets");
|
||||||
agHelper.ClickButton("Submit");
|
agHelper.ClickButton("Submit");
|
||||||
agHelper.AssertContains("myFun1 Data", "exist");
|
agHelper.AssertContains("myFun1 Data", "exist");
|
||||||
agHelper.AssertContains("myFun2 Data", "exist");
|
agHelper.AssertContains("myFun2 Data", "exist");
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ describe("Binding Expressions should not be truncated in Url and path extraction
|
||||||
shouldCreateNewJSObj: true,
|
shouldCreateNewJSObj: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
_.apiPage.CreateAndFillGraphqlApi(_.hostPort.GraphqlApiUrl_TED);
|
_.apiPage.CreateAndFillGraphqlApi(_.tedTestConfig.GraphqlApiUrl_TED);
|
||||||
_.dataSources.UpdateGraphqlQueryAndVariable({
|
_.dataSources.UpdateGraphqlQueryAndVariable({
|
||||||
query: GRAPHQL_LIMIT_QUERY,
|
query: GRAPHQL_LIMIT_QUERY,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,12 @@ import {
|
||||||
apiPage,
|
apiPage,
|
||||||
entityExplorer,
|
entityExplorer,
|
||||||
entityItems,
|
entityItems,
|
||||||
hostPort,
|
tedTestConfig,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Bug #15372 Catch block was not triggering in Safari/firefox", () => {
|
describe("Bug #15372 Catch block was not triggering in Safari/firefox", () => {
|
||||||
it("1. Triggers the catch block when the API hits a 404", () => {
|
it("1. Triggers the catch block when the API hits a 404", () => {
|
||||||
apiPage.CreateAndFillApi(hostPort.mockHttpCodeUrl + "404");
|
apiPage.CreateAndFillApi(tedTestConfig.mockHttpCodeUrl + "404");
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
fun: async () => {
|
fun: async () => {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import * as _ from "../../../../support/Objects/ObjectsCore";
|
import * as _ from "../../../../support/Objects/ObjectsCore";
|
||||||
import datasourceFormData from "../../../../fixtures/datasources.json";
|
|
||||||
|
|
||||||
let repoName: any;
|
let repoName: any;
|
||||||
let tempBranch: any;
|
let tempBranch: any;
|
||||||
|
|
@ -16,9 +15,8 @@ describe("Git Bugs", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("1. Bug 16248, When GitSync modal is open, block shortcut action execution", function () {
|
it("1. Bug 16248, When GitSync modal is open, block shortcut action execution", function () {
|
||||||
const largeResponseApiUrl = datasourceFormData.mockApiUrl;
|
|
||||||
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
||||||
_.apiPage.CreateAndFillApi(largeResponseApiUrl, "GitSyncTest");
|
_.apiPage.CreateAndFillApi(_.tedTestConfig.mockApiUrl, "GitSyncTest");
|
||||||
_.gitSync.OpenGitSyncModal();
|
_.gitSync.OpenGitSyncModal();
|
||||||
cy.get("body").type(`{${modifierKey}}{enter}`);
|
cy.get("body").type(`{${modifierKey}}{enter}`);
|
||||||
cy.get("@postExecute").should("not.exist");
|
cy.get("@postExecute").should("not.exist");
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import {
|
||||||
apiPage,
|
apiPage,
|
||||||
draggableWidgets,
|
draggableWidgets,
|
||||||
fakerHelper,
|
fakerHelper,
|
||||||
|
tedTestConfig,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
const widgetsToTest = {
|
const widgetsToTest = {
|
||||||
|
|
@ -79,9 +80,7 @@ const widgetsToTest = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function configureApi() {
|
function configureApi() {
|
||||||
cy.fixture("datasources").then((datasourceFormData) => {
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl, "FirstAPI");
|
||||||
apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "FirstAPI");
|
|
||||||
});
|
|
||||||
apiPage.EnterHeader("value", "{{this.params.value}}");
|
apiPage.EnterHeader("value", "{{this.params.value}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ describe("Git sync modal: connect tab", function () {
|
||||||
cy.get(gitSyncLocators.generateDeployKeyBtn).should("not.exist");
|
cy.get(gitSyncLocators.generateDeployKeyBtn).should("not.exist");
|
||||||
|
|
||||||
cy.get(gitSyncLocators.gitRepoInput).type(
|
cy.get(gitSyncLocators.gitRepoInput).type(
|
||||||
`{selectAll}${_.hostPort.GITEA_API_URL_TED}/${repoName}.git`,
|
`{selectAll}${_.tedTestConfig.GITEA_API_URL_TED}/${repoName}.git`,
|
||||||
);
|
);
|
||||||
cy.contains(Cypress.env("MESSAGES").PASTE_SSH_URL_INFO()).should(
|
cy.contains(Cypress.env("MESSAGES").PASTE_SSH_URL_INFO()).should(
|
||||||
"not.exist",
|
"not.exist",
|
||||||
|
|
@ -104,7 +104,7 @@ describe("Git sync modal: connect tab", function () {
|
||||||
cy.get(gitSyncLocators.connectSubmitBtn).should("be.disabled");
|
cy.get(gitSyncLocators.connectSubmitBtn).should("be.disabled");
|
||||||
|
|
||||||
cy.get(gitSyncLocators.gitRepoInput).type(
|
cy.get(gitSyncLocators.gitRepoInput).type(
|
||||||
`{selectAll}${_.hostPort.GITEA_API_URL_TED}/${repoName}.git`,
|
`{selectAll}${_.tedTestConfig.GITEA_API_URL_TED}/${repoName}.git`,
|
||||||
);
|
);
|
||||||
cy.contains(Cypress.env("MESSAGES").PASTE_SSH_URL_INFO()).should(
|
cy.contains(Cypress.env("MESSAGES").PASTE_SSH_URL_INFO()).should(
|
||||||
"not.exist",
|
"not.exist",
|
||||||
|
|
@ -200,7 +200,7 @@ describe("Git sync modal: connect tab", function () {
|
||||||
|
|
||||||
cy.get(gitSyncLocators.gitRepoInput)
|
cy.get(gitSyncLocators.gitRepoInput)
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.type(`{selectAll}${_.hostPort.GITEA_API_URL_TED}/${repoName}.git`, {
|
.type(`{selectAll}${_.tedTestConfig.GITEA_API_URL_TED}/${repoName}.git`, {
|
||||||
force: true,
|
force: true,
|
||||||
});
|
});
|
||||||
cy.get(gitSyncLocators.connectSubmitBtn).scrollIntoView().click();
|
cy.get(gitSyncLocators.connectSubmitBtn).scrollIntoView().click();
|
||||||
|
|
@ -213,7 +213,7 @@ describe("Git sync modal: connect tab", function () {
|
||||||
|
|
||||||
cy.get(gitSyncLocators.gitRepoInput)
|
cy.get(gitSyncLocators.gitRepoInput)
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.type(`{selectAll}${_.hostPort.GITEA_API_URL_TED}/${repoName}.git`, {
|
.type(`{selectAll}${_.tedTestConfig.GITEA_API_URL_TED}/${repoName}.git`, {
|
||||||
force: true,
|
force: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -234,7 +234,7 @@ describe("Git sync modal: connect tab", function () {
|
||||||
|
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${_.hostPort.GITEA_API_BASE_TED}:${_.hostPort.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repoName}/keys`,
|
url: `${_.tedTestConfig.GITEA_API_BASE_TED}:${_.tedTestConfig.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repoName}/keys`,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import homePageLocators from "../../../../../locators/HomePage";
|
||||||
import {
|
import {
|
||||||
agHelper,
|
agHelper,
|
||||||
entityExplorer,
|
entityExplorer,
|
||||||
hostPort,
|
tedTestConfig,
|
||||||
gitSync,
|
gitSync,
|
||||||
homePage,
|
homePage,
|
||||||
jsEditor,
|
jsEditor,
|
||||||
|
|
@ -286,7 +286,7 @@ describe("Git sync Bug #10773", function () {
|
||||||
`generateKey-${repoName}`,
|
`generateKey-${repoName}`,
|
||||||
);
|
);
|
||||||
cy.get(gitSyncLocators.gitRepoInput).type(
|
cy.get(gitSyncLocators.gitRepoInput).type(
|
||||||
`{selectAll}${hostPort.GITEA_API_URL_TED}/${repoName}.git`,
|
`{selectAll}${tedTestConfig.GITEA_API_URL_TED}/${repoName}.git`,
|
||||||
);
|
);
|
||||||
// abort git flow after generating key
|
// abort git flow after generating key
|
||||||
cy.get(gitSyncLocators.closeGitSyncModal).click();
|
cy.get(gitSyncLocators.closeGitSyncModal).click();
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import {
|
||||||
locators,
|
locators,
|
||||||
propPane,
|
propPane,
|
||||||
entityItems,
|
entityItems,
|
||||||
|
tedTestConfig,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
import datasourceFormData from "../../../../fixtures/datasources.json";
|
|
||||||
|
|
||||||
const successMessage = "Successful Trigger";
|
const successMessage = "Successful Trigger";
|
||||||
const errorMessage = "Unsuccessful Trigger";
|
const errorMessage = "Unsuccessful Trigger";
|
||||||
|
|
@ -80,7 +80,7 @@ describe("Linting", () => {
|
||||||
clickButtonAndAssertLintError(true);
|
clickButtonAndAssertLintError(true);
|
||||||
|
|
||||||
// create Api1
|
// create Api1
|
||||||
apiPage.CreateAndFillApi(datasourceFormData.mockApiUrl);
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl);
|
||||||
|
|
||||||
clickButtonAndAssertLintError(false);
|
clickButtonAndAssertLintError(false);
|
||||||
|
|
||||||
|
|
@ -94,7 +94,7 @@ describe("Linting", () => {
|
||||||
clickButtonAndAssertLintError(true);
|
clickButtonAndAssertLintError(true);
|
||||||
|
|
||||||
// Re-create Api1
|
// Re-create Api1
|
||||||
apiPage.CreateAndFillApi(datasourceFormData.mockApiUrl);
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl);
|
||||||
|
|
||||||
clickButtonAndAssertLintError(false);
|
clickButtonAndAssertLintError(false);
|
||||||
});
|
});
|
||||||
|
|
@ -295,7 +295,7 @@ describe("Linting", () => {
|
||||||
shouldCreateNewJSObj: true,
|
shouldCreateNewJSObj: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
apiPage.CreateAndFillApi(datasourceFormData.mockApiUrl);
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl);
|
||||||
|
|
||||||
createMySQLDatasourceQuery();
|
createMySQLDatasourceQuery();
|
||||||
agHelper.RefreshPage(); //Since this seems failing a bit
|
agHelper.RefreshPage(); //Since this seems failing a bit
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ import {
|
||||||
apiPage,
|
apiPage,
|
||||||
draggableWidgets,
|
draggableWidgets,
|
||||||
locators,
|
locators,
|
||||||
|
tedTestConfig,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
import datasourceFormData from "../../../../fixtures/datasources.json";
|
|
||||||
|
|
||||||
describe("Linting of entity properties", () => {
|
describe("Linting of entity properties", () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
|
|
@ -19,7 +19,7 @@ describe("Linting of entity properties", () => {
|
||||||
it("1. Shows correct lint error when wrong Api property is binded", () => {
|
it("1. Shows correct lint error when wrong Api property is binded", () => {
|
||||||
const invalidProperty = "unknownProperty";
|
const invalidProperty = "unknownProperty";
|
||||||
// create Api1
|
// create Api1
|
||||||
apiPage.CreateAndFillApi(datasourceFormData.mockApiUrl);
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl);
|
||||||
// Edit Button onclick property
|
// Edit Button onclick property
|
||||||
entityExplorer.SelectEntityByName("Button1", "Widgets");
|
entityExplorer.SelectEntityByName("Button1", "Widgets");
|
||||||
propPane.EnterJSContext(
|
propPane.EnterJSContext(
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,12 @@ describe("excludeForAirgap", "Guided Tour", function () {
|
||||||
entityExplorer.SelectEntityByName("CustomersTable");
|
entityExplorer.SelectEntityByName("CustomersTable");
|
||||||
|
|
||||||
// Step 3: Add binding to the tableData property
|
// Step 3: Add binding to the tableData property
|
||||||
propPane.UpdatePropertyFieldValue("Table data", "{{getCustomers.data}}");
|
propPane.UpdatePropertyFieldValue(
|
||||||
|
"Table data",
|
||||||
|
"{{getCustomers.data}}",
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
);
|
||||||
cy.get(guidedTourLocators.successButton).click();
|
cy.get(guidedTourLocators.successButton).click();
|
||||||
cy.get(guidedTourLocators.infoButton).click();
|
cy.get(guidedTourLocators.infoButton).click();
|
||||||
// Renaming widgets // Commending below wait due to flakiness
|
// Renaming widgets // Commending below wait due to flakiness
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import homePageLocators from "../../../../locators/HomePage";
|
import homePageLocators from "../../../../locators/HomePage";
|
||||||
const explorer = require("../../../../locators/explorerlocators.json");
|
const explorer = require("../../../../locators/explorerlocators.json");
|
||||||
import {
|
import {
|
||||||
|
assertHelper,
|
||||||
entityExplorer,
|
entityExplorer,
|
||||||
homePage,
|
homePage,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
@ -30,13 +31,8 @@ describe("Slug URLs", () => {
|
||||||
it("2. Checks if application slug updates on the URL when application name changes", () => {
|
it("2. Checks if application slug updates on the URL when application name changes", () => {
|
||||||
cy.generateUUID().then((appName) => {
|
cy.generateUUID().then((appName) => {
|
||||||
applicationName = appName;
|
applicationName = appName;
|
||||||
cy.AppSetupForRename();
|
homePage.RenameApplication(applicationName);
|
||||||
cy.get(homePageLocators.applicationName).type(`${appName}` + "{enter}");
|
assertHelper.AssertNetworkStatus("updateApplication");
|
||||||
cy.wait("@updateApplication").should(
|
|
||||||
"have.nested.property",
|
|
||||||
"response.body.responseMeta.status",
|
|
||||||
200,
|
|
||||||
);
|
|
||||||
cy.location("pathname").then((pathname) => {
|
cy.location("pathname").then((pathname) => {
|
||||||
const pageId = pathname.split("/")[3]?.split("-").pop();
|
const pageId = pathname.split("/")[3]?.split("-").pop();
|
||||||
expect(pathname).to.be.equal(`/app/${appName}/page1-${pageId}/edit`);
|
expect(pathname).to.be.equal(`/app/${appName}/page1-${pageId}/edit`);
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,8 @@ describe("Entity bottom bar", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("3. Api bottom pane should be collapsable", () => {
|
it("3. Api bottom pane should be collapsable", () => {
|
||||||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
|
||||||
_.entityExplorer.NavigateToSwitcher("Explorer");
|
_.entityExplorer.NavigateToSwitcher("Explorer");
|
||||||
_.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]);
|
_.apiPage.CreateAndFillApi(_.tedTestConfig.mockApiUrl);
|
||||||
//Verify if bottom bar opens on clicking debugger icon in api page.
|
//Verify if bottom bar opens on clicking debugger icon in api page.
|
||||||
_.debuggerHelper.ClickDebuggerIcon();
|
_.debuggerHelper.ClickDebuggerIcon();
|
||||||
_.debuggerHelper.AssertOpen(PageType.API);
|
_.debuggerHelper.AssertOpen(PageType.API);
|
||||||
|
|
@ -58,7 +57,6 @@ describe("Entity bottom bar", () => {
|
||||||
//verify if response tab is selected on execution api.
|
//verify if response tab is selected on execution api.
|
||||||
_.debuggerHelper.AssertSelectedTab("Response");
|
_.debuggerHelper.AssertSelectedTab("Response");
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it("4. Bottom bar in Datasource", () => {
|
it("4. Bottom bar in Datasource", () => {
|
||||||
//Verify if bottom bar remain open on shifting to create new datasource page.
|
//Verify if bottom bar remain open on shifting to create new datasource page.
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,12 @@ import * as _ from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Peek overlay", () => {
|
describe("Peek overlay", () => {
|
||||||
it("1. Main test", () => {
|
it("1. Main test", () => {
|
||||||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
|
||||||
_.entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 500, 100);
|
_.entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 500, 100);
|
||||||
_.entityExplorer.NavigateToSwitcher("Explorer");
|
_.entityExplorer.NavigateToSwitcher("Explorer");
|
||||||
_.table.AddSampleTableData();
|
_.table.AddSampleTableData();
|
||||||
_.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]);
|
_.apiPage.CreateAndFillApi(_.tedTestConfig.mockApiUrl);
|
||||||
_.apiPage.RunAPI();
|
_.apiPage.RunAPI();
|
||||||
_.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]);
|
_.apiPage.CreateAndFillApi(_.tedTestConfig.mockApiUrl);
|
||||||
_.jsEditor.CreateJSObject(JsObjectContent, {
|
_.jsEditor.CreateJSObject(JsObjectContent, {
|
||||||
paste: true,
|
paste: true,
|
||||||
completeReplace: true,
|
completeReplace: true,
|
||||||
|
|
@ -130,7 +129,6 @@ describe("Peek overlay", () => {
|
||||||
_.peekOverlay.ResetHover();
|
_.peekOverlay.ResetHover();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
const JsObjectContent = `export default {
|
const JsObjectContent = `export default {
|
||||||
numArray: [1, 2, 3],
|
numArray: [1, 2, 3],
|
||||||
|
|
|
||||||
|
|
@ -15,14 +15,10 @@ describe("Published mode toggle toast with debug flag in the url", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("1. Should not show any application related toasts", function () {
|
it("1. Should not show any application related toasts", function () {
|
||||||
cy.fixture("datasources").then((datasourceFormData) => {
|
_.apiPage.CreateAndFillApi(_.tedTestConfig.mockApiUrl, "Correct_users");
|
||||||
_.apiPage.CreateAndFillApi(
|
|
||||||
datasourceFormData["mockApiUrl"],
|
|
||||||
"Correct_users",
|
|
||||||
);
|
|
||||||
_.apiPage.ToggleOnPageLoadRun(true);
|
_.apiPage.ToggleOnPageLoadRun(true);
|
||||||
_.apiPage.CreateAndFillApi(
|
_.apiPage.CreateAndFillApi(
|
||||||
datasourceFormData["mockApiUrl"].replace("mock-api", "mock-api2err"),
|
_.tedTestConfig.mockApiUrl.replace("mock-api", "mock-api2err"),
|
||||||
"Incorrect_users",
|
"Incorrect_users",
|
||||||
);
|
);
|
||||||
_.apiPage.ToggleOnPageLoadRun(true);
|
_.apiPage.ToggleOnPageLoadRun(true);
|
||||||
|
|
@ -67,7 +63,6 @@ describe("Published mode toggle toast with debug flag in the url", function () {
|
||||||
_.locators._toastMsg,
|
_.locators._toastMsg,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it("2. Should show all application related toasts with debug flag true in url", function () {
|
it("2. Should show all application related toasts with debug flag true in url", function () {
|
||||||
cy.url().then((url) => {
|
cy.url().then((url) => {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import {
|
||||||
jsEditor,
|
jsEditor,
|
||||||
locators,
|
locators,
|
||||||
propPane,
|
propPane,
|
||||||
|
tedTestConfig,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Validate JS Object Refactoring does not affect the comments & variables", () => {
|
describe("Validate JS Object Refactoring does not affect the comments & variables", () => {
|
||||||
|
|
@ -40,10 +41,8 @@ describe("Validate JS Object Refactoring does not affect the comments & variable
|
||||||
dataSources.CreateDataSource("MySql", true, false);
|
dataSources.CreateDataSource("MySql", true, false);
|
||||||
cy.get("@dsName").then(($dsName) => {
|
cy.get("@dsName").then(($dsName) => {
|
||||||
dsName = $dsName;
|
dsName = $dsName;
|
||||||
});
|
|
||||||
|
|
||||||
//Selecting paintings table from MySQL DS
|
//Selecting paintings table from MySQL DS
|
||||||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
|
||||||
//Initialize new JSObject with custom code
|
//Initialize new JSObject with custom code
|
||||||
jsEditor.CreateJSObject(jsCode);
|
jsEditor.CreateJSObject(jsCode);
|
||||||
//Initialize new Query entity with custom query
|
//Initialize new Query entity with custom query
|
||||||
|
|
@ -54,7 +53,7 @@ describe("Validate JS Object Refactoring does not affect the comments & variable
|
||||||
); //Creating query from EE overlay
|
); //Creating query from EE overlay
|
||||||
//Initialize new API entity with custom header
|
//Initialize new API entity with custom header
|
||||||
apiPage.CreateAndFillApi(
|
apiPage.CreateAndFillApi(
|
||||||
datasourceFormData["mockApiUrl"],
|
tedTestConfig.mockApiUrl,
|
||||||
refactorInput.api.oldName,
|
refactorInput.api.oldName,
|
||||||
);
|
);
|
||||||
apiPage.EnterHeader("key1", `{{\tJSObject1.myVar1}}`);
|
apiPage.EnterHeader("key1", `{{\tJSObject1.myVar1}}`);
|
||||||
|
|
|
||||||
|
|
@ -129,14 +129,12 @@ describe("DatePicker Widget Property pane tests with js bindings", function () {
|
||||||
.type("04/05/2021 06:25")
|
.type("04/05/2021 06:25")
|
||||||
.wait(2000);
|
.wait(2000);
|
||||||
cy.selectDateFormat("LLL");
|
cy.selectDateFormat("LLL");
|
||||||
cy.wait("@updateLayout");
|
|
||||||
cy.get(".t--draggable-textwidget .bp3-ui-text")
|
cy.get(".t--draggable-textwidget .bp3-ui-text")
|
||||||
.first()
|
.first()
|
||||||
.should("contain.text", "May 4, 2021 6:25 AM");
|
.should("contain.text", "May 4, 2021 6:25 AM");
|
||||||
|
|
||||||
_.propPane.EnterJSContext("Default Date", "2020-02-01");
|
_.propPane.UpdatePropertyFieldValue("Default Date", "2020-02-01");
|
||||||
_.propPane.EnterJSContext("Min Date", "2020-01-01");
|
_.propPane.UpdatePropertyFieldValue("Max Date", "2020-02-10");
|
||||||
_.propPane.EnterJSContext("Max Date", "2020-02-10");
|
|
||||||
|
|
||||||
_.agHelper.AssertErrorTooltip("Date out of range");
|
_.agHelper.AssertErrorTooltip("Date out of range");
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,12 @@ describe("File picker widget v2", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("3. Check if the uploaded data does not reset when back from query page", () => {
|
it("3. Check if the uploaded data does not reset when back from query page", () => {
|
||||||
cy.fixture("datasources").then((datasourceFormData) => {
|
|
||||||
cy.openPropertyPane("textwidget");
|
cy.openPropertyPane("textwidget");
|
||||||
cy.updateCodeInput(
|
cy.updateCodeInput(
|
||||||
".t--property-control-text",
|
".t--property-control-text",
|
||||||
`{{FilePicker1.files[0].name}}`,
|
`{{FilePicker1.files[0].name}}`,
|
||||||
);
|
);
|
||||||
cy.createAndFillApi(datasourceFormData["mockApiUrl"], "");
|
cy.createAndFillApi(_.tedTestConfig.mockApiUrl, "");
|
||||||
cy.updateCodeInput(
|
cy.updateCodeInput(
|
||||||
"[class*='t--actionConfiguration']",
|
"[class*='t--actionConfiguration']",
|
||||||
"{{FilePicker1.files}}",
|
"{{FilePicker1.files}}",
|
||||||
|
|
@ -60,7 +59,6 @@ describe("File picker widget v2", () => {
|
||||||
);
|
);
|
||||||
cy.get(".t--widget-textwidget").should("contain", "testFile.mov");
|
cy.get(".t--widget-textwidget").should("contain", "testFile.mov");
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it("4. Check if the uploaded file is removed on click of cancel button", () => {
|
it("4. Check if the uploaded file is removed on click of cancel button", () => {
|
||||||
cy.get(widgetsPage.filepickerwidgetv2).click();
|
cy.get(widgetsPage.filepickerwidgetv2).click();
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,6 @@ describe("Binding the list widget with text widget", function () {
|
||||||
"Items",
|
"Items",
|
||||||
'[[{ "name": "pawan"}, { "name": "Vivek" }], [{ "name": "Ashok"}, {"name": "rahul"}]]',
|
'[[{ "name": "pawan"}, { "name": "Vivek" }], [{ "name": "Ashok"}, {"name": "rahul"}]]',
|
||||||
);
|
);
|
||||||
cy.wait("@updateLayout").should(
|
|
||||||
"have.nested.property",
|
|
||||||
"response.body.responseMeta.status",
|
|
||||||
200,
|
|
||||||
);
|
|
||||||
_.entityExplorer.ExpandCollapseEntity("List1");
|
_.entityExplorer.ExpandCollapseEntity("List1");
|
||||||
_.entityExplorer.ExpandCollapseEntity("Container1");
|
_.entityExplorer.ExpandCollapseEntity("Container1");
|
||||||
_.entityExplorer.SelectEntityByName("Text3");
|
_.entityExplorer.SelectEntityByName("Text3");
|
||||||
|
|
@ -50,11 +45,6 @@ describe("Binding the list widget with text widget", function () {
|
||||||
"Text",
|
"Text",
|
||||||
'{{currentItem.map(item => item.name).join(", ")}}',
|
'{{currentItem.map(item => item.name).join(", ")}}',
|
||||||
);
|
);
|
||||||
cy.wait("@updateLayout").should(
|
|
||||||
"have.nested.property",
|
|
||||||
"response.body.responseMeta.status",
|
|
||||||
200,
|
|
||||||
);
|
|
||||||
_.deployMode.DeployApp();
|
_.deployMode.DeployApp();
|
||||||
cy.wait(2000);
|
cy.wait(2000);
|
||||||
cy.get(".t--widget-textwidget span:contains('pawan, Vivek')").should(
|
cy.get(".t--widget-textwidget span:contains('pawan, Vivek')").should(
|
||||||
|
|
@ -76,23 +66,12 @@ describe("Binding the list widget with text widget", function () {
|
||||||
"Items",
|
"Items",
|
||||||
'[{ "name": "pawan"}, { "name": "Vivek" }]',
|
'[{ "name": "pawan"}, { "name": "Vivek" }]',
|
||||||
);
|
);
|
||||||
cy.wait("@updateLayout").should(
|
|
||||||
"have.nested.property",
|
|
||||||
"response.body.responseMeta.status",
|
|
||||||
200,
|
|
||||||
);
|
|
||||||
|
|
||||||
_.entityExplorer.ExpandCollapseEntity("List1");
|
_.entityExplorer.ExpandCollapseEntity("List1");
|
||||||
_.entityExplorer.ExpandCollapseEntity("Container1");
|
_.entityExplorer.ExpandCollapseEntity("Container1");
|
||||||
_.entityExplorer.SelectEntityByName("Text3");
|
_.entityExplorer.SelectEntityByName("Text3");
|
||||||
|
|
||||||
cy.wait(1000);
|
cy.wait(1000);
|
||||||
_.propPane.UpdatePropertyFieldValue("Text", "{{currentItem.name}}");
|
_.propPane.UpdatePropertyFieldValue("Text", "{{currentItem.name}}");
|
||||||
cy.wait("@updateLayout").should(
|
|
||||||
"have.nested.property",
|
|
||||||
"response.body.responseMeta.status",
|
|
||||||
200,
|
|
||||||
);
|
|
||||||
_.deployMode.DeployApp();
|
_.deployMode.DeployApp();
|
||||||
cy.wait(2000);
|
cy.wait(2000);
|
||||||
cy.get(".t--widget-textwidget span:contains('Vivek')").should(
|
cy.get(".t--widget-textwidget span:contains('Vivek')").should(
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,17 @@
|
||||||
const simpleListDSL = require("../../../../../fixtures/Listv2/simpleList.json");
|
|
||||||
const simpleListWithLargeDataDSL = require("../../../../../fixtures/Listv2/simpleListWithLargeData.json");
|
|
||||||
const ListV2WithNullPrimaryKeyDSL = require("../../../../../fixtures/Listv2/ListV2WithNullPrimaryKey.json");
|
|
||||||
const widgetsPage = require("../../../../../locators/Widgets.json");
|
const widgetsPage = require("../../../../../locators/Widgets.json");
|
||||||
const commonlocators = require("../../../../../locators/commonlocators.json");
|
const commonlocators = require("../../../../../locators/commonlocators.json");
|
||||||
import * as _ from "../../../../../support/Objects/ObjectsCore";
|
import * as _ from "../../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
const propertyControl = ".t--property-control";
|
const propertyControl = ".t--property-control";
|
||||||
|
|
||||||
const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`;
|
const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`;
|
||||||
|
|
||||||
function testJsontextClear(endp) {
|
function testJsontextClear(endp) {
|
||||||
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
||||||
|
|
||||||
cy.get(".t--property-control-" + endp + " .CodeMirror textarea")
|
cy.get(".t--property-control-" + endp + " .CodeMirror textarea")
|
||||||
.first()
|
.first()
|
||||||
.focus({ force: true })
|
.focus({ force: true })
|
||||||
.type(`{${modifierKey}}{a}`, { force: true })
|
.type(`{${modifierKey}}{a}`, { force: true })
|
||||||
.type(`{${modifierKey}}{del}`, { force: true });
|
.type(`{${modifierKey}}{del}`, { force: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = [
|
const data = [
|
||||||
{
|
{
|
||||||
id: "001",
|
id: "001",
|
||||||
|
|
@ -50,7 +43,7 @@ describe("List v2 - Data Identifier property", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("1. is present in the property pane", () => {
|
it("1. is present in the property pane", () => {
|
||||||
cy.addDsl(simpleListDSL);
|
_.agHelper.AddDsl("Listv2/simpleList");
|
||||||
|
|
||||||
cy.openPropertyPane("listwidgetv2");
|
cy.openPropertyPane("listwidgetv2");
|
||||||
|
|
||||||
|
|
@ -132,7 +125,7 @@ describe("List v2 - Data Identifier property", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("6. with large data set and data identifier set, the rows should render", () => {
|
it("6. with large data set and data identifier set, the rows should render", () => {
|
||||||
cy.addDsl(simpleListWithLargeDataDSL);
|
_.agHelper.AddDsl("Listv2/simpleListWithLargeData");
|
||||||
|
|
||||||
cy.openPropertyPane("listwidgetv2");
|
cy.openPropertyPane("listwidgetv2");
|
||||||
|
|
||||||
|
|
@ -180,7 +173,8 @@ describe("List v2 - Data Identifier property", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("9. Widgets get displayed when PrimaryKey doesn't exist - SSP", () => {
|
it("9. Widgets get displayed when PrimaryKey doesn't exist - SSP", () => {
|
||||||
cy.addDsl(ListV2WithNullPrimaryKeyDSL);
|
_.agHelper.AddDsl("Listv2/ListV2WithNullPrimaryKey");
|
||||||
|
_.agHelper.AddDsl("Listv2/ListV2WithNullPrimaryKey");
|
||||||
cy.createAndFillApi(
|
cy.createAndFillApi(
|
||||||
"https://api.punkapi.com/v2/beers?page={{List1.pageNo}}&per_page={{List1.pageSize}}",
|
"https://api.punkapi.com/v2/beers?page={{List1.pageNo}}&per_page={{List1.pageSize}}",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,8 @@ const commonlocators = require("../../../../../locators/commonlocators.json");
|
||||||
import * as _ from "../../../../../support/Objects/ObjectsCore";
|
import * as _ from "../../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`;
|
const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`;
|
||||||
|
|
||||||
const items = dsl.dsl.children[4]?.listData;
|
const items = dsl.dsl.children[4]?.listData;
|
||||||
|
|
||||||
const containerWidgetSelector = `[type="CONTAINER_WIDGET"]`;
|
const containerWidgetSelector = `[type="CONTAINER_WIDGET"]`;
|
||||||
|
|
||||||
function testJsontextClear(endp) {
|
function testJsontextClear(endp) {
|
||||||
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
||||||
|
|
||||||
|
|
@ -47,9 +44,7 @@ const verifyDefaultItem = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
function setUpDataSource() {
|
function setUpDataSource() {
|
||||||
cy.fixture("datasources").then((datasourceFormData) => {
|
_.apiPage.CreateAndFillApi(_.tedTestConfig.mockApiUrl + "0");
|
||||||
_.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"] + "0");
|
|
||||||
});
|
|
||||||
cy.RunAPI();
|
cy.RunAPI();
|
||||||
_.entityExplorer.SelectEntityByName("List1");
|
_.entityExplorer.SelectEntityByName("List1");
|
||||||
cy.wait(200);
|
cy.wait(200);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
const commonlocators = require("../../../../../locators/commonlocators.json");
|
const commonlocators = require("../../../../../locators/commonlocators.json");
|
||||||
const widgetsPage = require("../../../../../locators/Widgets.json");
|
const widgetsPage = require("../../../../../locators/Widgets.json");
|
||||||
import {
|
import {
|
||||||
|
agHelper,
|
||||||
draggableWidgets,
|
draggableWidgets,
|
||||||
entityExplorer,
|
entityExplorer,
|
||||||
} from "../../../../../support/Objects/ObjectsCore";
|
} from "../../../../../support/Objects/ObjectsCore";
|
||||||
|
|
@ -28,11 +29,6 @@ function deleteAllWidgetsInContainer() {
|
||||||
cy.wait(1000);
|
cy.wait(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateToastExist() {
|
|
||||||
cy.validateToastMessage("ListWidget_Blue_0");
|
|
||||||
cy.wait(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateToastDoestExist() {
|
function validateToastDoestExist() {
|
||||||
cy.wait(500);
|
cy.wait(500);
|
||||||
cy.get(commonlocators.toastmsg, { timeout: 100 }).should("not.exist");
|
cy.get(commonlocators.toastmsg, { timeout: 100 }).should("not.exist");
|
||||||
|
|
@ -57,35 +53,27 @@ describe("List widget v2 onItemClick", () => {
|
||||||
.first()
|
.first()
|
||||||
.click({ force: true });
|
.click({ force: true });
|
||||||
|
|
||||||
cy.validateToastMessage("ListWidget_Blue_0");
|
agHelper.WaitUntilToastDisappear("ListWidget_Blue_0");
|
||||||
cy.waitUntil(() =>
|
|
||||||
cy.get(commonlocators.toastmsg).should("not.be.visible"),
|
|
||||||
);
|
|
||||||
cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`)
|
cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`)
|
||||||
.eq(1)
|
.eq(1)
|
||||||
.click({ force: true });
|
.click({ force: true });
|
||||||
|
|
||||||
cy.validateToastMessage("ListWidget_Green_1");
|
agHelper.WaitUntilToastDisappear("ListWidget_Green_1");
|
||||||
cy.waitUntil(() =>
|
|
||||||
cy.get(commonlocators.toastmsg).should("not.be.visible"),
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`)
|
cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`)
|
||||||
.eq(2)
|
.eq(2)
|
||||||
.click({ force: true });
|
.click({ force: true });
|
||||||
|
|
||||||
cy.validateToastMessage("ListWidget_Red_2");
|
agHelper.WaitUntilToastDisappear("ListWidget_Red_2");
|
||||||
cy.waitUntil(() =>
|
|
||||||
cy.get(commonlocators.toastmsg).should("not.be.visible"),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("2. List widget V2 with onItemClick should be triggered when child widget without event is clicked", () => {
|
it("2. List widget V2 with onItemClick should be triggered when child widget without event is clicked", () => {
|
||||||
cy.get(widgetSelector("Image1")).first().click({ force: true });
|
cy.get(widgetSelector("Image1")).first().click({ force: true });
|
||||||
validateToastExist();
|
agHelper.WaitUntilToastDisappear("ListWidget_Blue_0");
|
||||||
|
|
||||||
cy.get(widgetSelector("Text1")).first().click({ force: true });
|
cy.get(widgetSelector("Text1")).first().click({ force: true });
|
||||||
validateToastExist();
|
agHelper.WaitUntilToastDisappear("ListWidget_Blue_0");
|
||||||
|
|
||||||
deleteAllWidgetsInContainer();
|
deleteAllWidgetsInContainer();
|
||||||
|
|
||||||
|
|
@ -127,8 +115,7 @@ describe("List widget v2 onItemClick", () => {
|
||||||
cy.get(`${widgetSelector("Button1")} button`)
|
cy.get(`${widgetSelector("Button1")} button`)
|
||||||
.first()
|
.first()
|
||||||
.click({ force: true });
|
.click({ force: true });
|
||||||
validateToastExist();
|
agHelper.WaitUntilToastDisappear("ListWidget_Blue_0");
|
||||||
cy.get(commonlocators.toastBody).first().click();
|
|
||||||
|
|
||||||
cy.get(widgetsPage.toggleOnClick).click({ force: true });
|
cy.get(widgetsPage.toggleOnClick).click({ force: true });
|
||||||
cy.get(".t--property-control-onclick").then(($el) => {
|
cy.get(".t--property-control-onclick").then(($el) => {
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ describe("MultiSelect Widget Functionality", function () {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
it("8. Verify MultiSelect resets to default value", function () {
|
it("6. Verify MultiSelect resets to default value", function () {
|
||||||
resetTestCases.forEach((testCase) => {
|
resetTestCases.forEach((testCase) => {
|
||||||
const { defaultValue, options, optionsToDeselect, optionsToSelect } =
|
const { defaultValue, options, optionsToDeselect, optionsToSelect } =
|
||||||
testCase;
|
testCase;
|
||||||
|
|
@ -244,6 +244,8 @@ describe("MultiSelect Widget Functionality", function () {
|
||||||
_.propPane.UpdatePropertyFieldValue(
|
_.propPane.UpdatePropertyFieldValue(
|
||||||
"Default selected values",
|
"Default selected values",
|
||||||
JSON.stringify(defaultValue, null, 2),
|
JSON.stringify(defaultValue, null, 2),
|
||||||
|
true,
|
||||||
|
false,
|
||||||
);
|
);
|
||||||
// select other options
|
// select other options
|
||||||
_.agHelper.SelectFromMultiSelect(optionsToSelect);
|
_.agHelper.SelectFromMultiSelect(optionsToSelect);
|
||||||
|
|
@ -264,7 +266,7 @@ describe("MultiSelect Widget Functionality", function () {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("9. Verify MultiSelect deselection behavior", function () {
|
it("7. Verify MultiSelect deselection behavior", function () {
|
||||||
cy.openPropertyPane("multiselectwidgetv2");
|
cy.openPropertyPane("multiselectwidgetv2");
|
||||||
// set options
|
// set options
|
||||||
_.propPane.UpdatePropertyFieldValue(
|
_.propPane.UpdatePropertyFieldValue(
|
||||||
|
|
@ -278,16 +280,14 @@ describe("MultiSelect Widget Functionality", function () {
|
||||||
cy.get(getWidgetSelector("textwidget")).eq(1).should("have.text", "");
|
cy.get(getWidgetSelector("textwidget")).eq(1).should("have.text", "");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("10. Dropdown Functionality To Unchecked Visible Widget", function () {
|
it("8. Dropdown Functionality To Unchecked Visible Widget", function () {
|
||||||
cy.togglebarDisable(commonlocators.visibleCheckbox);
|
cy.togglebarDisable(commonlocators.visibleCheckbox);
|
||||||
_.deployMode.DeployApp();
|
_.deployMode.DeployApp();
|
||||||
cy.get(publish.multiselectwidgetv2 + " " + ".rc-select-selector").should(
|
cy.get(publish.multiselectwidgetv2 + " " + ".rc-select-selector").should(
|
||||||
"not.exist",
|
"not.exist",
|
||||||
);
|
);
|
||||||
_.deployMode.NavigateBacktoEditor();
|
_.deployMode.NavigateBacktoEditor();
|
||||||
});
|
// Dropdown Functionality To Check Visible Widget", function () {
|
||||||
|
|
||||||
it("11. Dropdown Functionality To Check Visible Widget", function () {
|
|
||||||
cy.openPropertyPane("multiselectwidgetv2");
|
cy.openPropertyPane("multiselectwidgetv2");
|
||||||
cy.togglebar(commonlocators.visibleCheckbox);
|
cy.togglebar(commonlocators.visibleCheckbox);
|
||||||
_.deployMode.DeployApp();
|
_.deployMode.DeployApp();
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ describe("Number Slider spec", () => {
|
||||||
_.entityExplorer.SelectEntityByName("NumberSlider1", "Widgets");
|
_.entityExplorer.SelectEntityByName("NumberSlider1", "Widgets");
|
||||||
|
|
||||||
// Change the Step size to 10
|
// Change the Step size to 10
|
||||||
_.propPane.UpdatePropertyFieldValue("Step size", "10");
|
_.propPane.UpdatePropertyFieldValue("Step size", "10", true, false);
|
||||||
|
|
||||||
// Change the slider value
|
// Change the slider value
|
||||||
_.agHelper
|
_.agHelper
|
||||||
|
|
|
||||||
|
|
@ -145,8 +145,8 @@ describe("Range Slider spec", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Change the Step size to 10
|
// Change the Step size to 10
|
||||||
_.propPane.UpdatePropertyFieldValue("Min. range", "10");
|
_.propPane.UpdatePropertyFieldValue("Min. range", "10", true, false);
|
||||||
_.propPane.UpdatePropertyFieldValue("Step size", "10");
|
_.propPane.UpdatePropertyFieldValue("Step size", "10", true, false);
|
||||||
|
|
||||||
_.agHelper
|
_.agHelper
|
||||||
.GetElement(_.locators._sliderThumb)
|
.GetElement(_.locators._sliderThumb)
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,8 @@ describe("Table V2 sort & filter using display text functionality", () => {
|
||||||
propPane.UpdatePropertyFieldValue(
|
propPane.UpdatePropertyFieldValue(
|
||||||
"Display text",
|
"Display text",
|
||||||
"{{['X','Y','Z'][currentIndex]}}",
|
"{{['X','Y','Z'][currentIndex]}}",
|
||||||
|
true,
|
||||||
|
false,
|
||||||
);
|
);
|
||||||
agHelper.RemoveEvaluatedPopUp();
|
agHelper.RemoveEvaluatedPopUp();
|
||||||
table.OpenNFilterTable("name", "contains", "Y");
|
table.OpenNFilterTable("name", "contains", "Y");
|
||||||
|
|
@ -87,6 +89,8 @@ describe("Table V2 sort & filter using display text functionality", () => {
|
||||||
propPane.UpdatePropertyFieldValue(
|
propPane.UpdatePropertyFieldValue(
|
||||||
"Display text",
|
"Display text",
|
||||||
"{{['X','Y','Z'][currentIndex]}}",
|
"{{['X','Y','Z'][currentIndex]}}",
|
||||||
|
true,
|
||||||
|
false,
|
||||||
);
|
);
|
||||||
table.SortColumn("name", "ascending");
|
table.SortColumn("name", "ascending");
|
||||||
table.ReadTableRowColumnData(0, 0, "v2").then((data) => {
|
table.ReadTableRowColumnData(0, 0, "v2").then((data) => {
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@ describe("Table Widget V2 property pane feature validation", function () {
|
||||||
agHelper.AssertAutoSave();
|
agHelper.AssertAutoSave();
|
||||||
// Validating the button action by clicking
|
// Validating the button action by clicking
|
||||||
cy.get(widgetsPage.tableV2Btn).last().click({ force: true });
|
cy.get(widgetsPage.tableV2Btn).last().click({ force: true });
|
||||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
||||||
cy.wait(3000);
|
|
||||||
// Validating the toast message
|
// Validating the toast message
|
||||||
agHelper.WaitUntilToastDisappear("Successful tobias.funke@reqres.in");
|
agHelper.WaitUntilToastDisappear("Successful tobias.funke@reqres.in");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
import { apiPage, hostPort } from "../../../../support/Objects/ObjectsCore";
|
import {
|
||||||
|
apiPage,
|
||||||
|
tedTestConfig,
|
||||||
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Validate API URL Evaluated value", () => {
|
describe("Validate API URL Evaluated value", () => {
|
||||||
it("1. Check if url object does not crash App", () => {
|
it("1. Check if url object does not crash App", () => {
|
||||||
|
|
@ -10,8 +13,8 @@ describe("Validate API URL Evaluated value", () => {
|
||||||
it("2. Check if path field strings have not been JSON.stringified - #24696", () => {
|
it("2. Check if path field strings have not been JSON.stringified - #24696", () => {
|
||||||
apiPage.CreateApi("SecondAPI");
|
apiPage.CreateApi("SecondAPI");
|
||||||
apiPage.EnterURL(
|
apiPage.EnterURL(
|
||||||
hostPort.mockApiUrl + `/{{SecondAPI.isLoading}}`,
|
tedTestConfig.mockApiUrl + `/{{SecondAPI.isLoading}}`,
|
||||||
hostPort.mockApiUrl + `/false`,
|
tedTestConfig.mockApiUrl + `/false`,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
import datasourceFormData from "../../../../fixtures/datasources.json";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
apiPage,
|
apiPage,
|
||||||
agHelper,
|
agHelper,
|
||||||
jsEditor,
|
jsEditor,
|
||||||
entityItems,
|
entityItems,
|
||||||
|
tedTestConfig,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Test API execution with dynamic binding in URL - Bug #24218", () => {
|
describe("Test API execution with dynamic binding in URL - Bug #24218", () => {
|
||||||
|
|
@ -15,7 +14,7 @@ describe("Test API execution with dynamic binding in URL - Bug #24218", () => {
|
||||||
myVar1: [],
|
myVar1: [],
|
||||||
myVar2: {},
|
myVar2: {},
|
||||||
myFun1 () {
|
myFun1 () {
|
||||||
storeValue("api_url", "${datasourceFormData["mockApiUrl"]}");
|
storeValue("api_url", "${tedTestConfig.mockApiUrl}");
|
||||||
},
|
},
|
||||||
myFun2: async function() {
|
myFun2: async function() {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,16 @@ import {
|
||||||
apiPage,
|
apiPage,
|
||||||
dataSources,
|
dataSources,
|
||||||
entityItems,
|
entityItems,
|
||||||
|
tedTestConfig,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Test curl import flow", function () {
|
describe("Test curl import flow", function () {
|
||||||
it("1. Test curl import flow Run and Delete", function () {
|
it("1. Test curl import flow Run and Delete", function () {
|
||||||
cy.fixture("datasources").then((datasourceFormData) => {
|
|
||||||
localStorage.setItem("ApiPaneV2", "ApiPaneV2");
|
localStorage.setItem("ApiPaneV2", "ApiPaneV2");
|
||||||
cy.NavigateToApiEditor();
|
cy.NavigateToApiEditor();
|
||||||
dataSources.NavigateToDSCreateNew();
|
dataSources.NavigateToDSCreateNew();
|
||||||
cy.get(ApiEditor.curlImage).click({ force: true });
|
cy.get(ApiEditor.curlImage).click({ force: true });
|
||||||
cy.get("textarea").type(
|
cy.get("textarea").type("curl -X GET " + tedTestConfig.mockApiUrl);
|
||||||
"curl -X GET " + datasourceFormData["mockApiUrl"],
|
|
||||||
);
|
|
||||||
cy.importCurl();
|
cy.importCurl();
|
||||||
cy.get("@curlImport").then((response) => {
|
cy.get("@curlImport").then((response) => {
|
||||||
expect(response.response.body.responseMeta.success).to.eq(true);
|
expect(response.response.body.responseMeta.success).to.eq(true);
|
||||||
|
|
@ -36,7 +34,6 @@ describe("Test curl import flow", function () {
|
||||||
entityType: entityItems.Api,
|
entityType: entityItems.Api,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it("2. Bug:15175 Creating new cURL import query from entity explorer crashes the app", function () {
|
it("2. Bug:15175 Creating new cURL import query from entity explorer crashes the app", function () {
|
||||||
cy.fixture("datasources").then((datasourceFormData) => {
|
cy.fixture("datasources").then((datasourceFormData) => {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
|
import { data } from "cypress/types/jquery";
|
||||||
import {
|
import {
|
||||||
agHelper,
|
agHelper,
|
||||||
apiPage,
|
apiPage,
|
||||||
jsEditor,
|
jsEditor,
|
||||||
debuggerHelper,
|
debuggerHelper,
|
||||||
|
tedTestConfig,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Tests functionality of platform function", () => {
|
describe("Tests functionality of platform function", () => {
|
||||||
it("1. Tests access to outer variable", () => {
|
it("1. Tests access to outer variable", () => {
|
||||||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl, "getAllUsers");
|
||||||
apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "getAllUsers");
|
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
myFun1: () => {
|
myFun1: () => {
|
||||||
|
|
@ -81,12 +82,12 @@ describe("Tests functionality of platform function", () => {
|
||||||
onBeforeLoad: (win) => {
|
onBeforeLoad: (win) => {
|
||||||
const latitude = 48.71597183246423;
|
const latitude = 48.71597183246423;
|
||||||
const longitude = 21.255670821215418;
|
const longitude = 21.255670821215418;
|
||||||
cy.stub(
|
cy.stub(win.navigator.geolocation, "getCurrentPosition").callsArgWith(
|
||||||
win.navigator.geolocation,
|
0,
|
||||||
"getCurrentPosition",
|
{
|
||||||
).callsArgWith(0, {
|
|
||||||
coords: { latitude, longitude },
|
coords: { latitude, longitude },
|
||||||
});
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -97,9 +98,7 @@ describe("Tests functionality of platform function", () => {
|
||||||
jsEditor.SelectFunctionDropdown("accessOuterVariableInsideSuccessCb");
|
jsEditor.SelectFunctionDropdown("accessOuterVariableInsideSuccessCb");
|
||||||
jsEditor.RunJSObj();
|
jsEditor.RunJSObj();
|
||||||
agHelper.AssertContains("Hello World from success callback", "exist");
|
agHelper.AssertContains("Hello World from success callback", "exist");
|
||||||
jsEditor.SelectFunctionDropdown(
|
jsEditor.SelectFunctionDropdown("accessOuterVariableInsideSetIntervalCb");
|
||||||
"accessOuterVariableInsideSetIntervalCb",
|
|
||||||
);
|
|
||||||
jsEditor.RunJSObj();
|
jsEditor.RunJSObj();
|
||||||
agHelper.AssertContains("Hello World from setInterval", "exist");
|
agHelper.AssertContains("Hello World from setInterval", "exist");
|
||||||
jsEditor.SelectFunctionDropdown("accessSetIntervalFromSetTimeout");
|
jsEditor.SelectFunctionDropdown("accessSetIntervalFromSetTimeout");
|
||||||
|
|
@ -146,4 +145,3 @@ describe("Tests functionality of platform function", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
import {
|
||||||
const jsEditor = ObjectsRegistry.JSEditor;
|
tedTestConfig,
|
||||||
const agHelper = ObjectsRegistry.AggregateHelper;
|
jsEditor,
|
||||||
const apiPage = ObjectsRegistry.ApiPage;
|
agHelper,
|
||||||
const deployMode = ObjectsRegistry.DeployMode;
|
apiPage,
|
||||||
const debuggerHelper = ObjectsRegistry.DebuggerHelper;
|
deployMode,
|
||||||
|
debuggerHelper,
|
||||||
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
let userName: string;
|
let userName: string;
|
||||||
|
|
||||||
|
|
@ -145,8 +147,7 @@ describe("Tests setTimeout API", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("6. Access to args passed into success/error callback functions in API.run when using setTimeout", () => {
|
it("6. Access to args passed into success/error callback functions in API.run when using setTimeout", () => {
|
||||||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
apiPage.CreateAndFillApi(tedTestConfig.mockApiUrl);
|
||||||
apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]);
|
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
myVar1: [],
|
myVar1: [],
|
||||||
|
|
@ -200,10 +201,8 @@ describe("Tests setTimeout API", function () {
|
||||||
agHelper.AssertContains(userName);
|
agHelper.AssertContains(userName);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it("7. Verifies whether setTimeout executes on page load", () => {
|
it("7. Verifies whether setTimeout executes on page load", () => {
|
||||||
//apiPage.CreateAndFillApi(agHelper.mockApiUrl);
|
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
myVar1: [],
|
myVar1: [],
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@ import {
|
||||||
entityExplorer,
|
entityExplorer,
|
||||||
entityItems,
|
entityItems,
|
||||||
dataSources,
|
dataSources,
|
||||||
hostPort,
|
tedTestConfig,
|
||||||
assertHelper,
|
assertHelper,
|
||||||
} from "../../../support/Objects/ObjectsCore";
|
} from "../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
let dsName: any, jsonSpecies: any, offset: any, insertedRecordId: any;
|
let dsName: any, jsonSpecies: any, offset: any, insertedRecordId: any;
|
||||||
describe("excludeForAirgap", "Validate Airtable Ds", () => {
|
describe.skip("excludeForAirgap", "Validate Airtable Ds", () => {
|
||||||
before("Create a new Airtable DS", () => {
|
before("Create a new Airtable DS", () => {
|
||||||
dataSources.CreateDataSource("Airtable", true, false);
|
dataSources.CreateDataSource("Airtable", true, false);
|
||||||
cy.get("@dsName").then(($dsName) => {
|
cy.get("@dsName").then(($dsName) => {
|
||||||
|
|
@ -27,12 +27,12 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
|
||||||
"List records",
|
"List records",
|
||||||
);
|
);
|
||||||
|
|
||||||
agHelper.EnterValue(hostPort.AirtableBase, {
|
agHelper.EnterValue(tedTestConfig.AirtableBase, {
|
||||||
propFieldName: "",
|
propFieldName: "",
|
||||||
directInput: false,
|
directInput: false,
|
||||||
inputFieldName: "Base ID ",
|
inputFieldName: "Base ID ",
|
||||||
});
|
});
|
||||||
agHelper.EnterValue(hostPort.AirtableTable, {
|
agHelper.EnterValue(tedTestConfig.AirtableTable, {
|
||||||
propFieldName: "",
|
propFieldName: "",
|
||||||
directInput: false,
|
directInput: false,
|
||||||
inputFieldName: "Table name",
|
inputFieldName: "Table name",
|
||||||
|
|
@ -236,7 +236,7 @@ describe("excludeForAirgap", "Validate Airtable Ds", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
dataSources.RunQuery({ toValidateResponse: false }); //For CI failure!
|
dataSources.RunQuery({ toValidateResponse: false }); //For CI failure!
|
||||||
agHelper.Sleep();
|
agHelper.Sleep(3000);
|
||||||
dataSources.RunQuery();
|
dataSources.RunQuery();
|
||||||
|
|
||||||
cy.get("@postExecute").then((resObj: any) => {
|
cy.get("@postExecute").then((resObj: any) => {
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@
|
||||||
"AirtableBase": "appubHrVbovcudwN6",
|
"AirtableBase": "appubHrVbovcudwN6",
|
||||||
"AirtableTable": "tblsFCQSskVFf7xNd",
|
"AirtableTable": "tblsFCQSskVFf7xNd",
|
||||||
|
|
||||||
"mockApiUrl": "http://host.docker.internal:5001/v1/mock-api?records=10",
|
|
||||||
"echoApiUrl": "http://host.docker.internal:5001/v1/mock-api/echo",
|
"echoApiUrl": "http://host.docker.internal:5001/v1/mock-api/echo",
|
||||||
"randomCatfactUrl": "http://host.docker.internal:5001/v1/catfact/random",
|
"randomCatfactUrl": "http://host.docker.internal:5001/v1/catfact/random",
|
||||||
"multipartAPI": "http://host.docker.internal:5001/v1/mock-api/echo-multipart",
|
"multipartAPI": "http://host.docker.internal:5001/v1/mock-api/echo-multipart",
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,6 @@ export const onboarding = ObjectsRegistry.Onboarding;
|
||||||
export const autoLayout = ObjectsRegistry.AutoLayout;
|
export const autoLayout = ObjectsRegistry.AutoLayout;
|
||||||
export const draggableWidgets = WIDGET;
|
export const draggableWidgets = WIDGET;
|
||||||
export const fakerHelper = ObjectsRegistry.FakerHelper;
|
export const fakerHelper = ObjectsRegistry.FakerHelper;
|
||||||
export const hostPort = ObjectsRegistry.DefaultHostPort;
|
export const tedTestConfig = ObjectsRegistry.TEDTestConfigs;
|
||||||
export const entityItems = EntityItems;
|
export const entityItems = EntityItems;
|
||||||
export const tabs = ObjectsRegistry.Tabs;
|
export const tabs = ObjectsRegistry.Tabs;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import { EmbedSettings } from "../Pages/AppSettings/EmbedSettings";
|
||||||
import { Templates } from "../Pages/Templates";
|
import { Templates } from "../Pages/Templates";
|
||||||
import { Onboarding } from "../Pages/Onboarding";
|
import { Onboarding } from "../Pages/Onboarding";
|
||||||
import { AutoLayout } from "../Pages/AutoLayout";
|
import { AutoLayout } from "../Pages/AutoLayout";
|
||||||
import { DefaultHostPort } from "./Hostport";
|
import { TEDTestConfigs } from "./TestConfigs";
|
||||||
import { AssertHelper } from "../Pages/AssertHelper";
|
import { AssertHelper } from "../Pages/AssertHelper";
|
||||||
import { ReusableHelper } from "./ReusableHelper";
|
import { ReusableHelper } from "./ReusableHelper";
|
||||||
import { Tabs } from "../Pages/Tabs";
|
import { Tabs } from "../Pages/Tabs";
|
||||||
|
|
@ -253,12 +253,12 @@ export class ObjectsRegistry {
|
||||||
return ObjectsRegistry.autoLayout__;
|
return ObjectsRegistry.autoLayout__;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static defaultHostPort__: DefaultHostPort;
|
private static tedTestConfigs__: TEDTestConfigs;
|
||||||
static get DefaultHostPort(): DefaultHostPort {
|
static get TEDTestConfigs(): TEDTestConfigs {
|
||||||
if (ObjectsRegistry.defaultHostPort__ === undefined) {
|
if (ObjectsRegistry.tedTestConfigs__ === undefined) {
|
||||||
ObjectsRegistry.defaultHostPort__ = new DefaultHostPort();
|
ObjectsRegistry.tedTestConfigs__ = new TEDTestConfigs();
|
||||||
}
|
}
|
||||||
return ObjectsRegistry.defaultHostPort__;
|
return ObjectsRegistry.tedTestConfigs__;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export class DefaultHostPort {
|
export class TEDTestConfigs {
|
||||||
mongo_authenticationAuthtype = "SCRAM-SHA-1";
|
mongo_authenticationAuthtype = "SCRAM-SHA-1";
|
||||||
mongo_host = "host.docker.internal";
|
mongo_host = "host.docker.internal";
|
||||||
mongo_port = 28017;
|
mongo_port = 28017;
|
||||||
|
|
@ -30,7 +30,7 @@ export class AssertHelper extends ReusableHelper {
|
||||||
expect(doc.readyState).to.equal("complete");
|
expect(doc.readyState).to.equal("complete");
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
cy.window().should("have.property", "onload");
|
cy.window({ timeout: 60000 }).should("have.property", "onload");
|
||||||
}
|
}
|
||||||
|
|
||||||
public AssertDelete(entityType: EntityItemsType) {
|
public AssertDelete(entityType: EntityItemsType) {
|
||||||
|
|
@ -74,8 +74,8 @@ export class AssertHelper extends ReusableHelper {
|
||||||
// "response.body.responseMeta.status",
|
// "response.body.responseMeta.status",
|
||||||
// expectedStatus,
|
// expectedStatus,
|
||||||
// );
|
// );
|
||||||
this.Sleep(); //Wait a bit for call to finish!
|
this.Sleep(2000); //Wait a bit for call to finish!
|
||||||
return cy.wait(this.GetAliasName(aliasName));
|
return cy.wait(this.GetAliasName(aliasName), { responseTimeout: 60000 });
|
||||||
}
|
}
|
||||||
|
|
||||||
public AssertNetworkStatus(aliasName: string, expectedStatus = 200) {
|
public AssertNetworkStatus(aliasName: string, expectedStatus = 200) {
|
||||||
|
|
|
||||||
|
|
@ -35,14 +35,14 @@ export class DataSources {
|
||||||
private ee = ObjectsRegistry.EntityExplorer;
|
private ee = ObjectsRegistry.EntityExplorer;
|
||||||
private locator = ObjectsRegistry.CommonLocators;
|
private locator = ObjectsRegistry.CommonLocators;
|
||||||
private apiPage = ObjectsRegistry.ApiPage;
|
private apiPage = ObjectsRegistry.ApiPage;
|
||||||
private hp = ObjectsRegistry.DefaultHostPort;
|
private tedTestConfig = ObjectsRegistry.TEDTestConfigs;
|
||||||
private assertHelper = ObjectsRegistry.AssertHelper;
|
private assertHelper = ObjectsRegistry.AssertHelper;
|
||||||
|
|
||||||
public ContainerKVP = (containerName: string) => {
|
public ContainerKVP = (containerName: string) => {
|
||||||
return {
|
return {
|
||||||
MsSql: this.hp.mssql_docker(containerName),
|
MsSql: this.tedTestConfig.mssql_docker(containerName),
|
||||||
Arango: this.hp.arango_docker(containerName),
|
Arango: this.tedTestConfig.arango_docker(containerName),
|
||||||
Elasticsearch: this.hp.elastic_docker(containerName),
|
Elasticsearch: this.tedTestConfig.elastic_docker(containerName),
|
||||||
};
|
};
|
||||||
}; //Container KeyValuePair
|
}; //Container KeyValuePair
|
||||||
|
|
||||||
|
|
@ -402,22 +402,22 @@ export class DataSources {
|
||||||
password = "",
|
password = "",
|
||||||
) {
|
) {
|
||||||
const hostAddress = shouldAddTrailingSpaces
|
const hostAddress = shouldAddTrailingSpaces
|
||||||
? this.hp.postgres_host + " "
|
? this.tedTestConfig.postgres_host + " "
|
||||||
: this.hp.postgres_host;
|
: this.tedTestConfig.postgres_host;
|
||||||
const databaseName = shouldAddTrailingSpaces
|
const databaseName = shouldAddTrailingSpaces
|
||||||
? this.hp.postgres_databaseName + " "
|
? this.tedTestConfig.postgres_databaseName + " "
|
||||||
: this.hp.postgres_databaseName;
|
: this.tedTestConfig.postgres_databaseName;
|
||||||
this.agHelper.UpdateInputValue(
|
this.agHelper.UpdateInputValue(
|
||||||
this._port,
|
this._port,
|
||||||
this.hp.postgres_port.toString(),
|
this.tedTestConfig.postgres_port.toString(),
|
||||||
);
|
);
|
||||||
this.agHelper.UpdateInputValue(this._host, hostAddress);
|
this.agHelper.UpdateInputValue(this._host, hostAddress);
|
||||||
cy.get(this._databaseName).clear().type(databaseName);
|
cy.get(this._databaseName).clear().type(databaseName);
|
||||||
cy.get(this._username).type(
|
cy.get(this._username).type(
|
||||||
username == "" ? this.hp.postgres_username : username,
|
username == "" ? this.tedTestConfig.postgres_username : username,
|
||||||
);
|
);
|
||||||
cy.get(this._password).type(
|
cy.get(this._password).type(
|
||||||
password == "" ? this.hp.postgres_username : password,
|
password == "" ? this.tedTestConfig.postgres_username : password,
|
||||||
);
|
);
|
||||||
this.ValidateNSelectDropdown("SSL mode", "Default");
|
this.ValidateNSelectDropdown("SSL mode", "Default");
|
||||||
}
|
}
|
||||||
|
|
@ -428,56 +428,79 @@ export class DataSources {
|
||||||
password = "",
|
password = "",
|
||||||
) {
|
) {
|
||||||
const hostAddress = shouldAddTrailingSpaces
|
const hostAddress = shouldAddTrailingSpaces
|
||||||
? this.hp.oracle_host + " "
|
? this.tedTestConfig.oracle_host + " "
|
||||||
: this.hp.oracle_host;
|
: this.tedTestConfig.oracle_host;
|
||||||
const databaseName = shouldAddTrailingSpaces
|
const databaseName = shouldAddTrailingSpaces
|
||||||
? this.hp.oracle_name + " "
|
? this.tedTestConfig.oracle_name + " "
|
||||||
: this.hp.oracle_name;
|
: this.tedTestConfig.oracle_name;
|
||||||
this.agHelper.UpdateInputValue(this._host, hostAddress);
|
this.agHelper.UpdateInputValue(this._host, hostAddress);
|
||||||
this.agHelper.UpdateInputValue(this._port, this.hp.oracle_port.toString());
|
this.agHelper.UpdateInputValue(
|
||||||
|
this._port,
|
||||||
|
this.tedTestConfig.oracle_port.toString(),
|
||||||
|
);
|
||||||
cy.get(this._databaseName).clear().type(databaseName);
|
cy.get(this._databaseName).clear().type(databaseName);
|
||||||
cy.get(this._username).type(
|
cy.get(this._username).type(
|
||||||
username == "" ? this.hp.oracle_username : username,
|
username == "" ? this.tedTestConfig.oracle_username : username,
|
||||||
);
|
);
|
||||||
cy.get(this._password).type(
|
cy.get(this._password).type(
|
||||||
password == "" ? this.hp.oracle_password : password,
|
password == "" ? this.tedTestConfig.oracle_password : password,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillMongoDSForm(shouldAddTrailingSpaces = false) {
|
public FillMongoDSForm(shouldAddTrailingSpaces = false) {
|
||||||
const hostAddress = shouldAddTrailingSpaces
|
const hostAddress = shouldAddTrailingSpaces
|
||||||
? this.hp.mongo_host + " "
|
? this.tedTestConfig.mongo_host + " "
|
||||||
: this.hp.mongo_host;
|
: this.tedTestConfig.mongo_host;
|
||||||
this.agHelper.UpdateInputValue(this._host, hostAddress);
|
this.agHelper.UpdateInputValue(this._host, hostAddress);
|
||||||
this.agHelper.UpdateInputValue(this._port, this.hp.mongo_port.toString());
|
this.agHelper.UpdateInputValue(
|
||||||
cy.get(this._databaseName).clear().type(this.hp.mongo_databaseName);
|
this._port,
|
||||||
|
this.tedTestConfig.mongo_port.toString(),
|
||||||
|
);
|
||||||
|
cy.get(this._databaseName)
|
||||||
|
.clear()
|
||||||
|
.type(this.tedTestConfig.mongo_databaseName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillMySqlDSForm(shouldAddTrailingSpaces = false) {
|
public FillMySqlDSForm(shouldAddTrailingSpaces = false) {
|
||||||
const hostAddress = shouldAddTrailingSpaces
|
const hostAddress = shouldAddTrailingSpaces
|
||||||
? this.hp.mysql_host + " "
|
? this.tedTestConfig.mysql_host + " "
|
||||||
: this.hp.mysql_host;
|
: this.tedTestConfig.mysql_host;
|
||||||
const databaseName = shouldAddTrailingSpaces
|
const databaseName = shouldAddTrailingSpaces
|
||||||
? this.hp.mysql_databaseName + " "
|
? this.tedTestConfig.mysql_databaseName + " "
|
||||||
: this.hp.mysql_databaseName;
|
: this.tedTestConfig.mysql_databaseName;
|
||||||
|
|
||||||
this.agHelper.UpdateInputValue(this._host, hostAddress);
|
this.agHelper.UpdateInputValue(this._host, hostAddress);
|
||||||
this.agHelper.UpdateInputValue(this._port, this.hp.mysql_port.toString());
|
this.agHelper.UpdateInputValue(
|
||||||
|
this._port,
|
||||||
|
this.tedTestConfig.mysql_port.toString(),
|
||||||
|
);
|
||||||
cy.get(this._databaseName).clear().type(databaseName);
|
cy.get(this._databaseName).clear().type(databaseName);
|
||||||
this.agHelper.UpdateInputValue(this._username, this.hp.mysql_username);
|
this.agHelper.UpdateInputValue(
|
||||||
cy.get(this._password).type(this.hp.mysql_password);
|
this._username,
|
||||||
|
this.tedTestConfig.mysql_username,
|
||||||
|
);
|
||||||
|
cy.get(this._password).type(this.tedTestConfig.mysql_password);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillMsSqlDSForm() {
|
public FillMsSqlDSForm() {
|
||||||
this.agHelper.UpdateInputValue(this._host, this.hp.mssql_host);
|
this.agHelper.UpdateInputValue(this._host, this.tedTestConfig.mssql_host);
|
||||||
this.agHelper.UpdateInputValue(this._port, this.hp.mssql_port.toString());
|
this.agHelper.UpdateInputValue(
|
||||||
|
this._port,
|
||||||
|
this.tedTestConfig.mssql_port.toString(),
|
||||||
|
);
|
||||||
this.agHelper.ClearTextField(this._databaseName);
|
this.agHelper.ClearTextField(this._databaseName);
|
||||||
// this.agHelper.UpdateInputValue(
|
// this.agHelper.UpdateInputValue(
|
||||||
// this._databaseName,
|
// this._databaseName,
|
||||||
// datasourceFormData["mssql-databaseName"],
|
// datasourceFormData["mssql-databaseName"],
|
||||||
// ); //Commenting until MsSQL is init loaded into container
|
// ); //Commenting until MsSQL is init loaded into container
|
||||||
this.agHelper.UpdateInputValue(this._username, this.hp.mssql_username);
|
this.agHelper.UpdateInputValue(
|
||||||
this.agHelper.UpdateInputValue(this._password, this.hp.mssql_password);
|
this._username,
|
||||||
|
this.tedTestConfig.mssql_username,
|
||||||
|
);
|
||||||
|
this.agHelper.UpdateInputValue(
|
||||||
|
this._password,
|
||||||
|
this.tedTestConfig.mssql_password,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillAirtableDSForm() {
|
public FillAirtableDSForm() {
|
||||||
|
|
@ -494,14 +517,23 @@ export class DataSources {
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillArangoDSForm() {
|
public FillArangoDSForm() {
|
||||||
this.agHelper.UpdateInputValue(this._host, this.hp.arango_host);
|
this.agHelper.UpdateInputValue(this._host, this.tedTestConfig.arango_host);
|
||||||
this.agHelper.UpdateInputValue(this._port, this.hp.arango_port.toString());
|
this.agHelper.UpdateInputValue(
|
||||||
|
this._port,
|
||||||
|
this.tedTestConfig.arango_port.toString(),
|
||||||
|
);
|
||||||
//Validating db name is _system, currently unable to create DB via curl in Arango
|
//Validating db name is _system, currently unable to create DB via curl in Arango
|
||||||
this.agHelper
|
this.agHelper
|
||||||
.GetText(this._databaseName, "val")
|
.GetText(this._databaseName, "val")
|
||||||
.then(($dbName) => expect($dbName).to.eq("_system"));
|
.then(($dbName) => expect($dbName).to.eq("_system"));
|
||||||
this.agHelper.UpdateInputValue(this._username, this.hp.arango_username);
|
this.agHelper.UpdateInputValue(
|
||||||
this.agHelper.UpdateInputValue(this._password, this.hp.arango_password);
|
this._username,
|
||||||
|
this.tedTestConfig.arango_username,
|
||||||
|
);
|
||||||
|
this.agHelper.UpdateInputValue(
|
||||||
|
this._password,
|
||||||
|
this.tedTestConfig.arango_password,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillCurlNImport(value: string) {
|
public FillCurlNImport(value: string) {
|
||||||
|
|
@ -520,11 +552,11 @@ export class DataSources {
|
||||||
public FillFirestoreDSForm() {
|
public FillFirestoreDSForm() {
|
||||||
this.agHelper.UpdateInput(
|
this.agHelper.UpdateInput(
|
||||||
this.locator._inputFieldByName("Database URL"),
|
this.locator._inputFieldByName("Database URL"),
|
||||||
this.hp.firestore_database_url,
|
this.tedTestConfig.firestore_database_url,
|
||||||
);
|
);
|
||||||
this.agHelper.UpdateInput(
|
this.agHelper.UpdateInput(
|
||||||
this.locator._inputFieldByName("Project Id"),
|
this.locator._inputFieldByName("Project Id"),
|
||||||
this.hp.firestore_projectID,
|
this.tedTestConfig.firestore_projectID,
|
||||||
);
|
);
|
||||||
// cy.fixture("firestore-ServiceAccCreds").then((json: any) => {
|
// cy.fixture("firestore-ServiceAccCreds").then((json: any) => {
|
||||||
// let ServiceAccCreds = JSON.parse(
|
// let ServiceAccCreds = JSON.parse(
|
||||||
|
|
@ -544,15 +576,24 @@ export class DataSources {
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillElasticSearchDSForm() {
|
public FillElasticSearchDSForm() {
|
||||||
this.agHelper.UpdateInputValue(this._host, this.hp.elastic_host);
|
this.agHelper.UpdateInputValue(this._host, this.tedTestConfig.elastic_host);
|
||||||
this.agHelper.UpdateInputValue(this._port, this.hp.elastic_port.toString());
|
this.agHelper.UpdateInputValue(
|
||||||
this.agHelper.UpdateInputValue(this._username, this.hp.elastic_username);
|
this._port,
|
||||||
this.agHelper.UpdateInputValue(this._password, this.hp.elastic_password);
|
this.tedTestConfig.elastic_port.toString(),
|
||||||
|
);
|
||||||
|
this.agHelper.UpdateInputValue(
|
||||||
|
this._username,
|
||||||
|
this.tedTestConfig.elastic_username,
|
||||||
|
);
|
||||||
|
this.agHelper.UpdateInputValue(
|
||||||
|
this._password,
|
||||||
|
this.tedTestConfig.elastic_password,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillUnAuthenticatedGraphQLDSForm() {
|
public FillUnAuthenticatedGraphQLDSForm() {
|
||||||
this.agHelper.GetNClick(this._createBlankGraphQL);
|
this.agHelper.GetNClick(this._createBlankGraphQL);
|
||||||
this.apiPage.EnterURL(this.hp.GraphqlApiUrl_TED);
|
this.apiPage.EnterURL(this.tedTestConfig.GraphqlApiUrl_TED);
|
||||||
this.assertHelper.AssertNetworkStatus("@createNewApi", 201);
|
this.assertHelper.AssertNetworkStatus("@createNewApi", 201);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -565,7 +606,7 @@ export class DataSources {
|
||||||
this.CreatePlugIn("Authenticated GraphQL API");
|
this.CreatePlugIn("Authenticated GraphQL API");
|
||||||
this.agHelper.UpdateInput(
|
this.agHelper.UpdateInput(
|
||||||
this.locator._inputFieldByName("URL"),
|
this.locator._inputFieldByName("URL"),
|
||||||
this.hp.GraphqlApiUrl_TED,
|
this.tedTestConfig.GraphqlApiUrl_TED,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.agHelper.UpdateInputValue(this._graphQLHeaderKey, hKey);
|
this.agHelper.UpdateInputValue(this._graphQLHeaderKey, hKey);
|
||||||
|
|
@ -579,8 +620,11 @@ export class DataSources {
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillRedisDSForm() {
|
public FillRedisDSForm() {
|
||||||
this.agHelper.UpdateInputValue(this._host, this.hp.redis_host);
|
this.agHelper.UpdateInputValue(this._host, this.tedTestConfig.redis_host);
|
||||||
this.agHelper.UpdateInputValue(this._port, this.hp.redis_port.toString());
|
this.agHelper.UpdateInputValue(
|
||||||
|
this._port,
|
||||||
|
this.tedTestConfig.redis_port.toString(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillS3DSForm() {
|
public FillS3DSForm() {
|
||||||
|
|
@ -1177,7 +1221,7 @@ export class DataSources {
|
||||||
public FillAuthAPIUrl() {
|
public FillAuthAPIUrl() {
|
||||||
this.agHelper.UpdateInput(
|
this.agHelper.UpdateInput(
|
||||||
this.locator._inputFieldByName("URL"),
|
this.locator._inputFieldByName("URL"),
|
||||||
this.hp.authenticatedApiUrl,
|
this.tedTestConfig.authenticatedApiUrl,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1215,7 +1259,7 @@ export class DataSources {
|
||||||
}
|
}
|
||||||
|
|
||||||
public FillMongoDatasourceFormWithURI() {
|
public FillMongoDatasourceFormWithURI() {
|
||||||
const uri = this.hp.mongo_uri;
|
const uri = this.tedTestConfig.mongo_uri;
|
||||||
this.ValidateNSelectDropdown(
|
this.ValidateNSelectDropdown(
|
||||||
"Use mongo connection string URI",
|
"Use mongo connection string URI",
|
||||||
"No",
|
"No",
|
||||||
|
|
@ -1232,28 +1276,32 @@ export class DataSources {
|
||||||
|
|
||||||
// Login to TED OAuth
|
// Login to TED OAuth
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append("username", this.hp.OAuth_Username);
|
formData.append("username", this.tedTestConfig.OAuth_Username);
|
||||||
cy.request("POST", this.hp.OAuth_Host, formData).then((response) => {
|
cy.request("POST", this.tedTestConfig.OAuth_Host, formData).then(
|
||||||
|
(response) => {
|
||||||
expect(response.status).to.equal(200);
|
expect(response.status).to.equal(200);
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// Create client
|
// Create client
|
||||||
let clientData = new FormData();
|
let clientData = new FormData();
|
||||||
clientData.append("client_name", "appsmith_cs_post");
|
clientData.append("client_name", "appsmith_cs_post");
|
||||||
clientData.append("client_uri", "http://localhost/");
|
clientData.append("client_uri", "http://localhost/");
|
||||||
clientData.append("scope", "profile");
|
clientData.append("scope", "profile");
|
||||||
clientData.append("redirect_uri", this.hp.OAuth_RedirectUrl);
|
clientData.append("redirect_uri", this.tedTestConfig.OAuth_RedirectUrl);
|
||||||
clientData.append("grant_type", grantType);
|
clientData.append("grant_type", grantType);
|
||||||
clientData.append("response_type", "code");
|
clientData.append("response_type", "code");
|
||||||
clientData.append("token_endpoint_auth_method", "client_secret_post");
|
clientData.append("token_endpoint_auth_method", "client_secret_post");
|
||||||
cy.request("POST", this.hp.OAuth_Host + "/create_client", clientData).then(
|
cy.request(
|
||||||
(response) => {
|
"POST",
|
||||||
|
this.tedTestConfig.OAuth_Host + "/create_client",
|
||||||
|
clientData,
|
||||||
|
).then((response) => {
|
||||||
expect(response.status).to.equal(200);
|
expect(response.status).to.equal(200);
|
||||||
},
|
});
|
||||||
);
|
|
||||||
|
|
||||||
// Get Client Credentials
|
// Get Client Credentials
|
||||||
cy.request("GET", this.hp.OAuth_Host).then((response) => {
|
cy.request("GET", this.tedTestConfig.OAuth_Host).then((response) => {
|
||||||
clientId = response.body.split("client_id: </strong>");
|
clientId = response.body.split("client_id: </strong>");
|
||||||
clientId = clientId[1].split("<strong>client_secret: </strong>");
|
clientId = clientId[1].split("<strong>client_secret: </strong>");
|
||||||
clientSecret = clientId[1].split("<strong>");
|
clientSecret = clientId[1].split("<strong>");
|
||||||
|
|
@ -1297,7 +1345,7 @@ export class DataSources {
|
||||||
// Fill Auth Form
|
// Fill Auth Form
|
||||||
this.agHelper.UpdateInput(
|
this.agHelper.UpdateInput(
|
||||||
this.locator._inputFieldByName("URL"),
|
this.locator._inputFieldByName("URL"),
|
||||||
this.hp.OAuth_ApiUrl,
|
this.tedTestConfig.OAuth_ApiUrl,
|
||||||
);
|
);
|
||||||
this.agHelper.GetNClick(this._authType);
|
this.agHelper.GetNClick(this._authType);
|
||||||
this.agHelper.GetNClick(this._oauth2);
|
this.agHelper.GetNClick(this._oauth2);
|
||||||
|
|
@ -1309,7 +1357,7 @@ export class DataSources {
|
||||||
|
|
||||||
this.agHelper.UpdateInput(
|
this.agHelper.UpdateInput(
|
||||||
this.locator._inputFieldByName("Access token URL"),
|
this.locator._inputFieldByName("Access token URL"),
|
||||||
this.hp.OAUth_AccessTokenUrl,
|
this.tedTestConfig.OAUth_AccessTokenUrl,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.agHelper.UpdateInput(
|
this.agHelper.UpdateInput(
|
||||||
|
|
@ -1326,7 +1374,7 @@ export class DataSources {
|
||||||
);
|
);
|
||||||
this.agHelper.UpdateInput(
|
this.agHelper.UpdateInput(
|
||||||
this.locator._inputFieldByName("Authorization URL"),
|
this.locator._inputFieldByName("Authorization URL"),
|
||||||
this.hp.OAuth_AuthUrl,
|
this.tedTestConfig.OAuth_AuthUrl,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,7 @@ export class EntityExplorer {
|
||||||
this.agHelper.Sleep(500);
|
this.agHelper.Sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DragDropWidgetNVerify(
|
private DragNDropWidget(
|
||||||
widgetType: string,
|
widgetType: string,
|
||||||
x = 300,
|
x = 300,
|
||||||
y = 100,
|
y = 100,
|
||||||
|
|
@ -342,6 +342,16 @@ export class EntityExplorer {
|
||||||
)
|
)
|
||||||
.first()
|
.first()
|
||||||
.trigger("mouseup", x, y, { eventConstructor: "MouseEvent" });
|
.trigger("mouseup", x, y, { eventConstructor: "MouseEvent" });
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragDropWidgetNVerify(
|
||||||
|
widgetType: string,
|
||||||
|
x = 300,
|
||||||
|
y = 100,
|
||||||
|
parentWidgetType = "",
|
||||||
|
dropTargetId = "",
|
||||||
|
) {
|
||||||
|
this.DragNDropWidget(widgetType, x, y, parentWidgetType, dropTargetId);
|
||||||
this.agHelper.AssertAutoSave(); //settling time for widget on canvas!
|
this.agHelper.AssertAutoSave(); //settling time for widget on canvas!
|
||||||
if (widgetType === "modalwidget") {
|
if (widgetType === "modalwidget") {
|
||||||
cy.get(".t--modal-widget").should("exist");
|
cy.get(".t--modal-widget").should("exist");
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const GITHUB_API_BASE = "https://api.github.com";
|
||||||
export class GitSync {
|
export class GitSync {
|
||||||
public agHelper = ObjectsRegistry.AggregateHelper;
|
public agHelper = ObjectsRegistry.AggregateHelper;
|
||||||
public locator = ObjectsRegistry.CommonLocators;
|
public locator = ObjectsRegistry.CommonLocators;
|
||||||
private hostPort = ObjectsRegistry.DefaultHostPort;
|
private tedTestConfig = ObjectsRegistry.TEDTestConfigs;
|
||||||
private assertHelper = ObjectsRegistry.AssertHelper;
|
private assertHelper = ObjectsRegistry.AssertHelper;
|
||||||
|
|
||||||
private _connectGitBottomBar = ".t--connect-git-bottom-bar";
|
private _connectGitBottomBar = ".t--connect-git-bottom-bar";
|
||||||
|
|
@ -72,7 +72,7 @@ export class GitSync {
|
||||||
public CreateTestGiteaRepo(repo: string, privateFlag = false) {
|
public CreateTestGiteaRepo(repo: string, privateFlag = false) {
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${this.hostPort.GITEA_API_BASE_TED}:${this.hostPort.GITEA_API_PORT_TED}/api/v1/org/Cypress/repos`,
|
url: `${this.tedTestConfig.GITEA_API_BASE_TED}:${this.tedTestConfig.GITEA_API_PORT_TED}/api/v1/org/Cypress/repos`,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
||||||
},
|
},
|
||||||
|
|
@ -97,7 +97,7 @@ export class GitSync {
|
||||||
);
|
);
|
||||||
this.agHelper.TypeText(
|
this.agHelper.TypeText(
|
||||||
this._gitRepoInput,
|
this._gitRepoInput,
|
||||||
`${this.hostPort.GITEA_API_URL_TED}/${repo}.git`,
|
`${this.tedTestConfig.GITEA_API_URL_TED}/${repo}.git`,
|
||||||
//`git@github.com:${owner}/${repo}.git`,
|
//`git@github.com:${owner}/${repo}.git`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ export class GitSync {
|
||||||
// fetch the generated key and post to the github repo
|
// fetch the generated key and post to the github repo
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${this.hostPort.GITEA_API_BASE_TED}:${this.hostPort.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repo}/keys`,
|
url: `${this.tedTestConfig.GITEA_API_BASE_TED}:${this.tedTestConfig.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repo}/keys`,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
||||||
},
|
},
|
||||||
|
|
@ -139,7 +139,7 @@ export class GitSync {
|
||||||
DeleteTestGithubRepo(repo: any) {
|
DeleteTestGithubRepo(repo: any) {
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
url: `${this.hostPort.GITEA_API_BASE_TED}:${this.hostPort.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repo}`,
|
url: `${this.tedTestConfig.GITEA_API_BASE_TED}:${this.tedTestConfig.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repo}`,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
||||||
},
|
},
|
||||||
|
|
@ -269,7 +269,7 @@ export class GitSync {
|
||||||
// fetch the generated key and post to the github repo
|
// fetch the generated key and post to the github repo
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `http://${this.hostPort.GITEA_API_BASE_TED}:${this.hostPort.GITEA_API_PORT_TED}/v1/gitserver/addgitssh`,
|
url: `http://${this.tedTestConfig.GITEA_API_BASE_TED}:${this.tedTestConfig.GITEA_API_PORT_TED}/v1/gitserver/addgitssh`,
|
||||||
//body: formdata,
|
//body: formdata,
|
||||||
body: {
|
body: {
|
||||||
sshkey: generatedKey,
|
sshkey: generatedKey,
|
||||||
|
|
@ -330,7 +330,7 @@ export class GitSync {
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url:
|
url:
|
||||||
`http://${this.hostPort.GITEA_API_BASE_TED}:${this.hostPort.GITEA_API_PORT_TED}/v1/gitserver/addrepo?reponame=` +
|
`http://${this.tedTestConfig.GITEA_API_BASE_TED}:${this.tedTestConfig.GITEA_API_PORT_TED}/v1/gitserver/addrepo?reponame=` +
|
||||||
repo,
|
repo,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
remoteUrl = JSON.stringify(response.body).replace(/['"]+/g, "");
|
remoteUrl = JSON.stringify(response.body).replace(/['"]+/g, "");
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ export class Onboarding {
|
||||||
this._aggregateHelper.AssertElementVisible(
|
this._aggregateHelper.AssertElementVisible(
|
||||||
OnboardingLocator.datasourcePage,
|
OnboardingLocator.datasourcePage,
|
||||||
);
|
);
|
||||||
|
this.closeIntroModal();
|
||||||
this._aggregateHelper.AssertElementAbsence(
|
this._aggregateHelper.AssertElementAbsence(
|
||||||
OnboardingLocator.introModal,
|
OnboardingLocator.introModal,
|
||||||
10000,
|
10000,
|
||||||
|
|
|
||||||
|
|
@ -291,12 +291,15 @@ export class PropertyPane {
|
||||||
propFieldName: string,
|
propFieldName: string,
|
||||||
valueToEnter: string,
|
valueToEnter: string,
|
||||||
toVerifySave = true,
|
toVerifySave = true,
|
||||||
|
toValidateNetworkCall = true,
|
||||||
) {
|
) {
|
||||||
this.agHelper.UpdateCodeInput(
|
this.agHelper.UpdateCodeInput(
|
||||||
this.locator._existingFieldTextByName(propFieldName),
|
this.locator._existingFieldTextByName(propFieldName),
|
||||||
valueToEnter,
|
valueToEnter,
|
||||||
);
|
);
|
||||||
toVerifySave && this.agHelper.AssertAutoSave(); //Allowing time for saving entered value
|
toVerifySave && this.agHelper.AssertAutoSave(); //Allowing time for saving entered value
|
||||||
|
toValidateNetworkCall &&
|
||||||
|
this.assertHelper.AssertNetworkStatus("@updateLayout");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ValidatePropertyFieldValue(
|
public ValidatePropertyFieldValue(
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { ObjectsRegistry } from "../support/Objects/Registry";
|
||||||
|
|
||||||
let gitSync = ObjectsRegistry.GitSync,
|
let gitSync = ObjectsRegistry.GitSync,
|
||||||
agHelper = ObjectsRegistry.AggregateHelper,
|
agHelper = ObjectsRegistry.AggregateHelper,
|
||||||
hostPort = ObjectsRegistry.DefaultHostPort;
|
tedTestConfig = ObjectsRegistry.TEDTestConfigs;
|
||||||
|
|
||||||
const commonLocators = require("../locators/commonlocators.json");
|
const commonLocators = require("../locators/commonlocators.json");
|
||||||
const GITHUB_API_BASE = "https://api.github.com";
|
const GITHUB_API_BASE = "https://api.github.com";
|
||||||
|
|
@ -342,7 +342,7 @@ Cypress.Commands.add(
|
||||||
);
|
);
|
||||||
cy.get(gitSyncLocators.gitRepoInput).type(
|
cy.get(gitSyncLocators.gitRepoInput).type(
|
||||||
//`git@github.com:${owner}/${repo}.git`,
|
//`git@github.com:${owner}/${repo}.git`,
|
||||||
`${hostPort.GITEA_API_URL_TED}/${repo}.git`,
|
`${tedTestConfig.GITEA_API_URL_TED}/${repo}.git`,
|
||||||
);
|
);
|
||||||
cy.get(gitSyncLocators.generateDeployKeyBtn).click();
|
cy.get(gitSyncLocators.generateDeployKeyBtn).click();
|
||||||
cy.wait(`@generateKey-${repo}`).then((result) => {
|
cy.wait(`@generateKey-${repo}`).then((result) => {
|
||||||
|
|
@ -365,7 +365,7 @@ Cypress.Commands.add(
|
||||||
|
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${hostPort.GITEA_API_BASE_TED}:${hostPort.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repo}/keys`,
|
url: `${tedTestConfig.GITEA_API_BASE_TED}:${tedTestConfig.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repo}/keys`,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
||||||
},
|
},
|
||||||
|
|
@ -475,7 +475,7 @@ Cypress.Commands.add(
|
||||||
|
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${hostPort.GITEA_API_BASE_TED}:${hostPort.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repo}/keys`,
|
url: `${tedTestConfig.GITEA_API_BASE_TED}:${tedTestConfig.GITEA_API_PORT_TED}/api/v1/repos/Cypress/${repo}/keys`,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
Authorization: `token ${Cypress.env("GITEA_TOKEN")}`,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user