test: Script updates for flaky tests (#17603)
* Skipping Bug16702 spec * Bug 16702 fix * timeout spec index update * Bug 16702 spec fix * Bug16702 fix * BUg16702 spec fix * Bug 16702 revert * fix template spec Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
This commit is contained in:
parent
62fb99929e
commit
03fbcdd21c
|
|
@ -9,7 +9,11 @@ const locator = ObjectsRegistry.CommonLocators,
|
||||||
|
|
||||||
const GRAPHQL_LIMIT_QUERY = `
|
const GRAPHQL_LIMIT_QUERY = `
|
||||||
query {
|
query {
|
||||||
launchesPast(limit: "__limit__", offset: "__offset__") {
|
launchesPast(limit:
|
||||||
|
"__limit__"
|
||||||
|
,offset:
|
||||||
|
"__offset__"
|
||||||
|
) {
|
||||||
mission_name
|
mission_name
|
||||||
rocket {
|
rocket {
|
||||||
rocket_name
|
rocket_name
|
||||||
|
|
@ -44,10 +48,12 @@ describe("Binding Expressions should not be truncated in Url and path extraction
|
||||||
// expect(Cypress.dom.isDetached($el)).to.false;
|
// expect(Cypress.dom.isDetached($el)).to.false;
|
||||||
// })
|
// })
|
||||||
//.trigger("mouseover")
|
//.trigger("mouseover")
|
||||||
.click()
|
.dblclick()
|
||||||
.type("{{JSObject1.");
|
.type("{{JSObject1.");
|
||||||
agHelper.GetNClickByContains(locator._hints, "offsetValue");
|
agHelper.GetNAssertElementText(locator._hints, "offsetValue", "have.text", 1);
|
||||||
agHelper.Sleep(200);
|
agHelper.Sleep();
|
||||||
|
agHelper.TypeText(locator._codeMirrorTextArea, "offsetValue", 1);
|
||||||
|
agHelper.Sleep(2000);
|
||||||
|
|
||||||
/* Start: Block of code to remove error of detached node of codemirror for cypress reference */
|
/* Start: Block of code to remove error of detached node of codemirror for cypress reference */
|
||||||
|
|
||||||
|
|
@ -58,10 +64,10 @@ describe("Binding Expressions should not be truncated in Url and path extraction
|
||||||
cy.get(".t--graphql-query-editor pre.CodeMirror-line span")
|
cy.get(".t--graphql-query-editor pre.CodeMirror-line span")
|
||||||
.contains("__limit__")
|
.contains("__limit__")
|
||||||
//.trigger("mouseover")
|
//.trigger("mouseover")
|
||||||
.click()
|
.dblclick()
|
||||||
.type("{{JSObject1.");
|
.type("{{JSObject1.");
|
||||||
agHelper.GetNClickByContains(locator._hints, "limitValue");
|
agHelper.GetNClickByContains(locator._hints, "limitValue");
|
||||||
agHelper.Sleep();
|
agHelper.Sleep(2000);
|
||||||
//Commenting this since - many runs means - API response is 'You are doing too many launches'
|
//Commenting this since - many runs means - API response is 'You are doing too many launches'
|
||||||
// apiPage.RunAPI(false, 20, {
|
// apiPage.RunAPI(false, 20, {
|
||||||
// expectedPath: "response.body.data.body.data.launchesPast[0].mission_name",
|
// expectedPath: "response.body.data.body.data.launchesPast[0].mission_name",
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ describe("Fork a template to the current app", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("1.Bug #17002 Forking a template into an existing app which is connected to git makes the application go into a bad state ", function() {
|
it("1.Bug #17002 Forking a template into an existing app which is connected to git makes the application go into a bad state ", function() {
|
||||||
|
cy.wait(5000);
|
||||||
cy.get(template.startFromTemplateCard).click();
|
cy.get(template.startFromTemplateCard).click();
|
||||||
cy.wait("@fetchTemplate").should(
|
cy.wait("@fetchTemplate").should(
|
||||||
"have.nested.property",
|
"have.nested.property",
|
||||||
|
|
@ -52,7 +53,7 @@ describe("Fork a template to the current app", () => {
|
||||||
cy.CreatePage();
|
cy.CreatePage();
|
||||||
cy.get(template.startFromTemplateCard).click();
|
cy.get(template.startFromTemplateCard).click();
|
||||||
|
|
||||||
cy.wait(1000);
|
cy.wait(5000);
|
||||||
cy.get(template.templateDialogBox).should("be.visible");
|
cy.get(template.templateDialogBox).should("be.visible");
|
||||||
cy.xpath("//div[text()='Customer Support Dashboard']").click();
|
cy.xpath("//div[text()='Customer Support Dashboard']").click();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const publish = require("../../../../locators/publishWidgetspage.json");
|
||||||
describe("Fork a template to the current app from new page popover", () => {
|
describe("Fork a template to the current app from new page popover", () => {
|
||||||
it("1. Fork template from page section", () => {
|
it("1. Fork template from page section", () => {
|
||||||
cy.AddPageFromTemplate();
|
cy.AddPageFromTemplate();
|
||||||
cy.wait(1000);
|
cy.wait(3000);
|
||||||
cy.get(template.templateDialogBox).should("be.visible");
|
cy.get(template.templateDialogBox).should("be.visible");
|
||||||
cy.wait(4000);
|
cy.wait(4000);
|
||||||
cy.xpath(
|
cy.xpath(
|
||||||
|
|
@ -25,7 +25,7 @@ describe("Fork a template to the current app from new page popover", () => {
|
||||||
|
|
||||||
it("2. Add selected page of template from page section", () => {
|
it("2. Add selected page of template from page section", () => {
|
||||||
cy.AddPageFromTemplate();
|
cy.AddPageFromTemplate();
|
||||||
cy.wait(1000);
|
cy.wait(3000);
|
||||||
cy.get(template.templateDialogBox).should("be.visible");
|
cy.get(template.templateDialogBox).should("be.visible");
|
||||||
cy.wait(4000);
|
cy.wait(4000);
|
||||||
cy.xpath("//div[text()='Customer Support Dashboard']").click();
|
cy.xpath("//div[text()='Customer Support Dashboard']").click();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ describe("Fork a template to the current app", () => {
|
||||||
"response.body.responseMeta.status",
|
"response.body.responseMeta.status",
|
||||||
200,
|
200,
|
||||||
);
|
);
|
||||||
cy.wait(1000);
|
cy.wait(5000);
|
||||||
cy.get(template.templateDialogBox).should("be.visible");
|
cy.get(template.templateDialogBox).should("be.visible");
|
||||||
cy.xpath(
|
cy.xpath(
|
||||||
"//div[text()='Customer Support Dashboard']/following-sibling::div//button[contains(@class, 'fork-button')]",
|
"//div[text()='Customer Support Dashboard']/following-sibling::div//button[contains(@class, 'fork-button')]",
|
||||||
|
|
@ -46,7 +46,7 @@ describe("Fork a template to the current app", () => {
|
||||||
"response.body.responseMeta.status",
|
"response.body.responseMeta.status",
|
||||||
200,
|
200,
|
||||||
);
|
);
|
||||||
cy.wait(1000);
|
cy.wait(5000);
|
||||||
cy.get(template.templateDialogBox).should("be.visible");
|
cy.get(template.templateDialogBox).should("be.visible");
|
||||||
cy.xpath("//div[text()='Customer Support Dashboard']").click();
|
cy.xpath("//div[text()='Customer Support Dashboard']").click();
|
||||||
cy.wait("@getTemplatePages").should(
|
cy.wait("@getTemplatePages").should(
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ const apiPage = ObjectsRegistry.ApiPage;
|
||||||
const deployMode = ObjectsRegistry.DeployMode;
|
const deployMode = ObjectsRegistry.DeployMode;
|
||||||
|
|
||||||
describe("Tests setTimeout API", function() {
|
describe("Tests setTimeout API", function() {
|
||||||
it("Executes showAlert after 3 seconds and uses default value", () => {
|
it("1. Executes showAlert after 3 seconds and uses default value", () => {
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
myVar1: [],
|
myVar1: [],
|
||||||
|
|
@ -30,7 +30,8 @@ describe("Tests setTimeout API", function() {
|
||||||
agHelper.Sleep(3000);
|
agHelper.Sleep(3000);
|
||||||
agHelper.AssertContains("Hello world - default", "exist");
|
agHelper.AssertContains("Hello world - default", "exist");
|
||||||
});
|
});
|
||||||
it("Executes all three alerts in parallel after 3 seconds", () => {
|
|
||||||
|
it("2. Executes all three alerts in parallel after 3 seconds", () => {
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
myVar1: [],
|
myVar1: [],
|
||||||
|
|
@ -62,7 +63,8 @@ describe("Tests setTimeout API", function() {
|
||||||
agHelper.AssertContains("Hello world - 2", "exist");
|
agHelper.AssertContains("Hello world - 2", "exist");
|
||||||
agHelper.AssertContains("Hello world - 3", "exist");
|
agHelper.AssertContains("Hello world - 3", "exist");
|
||||||
});
|
});
|
||||||
it("Resolves promise after 3 seconds and shows alert", () => {
|
|
||||||
|
it("3. Resolves promise after 3 seconds and shows alert", () => {
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
myVar1: [],
|
myVar1: [],
|
||||||
|
|
@ -121,7 +123,7 @@ describe("Tests setTimeout API", function() {
|
||||||
agHelper.GetNAssertContains(locators._debuggerLogMessage, "Working!");
|
agHelper.GetNAssertContains(locators._debuggerLogMessage, "Working!");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Resolves promise after 3 seconds and shows alert", () => {
|
it("4. Resolves promise after 3 seconds and shows alert", () => {
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
myVar1: [],
|
myVar1: [],
|
||||||
|
|
@ -145,7 +147,8 @@ describe("Tests setTimeout API", function() {
|
||||||
agHelper.Sleep(3000);
|
agHelper.Sleep(3000);
|
||||||
agHelper.AssertContains("resolved");
|
agHelper.AssertContains("resolved");
|
||||||
});
|
});
|
||||||
it("Access to args passed into success/error callback functions in API.run when using setTimeout", () => {
|
|
||||||
|
it("5. Access to args passed into success/error callback functions in API.run when using setTimeout", () => {
|
||||||
apiPage.CreateAndFillApi("https://mock-api.appsmith.com/users");
|
apiPage.CreateAndFillApi("https://mock-api.appsmith.com/users");
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
|
|
@ -187,7 +190,8 @@ describe("Tests setTimeout API", function() {
|
||||||
agHelper.Sleep(3000);
|
agHelper.Sleep(3000);
|
||||||
agHelper.AssertContains("Barty Crouch");
|
agHelper.AssertContains("Barty Crouch");
|
||||||
});
|
});
|
||||||
it("Verifies whether setTimeout executes on page load", () => {
|
|
||||||
|
it("6. Verifies whether setTimeout executes on page load", () => {
|
||||||
apiPage.CreateAndFillApi("https://mock-api.appsmith.com/users");
|
apiPage.CreateAndFillApi("https://mock-api.appsmith.com/users");
|
||||||
jsEditor.CreateJSObject(
|
jsEditor.CreateJSObject(
|
||||||
`export default {
|
`export default {
|
||||||
Loading…
Reference in New Issue
Block a user