test: Fix flaky tests + Add clean up for git repos (#20319)

## Description

- Added clean up for git repos

**Fixed below flaky tests**
- Scrolling_spec.js
- PgAdmin_spec.js
- BasicLint_spec.ts
- Logs_spec.ts
- GraphQL_spec.ts

## Type of change

- Flaky test fix

## How Has This Been Tested?
- Cypress test runs

## Checklist:
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

---------

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com>
This commit is contained in:
Vijetha-Kaja 2023-02-06 13:07:01 +05:30 committed by GitHub
parent 73bc0c0fc9
commit bab8e6be8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 162 additions and 95 deletions

View File

@ -49,7 +49,7 @@
"mockDatabasePassword": "LimitedAccess123#",
"readonly":"readonly",
"authenticatedApiUrl": "https://fakeapi.com",
"graphqlApiUrl": "https://api.spacex.land/graphql",
"graphqlApiUrl": "https://spacex-production.up.railway.app",
"GITHUB_API_BASE_TED" : "localhost",
"GITHUB_API_PORT_TED": "5001"
}

View File

@ -212,4 +212,9 @@ describe("Shopping cart App", function() {
.should("have.text", "A man called ove");
cy.wait(1000);
});
after(() => {
//clean up
_.gitSync.DeleteTestGithubRepo(repoName);
});
});

View File

@ -78,9 +78,8 @@ describe("PgAdmin Clone App", function() {
_.agHelper.GetNClick(appPage.addColumn, 0, true);
_.agHelper.AssertElementVisible(appPage.columnNamefield);
_.agHelper.AssertElementVisible(appPage.datatypefield);
cy.xpath(appPage.addTablename)
.click()
.type("id");
_.agHelper.GetNClick(appPage.addColumnName)
_.agHelper.UpdateInput(appPage.addColumnName,"id")
cy.get(appPage.dropdownChevronDown)
.last()
.click();
@ -145,7 +144,8 @@ describe("PgAdmin Clone App", function() {
cy.xpath(appPage.addColumn).click({ force: true });
cy.xpath(appPage.columnNamefield).should("be.visible");
cy.xpath(appPage.datatypefield).should("be.visible");
cy.xpath(appPage.addTablename).type("id2");
_.agHelper.GetNClick(appPage.addColumnName)
_.agHelper.UpdateInput(appPage.addColumnName,"id2")
cy.get(appPage.dropdownChevronDown)
.last()
.click();

View File

@ -78,7 +78,6 @@ describe("Validate JSObjects binding to Input widget", () => {
}`;
ee.SelectEntityByName(jsOjbNameReceived as string, "Queries/JS");
jsEditor.EditJSObj(jsBody);
agHelper.AssertAutoSave();
ee.ExpandCollapseEntity("Widgets");
ee.ExpandCollapseEntity("Form1");
ee.SelectEntityByName("Input2");
@ -87,4 +86,4 @@ describe("Validate JSObjects binding to Input widget", () => {
cy.get(locator._widgetInputSelector("inputwidgetv2")).first().should('have.value', 'Hello')
cy.get(locator._widgetInputSelector("inputwidgetv2")).last().should('have.value', 'Success')
});
});
});

View File

@ -1,8 +1,13 @@
import * as _ from "../../../../support/Objects/ObjectsCore";
import { WIDGET } from "../../../../locators/WidgetLocators";
let testName: any;
let repoName: any;
describe("Git Bugs", function() {
before(() => {
_.homePage.NavigateToHome();
_.homePage.CreateNewWorkspace("GitBugs1 workspace");
_.homePage.CreateAppInWorkspace("GitBugs1 workspace");
});
it("1. Bug 16248, When GitSync modal is open, block shortcut action execution", function() {
const largeResponseApiUrl = "https://jsonplaceholder.typicode.com/users";
@ -23,9 +28,8 @@ describe("Git Bugs", function() {
_.dataSources.CreatePlugIn("PostgreSQL");
_.dataSources.SaveDSFromDialog(false);
_.agHelper.AssertElementVisible(_.gitSync._branchButton);
cy.get("@gitRepoName").then((repoName) => {
testName = repoName;
cy.log("testName is :"+ testName)
cy.get("@gitRepoName").then((repName) => {
repoName = repName;
});
});
@ -50,11 +54,11 @@ describe("Git Bugs", function() {
_.agHelper
.GetText(_.locators._textWidget)
.then(($qp) => expect($qp).to.eq("Yes"));
_.agHelper.ValidateURL("branch=" + testName); //Validate we are still in Git branch
_.agHelper.ValidateURL("branch=" + repoName); //Validate we are still in Git branch
_.agHelper.ValidateURL("testQP=Yes"); //Validate we also ve the Query Params from Page1
});
after(() => {
_.gitSync.DeleteTestGithubRepo(testName);
_.gitSync.DeleteTestGithubRepo(repoName);
});
});

View File

@ -6,7 +6,7 @@ const ee = ObjectsRegistry.EntityExplorer,
locator = ObjectsRegistry.CommonLocators;
let mockDBNameUsers: any, mockDBNameMovies: any;
describe.skip("Entity explorer context menu should hide on scrolling", function() {
describe("Entity explorer context menu should hide on scrolling", function() {
it("1. Bug #15474 - Entity explorer menu must close on scroll", function() {
// Setup to make the explorer scrollable
ee.ExpandCollapseEntity("Queries/JS");

View File

@ -96,6 +96,9 @@ describe("Git discard changes:", function() {
_.gitSync.CreateNConnectToGit(repoName);
_.gitSync.CreateGitBranch(repoName);
});
cy.get("@gitRepoName").then((repName) => {
repoName = repName;
});
});
it("2. Add new datasource query, discard changes, verify query is deleted", () => {
@ -244,4 +247,9 @@ describe("Git discard changes:", function() {
cy.wait(5000);
cy.get(`.t--entity-name:contains("${page3}")`).should("not.exist");
});
after(() => {
//clean up
_.gitSync.DeleteTestGithubRepo(repoName);
});
});

View File

@ -73,7 +73,7 @@ describe("Git import flow ", function() {
_.gitSync.CreateGitBranch(repoName);
});
cy.wait(5000); // for git connection to settle!
_.agHelper.AssertElementExist(_.gitSync._bottomBarPull);
});
});
@ -120,7 +120,6 @@ describe("Git import flow ", function() {
cy.get(reconnectDatasourceModal.ImportSuccessModalCloseBtn).click({
force: true,
});
cy.wait(4000); //for git connection to settle
/* cy.get(homePage.toastMessage).should(
"contain",
"Application imported successfully",
@ -129,6 +128,14 @@ describe("Git import flow ", function() {
cy.log(interception.response.body.data);
cy.wait(1000);
});
_.agHelper.AssertElementExist(_.gitSync._bottomBarPull);
cy.wait(3000); //for uncommited changes to appear if any!
cy.get("body").then(($body) => {
if ($body.find(gitSyncLocators.gitPullCount).length > 0) {
cy.commitAndPush();
}
});
});
it("3. Verfiy imported app should have all the data binding visible in view and edit mode", () => {
@ -147,7 +154,7 @@ describe("Git import flow ", function() {
});
// skipping below 3 cases due to open bug #18776
it.skip("4. Create a new branch, clone page and validate data on that branch in view and edit mode", () => {
it("4. Create a new branch, clone page and validate data on that branch in view and edit mode", () => {
//cy.createGitBranch(newBranch);
_.gitSync.CreateGitBranch(newBranch, true);
@ -196,7 +203,7 @@ describe("Git import flow ", function() {
cy.get(gitSyncLocators.commitCommentInput).type("Initial Commit");
cy.get(gitSyncLocators.commitButton).click();
cy.intercept("POST", "api/v1/git/commit/app/*").as("commit");
cy.wait(10000);
_.agHelper.AssertElementExist(_.gitSync._bottomBarPull);
cy.get(gitSyncLocators.closeGitSyncModal).click();
cy.wait(2000);
cy.merge(mainBranch);
@ -225,7 +232,7 @@ describe("Git import flow ", function() {
cy.wait(2000);
});
it.skip("5. Switch to master and verify data in edit and view mode", () => {
it("5. Switch to master and verify data in edit and view mode", () => {
cy.switchGitBranch("master");
cy.wait(2000);
// validate data binding in edit and deploy mode
@ -248,8 +255,9 @@ describe("Git import flow ", function() {
cy.wait(2000);
});
it.skip("6. Add widget to master, merge then checkout to child branch and verify data", () => {
cy.get(explorer.widgetSwitchId).click();
it("6. Add widget to master, merge then checkout to child branch and verify data", () => {
//_.canvasHelper.OpenWidgetPane();
_.ee.NavigateToSwitcher("widgets");
cy.wait(2000); // wait for transition
cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 600 });
cy.wait(3000);

View File

@ -2,11 +2,14 @@ import homePage from "../../../../../locators/HomePage";
import gitSyncLocators from "../../../../../locators/gitSyncLocators";
import * as _ from "../../../../../support/Objects/ObjectsCore";
let branchName;
let repoName, branchName;
describe("Delete branch flow", () => {
it("1. Connect app to git, create new branch and delete it", () => {
// create git repo and connect app to git
_.gitSync.CreateNConnectToGit();
cy.get("@gitRepoName").then((repName) => {
repoName = repName;
});
_.gitSync.CreateGitBranch();
//cy.createGitBranch(branchName);
cy.wait(1000);
@ -122,4 +125,9 @@ describe("Delete branch flow", () => {
"Cannot delete default branch: master",
);
}); */
after(() => {
//clean up
_.gitSync.DeleteTestGithubRepo(repoName);
});
});

View File

@ -311,4 +311,9 @@ describe("Git sync Bug #10773", function() {
cy.SearchApp(`${newWorkspaceName}app`);
});
});
after(() => {
//clean up
_.gitSync.DeleteTestGithubRepo(repoName);
});
});

View File

@ -553,4 +553,9 @@ describe("Git sync apps", function() {
.eq(5)
.contains("Child_Page");
});
after(() => {
//clean up
_.gitSync.DeleteTestGithubRepo(repoName);
});
});

View File

@ -2,7 +2,16 @@ import gitSyncLocators from "../../../../../locators/gitSyncLocators";
import * as _ from "../../../../../support/Objects/ObjectsCore";
describe("Git regenerate SSH key flow", function() {
let repoName;
let repoName, newWorkspaceName;
before(() => {
cy.NavigateToHome();
cy.createWorkspace();
cy.wait("@createWorkspace").then((interception) => {
newWorkspaceName = interception.response.body.data.name;
cy.CreateAppForWorkspace(newWorkspaceName, newWorkspaceName);
});
});
it("1. Verify SSH key regeneration flow ", () => {
_.gitSync.CreateNConnectToGit(repoName);
@ -39,4 +48,9 @@ describe("Git regenerate SSH key flow", function() {
cy.get("body").click(0, 0);
cy.wait(2000);
});
after(() => {
//clean up
_.gitSync.DeleteTestGithubRepo(repoName);
});
});

View File

@ -141,4 +141,9 @@ describe("Git with Theming:", function() {
backgroudColorMaster,
);
}); */
after(() => {
//clean up
_.gitSync.DeleteTestGithubRepo(repoName);
});
});

View File

@ -26,11 +26,11 @@ const clickButtonAndAssertLintError = (
if (shouldExist) {
agHelper.AssertElementExist(locator._lintErrorElement);
agHelper.ClickButton("Submit");
agHelper.ValidateToastMessage(errorMessage);
agHelper.AssertContains(errorMessage);
} else {
agHelper.AssertElementAbsence(locator._lintErrorElement);
agHelper.ClickButton("Submit");
agHelper.ValidateToastMessage(successMessage);
agHelper.AssertContains(successMessage);
}
//Reload and Check for presence/ absence of lint error
@ -143,7 +143,6 @@ describe("Linting", () => {
ee.ExpandCollapseEntity("Queries/JS");
ee.ActionContextMenuByEntityName("JSObject1", "Delete", "Are you sure?");
ee.SelectEntityByName("Button1", "Widgets");
clickButtonAndAssertLintError(true);
// Re-create JSObject, lint error should be gone

View File

@ -287,6 +287,7 @@ describe("Debugger logs", function() {
agHelper.WaitUntilAllToastsDisappear();
cy.get("@jsObjName").then((jsObjName) => {
agHelper.Sleep(2000)
agHelper.GetNClick(jsEditor._runButton);
agHelper.GetNClick(jsEditor._logsTab);
debuggerHelper.DoesConsoleLogExist(`${logString} Started`);

View File

@ -4,7 +4,7 @@ import widgetLocators from "../../../../locators/Widgets.json";
let repoName;
let appId;
let branchName = "test/template";
const jsObject = "JSObject1";
const jsObject = "Utils";
const homePage = require("../../../../locators/HomePage");
import * as _ from "../../../../support/Objects/ObjectsCore";
@ -38,9 +38,10 @@ describe("Fork a template to the current app", () => {
200,
);
cy.xpath(
"//div[text()='Meeting Scheduler']/following-sibling::div//button[contains(@class, 'fork-button')]//span[contains(@class, 't--left-icon')]",
"//div[text()='Slack Bot']/parent::div//button[contains(@class, 't--fork-template')]",
)
.scrollIntoView()
.wait(500)
.click();
cy.waitUntil(() => cy.xpath("//span[text()='Setting up the template']"), {
errorMsg: "Setting Templates did not finish even after 75 seconds",
@ -71,16 +72,16 @@ describe("Fork a template to the current app", () => {
_.ee.AddNewPage();
_.ee.AddNewPage("add-page-from-template");
cy.get(template.templateDialogBox).should("be.visible");
cy.xpath("//div[text()='Slack Bot']").click();
cy.xpath("//div[text()='Marketing Dashboard']").click();
cy.wait(10000); // for templates page to load fully
// cy.xpath(template.selectAllPages)
// .next()
// .click();
// cy.wait(1000);
// cy.xpath("//span[text()='SEARCH']")
// .parent()
// .next()
// .click();
cy.xpath(template.selectAllPages)
.next()
.click();
cy.wait(1000);
cy.xpath("//span[text()='SEND MESSAGES']")
.parent()
.next()
.click();
// [Bug]: On forking selected pages from a template, resource not found error is shown #17270
cy.get(template.templateViewForkButton).click();
cy.wait(5000);

View File

@ -24,9 +24,10 @@ describe("Fork a template to the current app from new page popover", () => {
cy.get(template.templateDialogBox).should("be.visible");
cy.wait(4000);
cy.xpath(
"//div[text()='Customer Support Dashboard']/following-sibling::div//button[contains(@class, 'fork-button')]//span[contains(@class, 't--left-icon')]",
"//div[text()='Meeting Scheduler']/parent::div//button[contains(@class, 't--fork-template')]",
)
.scrollIntoView()
.wait(500)
.click();
cy.wait(1000);
cy.wait("@getTemplatePages").should(
@ -56,7 +57,7 @@ describe("Fork a template to the current app from new page popover", () => {
cy.wait(5000);
cy.get(template.templateDialogBox).should("be.visible");
cy.wait(4000);
cy.xpath("//div[text()='Customer Support Dashboard']").click();
cy.xpath("//div[text()='Meeting Scheduler']").click();
cy.wait("@getTemplatePages").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -65,7 +66,7 @@ describe("Fork a template to the current app from new page popover", () => {
cy.xpath(template.selectAllPages)
.next()
.click();
cy.xpath("//span[text()='DASHBOARD']")
cy.xpath("//span[text()='CALENDAR MOBILE']")
.parent()
.next()
.click();

View File

@ -24,7 +24,7 @@ describe("Fork a template to the current app", () => {
.click({ force: true });
});
it("1. Fork a template to the current app", () => {
it("1. Fork a template to the current app + Bug 17477", () => {
cy.wait(5000);
cy.get(template.startFromTemplateCard).click();
// Commented out below code as fetch template call is not going through when template dialog is closed
@ -36,9 +36,10 @@ describe("Fork a template to the current app", () => {
cy.wait(5000);
cy.get(template.templateDialogBox).should("be.visible");
cy.xpath(
"//div[text()='Customer Support Dashboard']/following-sibling::div//button[contains(@class, 'fork-button')]//span[contains(@class, 't--left-icon')]",
"//div[text()='Applicant Tracker-test']/parent::div//button[contains(@class, 't--fork-template')]",
)
.scrollIntoView()
.wait(500)
.click();
_.agHelper.CheckForErrorToast("INTERNAL_SERVER_ERROR");
cy.wait("@getTemplatePages").should(
@ -61,7 +62,7 @@ describe("Fork a template to the current app", () => {
// [Bug]: Getting 'Resource not found' error on deploying template #17477
cy.PublishtheApp();
cy.get(".t--page-switch-tab")
.contains("Dashboard")
.contains("1 Track Applications")
.click({ force: true });
cy.wait(4000);
cy.get(publish.backToEditor).click();
@ -84,7 +85,7 @@ describe("Fork a template to the current app", () => {
// );
cy.wait(5000);
cy.get(template.templateDialogBox).should("be.visible");
cy.xpath("//div[text()='Customer Support Dashboard']").click();
cy.xpath("//div[text()='Applicant Tracker-test']").click();
_.agHelper.CheckForErrorToast("INTERNAL_SERVER_ERROR");
cy.wait("@getTemplatePages").should(
"have.nested.property",
@ -95,7 +96,7 @@ describe("Fork a template to the current app", () => {
.next()
.click();
cy.wait(1000);
cy.xpath("//span[text()='SEARCH']")
cy.xpath("//span[text()='2 APPLICATION UPLOAD']")
.parent()
.next()
.click();
@ -106,7 +107,7 @@ describe("Fork a template to the current app", () => {
"response.body.responseMeta.status",
200,
);
cy.get(widgetLocators.toastAction, { timeout: 20000 }).should(
cy.get(widgetLocators.toastAction, { timeout: 40000 }).should(
"contain",
"template added successfully",
);

View File

@ -9,9 +9,10 @@ describe("Fork a template to an workspace", () => {
cy.get(templateLocators.templatesTab).click();
cy.wait(1000);
cy.xpath(
"//div[text()='Customer Support Dashboard']/following-sibling::div//button[contains(@class, 'fork-button')]//span[contains(@class, 't--left-icon')]",
"//div[text()='Customer Support Dashboard']/parent::div//button[contains(@class, 't--fork-template')]",
)
.scrollIntoView()
.wait(500)
.click();
cy.get("body").then(($ele) => {
if ($ele.find(templateLocators.templateViewForkButton).length) {

View File

@ -1,14 +1,9 @@
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
import * as _ from "../../../../support/Objects/ObjectsCore";
let appName: string = "";
let datasourceName: string = "GraphQL_DS_";
let apiName: string = "GraphQL_API_";
let dataSources = ObjectsRegistry.DataSources;
let agHelper = ObjectsRegistry.AggregateHelper;
let homePage = ObjectsRegistry.HomePage;
let apiPage = ObjectsRegistry.ApiPage;
const GRAPHQL_QUERY = `
query($id: ID!) {
capsule(id: $id) {
@ -18,7 +13,7 @@ const GRAPHQL_QUERY = `
landings
`;
const CAPSULE_ID = "C105";
const CAPSULE_ID = "5e9e2c5bf35918ed873b2664"
const GRAPHQL_VARIABLES = `
{
@ -35,17 +30,17 @@ const GRAPHQL_LIMIT_QUERY = `
const GRAPHQL_LIMIT_DATA = [
{
mission_name: "Starlink-15 (v1.0)",
mission_name: "FalconSat",
},
{
mission_name: "Sentinel-6 Michael Freilich",
mission_name: "DemoSat",
},
];
describe("GraphQL Datasource Implementation", function() {
before(() => {
appName = localStorage.getItem("AppName") || "";
agHelper.GenerateUUID();
_.agHelper.GenerateUUID();
cy.get("@guid").then((uid) => {
datasourceName = `${datasourceName}${uid}`;
apiName = `${apiName}${uid}`;
@ -54,78 +49,78 @@ describe("GraphQL Datasource Implementation", function() {
it("1. Should create the Graphql datasource with Credentials", function() {
// Navigate to Datasource Editor
dataSources.CreateGraphqlDatasource(datasourceName);
dataSources.DeleteDatasouceFromActiveTab(datasourceName);
_.dataSources.CreateGraphqlDatasource(datasourceName);
_.dataSources.DeleteDatasouceFromActiveTab(datasourceName);
});
it("2. Should create an GraphQL API with updated name", function() {
dataSources.CreateGraphqlDatasource(datasourceName);
dataSources.NavigateFromActiveDS(datasourceName, true);
agHelper.ValidateNetworkStatus("@createNewApi", 201);
agHelper.RenameWithInPane(apiName, true);
_.dataSources.CreateGraphqlDatasource(datasourceName);
_.dataSources.NavigateFromActiveDS(datasourceName, true);
_.agHelper.ValidateNetworkStatus("@createNewApi", 201);
_.agHelper.RenameWithInPane(apiName, true);
});
it.skip("3. Should execute the API and validate the response", function() {
it("3. Should execute the API and validate the response", function() {
/* Create an API */
dataSources.NavigateFromActiveDS(datasourceName, true);
_.dataSources.NavigateFromActiveDS(datasourceName, true);
apiPage.SelectPaneTab("Body");
dataSources.UpdateGraphqlQueryAndVariable({
_.apiPage.SelectPaneTab("Body");
_.dataSources.UpdateGraphqlQueryAndVariable({
query: GRAPHQL_QUERY,
variable: GRAPHQL_VARIABLES,
});
apiPage.RunAPI(false, 20, {
_.apiPage.RunAPI(false, 20, {
expectedPath: "response.body.data.body.data.capsule.id",
expectedRes: CAPSULE_ID,
});
});
it.skip("4. Pagination for limit based should work without offset", function() {
it("4. Pagination for limit based should work without offset", function() {
/* Create an API */
dataSources.NavigateFromActiveDS(datasourceName, true);
apiPage.SelectPaneTab("Body");
dataSources.UpdateGraphqlQueryAndVariable({
_.dataSources.NavigateFromActiveDS(datasourceName, true);
_.apiPage.SelectPaneTab("Body");
_.dataSources.UpdateGraphqlQueryAndVariable({
query: GRAPHQL_LIMIT_QUERY,
});
// Change tab to Pagination tab
apiPage.SelectPaneTab("Pagination");
_.apiPage.SelectPaneTab("Pagination");
// Select Limit base Pagination
apiPage.SelectPaginationTypeViaIndex(1);
_.apiPage.SelectPaginationTypeViaIndex(1);
dataSources.UpdateGraphqlPaginationParams({
_.dataSources.UpdateGraphqlPaginationParams({
limit: {
variable: "limit",
value: "1",
value: "2",
},
});
apiPage.RunAPI(false, 20, {
_.apiPage.RunAPI(false, 20, {
expectedPath: "response.body.data.body.data.launchesPast[0].mission_name",
expectedRes: GRAPHQL_LIMIT_DATA[0].mission_name,
});
});
it.skip("5. Pagination for limit based should work with offset", function() {
it("5. Pagination for limit based should work with offset", function() {
/* Create an API */
dataSources.NavigateFromActiveDS(datasourceName, true);
apiPage.SelectPaneTab("Body");
dataSources.UpdateGraphqlQueryAndVariable({
_.dataSources.NavigateFromActiveDS(datasourceName, true);
_.apiPage.SelectPaneTab("Body");
_.dataSources.UpdateGraphqlQueryAndVariable({
query: GRAPHQL_LIMIT_QUERY,
});
// Change tab to Pagination tab
apiPage.SelectPaneTab("Pagination");
_.apiPage.SelectPaneTab("Pagination");
// Select Limit base Pagination
apiPage.SelectPaginationTypeViaIndex(1);
_.apiPage.SelectPaginationTypeViaIndex(1);
dataSources.UpdateGraphqlPaginationParams({
_.dataSources.UpdateGraphqlPaginationParams({
limit: {
variable: "limit",
value: "1",
value: "5",
},
offset: {
variable: "offset",
@ -133,13 +128,9 @@ describe("GraphQL Datasource Implementation", function() {
},
});
apiPage.RunAPI(false, 20, {
_.apiPage.RunAPI(false, 20, {
expectedPath: "response.body.data.body.data.launchesPast[0].mission_name",
expectedRes: GRAPHQL_LIMIT_DATA[1].mission_name,
});
});
after(() => {
homePage.NavigateToHome();
});
});
});

View File

@ -3,6 +3,7 @@
"addNewtable":"//span[text()='New Table']",
"addTablename":"(//div[@class='bp3-input-group']//input)[2]",
"addColumn":"//span[text()='Add Column']/parent::button/parent::div",
"addColumnName":"div[data-testid='input-container']",
"textField":"//span[text()='Text']",
"selectDatatype":"//div[text()='Varchar']",
"submitButton":"//span[text()='Submit']",

View File

@ -19,7 +19,7 @@ export default {
bottomBarCommitButton: ".t--bottom-bar-commit",
bottomBarMergeButton: ".t--bottom-bar-merge",
bottomBarPullButton: ".t--bottom-bar-pull",
mergeBranchDropdownDestination: ".t--merge-branch-dropdown-destination",
mergeBranchDropdownDestination: ".merge-dropdown",
mergeCTA: "[data-testid=t--git-merge-button]",
loaderQuickGitAction: ".t--loader-quick-git-action",
copySshKey: ".t--copy-ssh-key",
@ -48,7 +48,7 @@ export default {
disconnectLearnMoreLink: ".t--disconnect-learn-more",
learnMoreOnRepoLimitModal: ".t--learn-more-repo-limit-modal",
gitSyncModalDeployTab: "[data-cy=t--tab-DEPLOY]",
gitPullCount: ".t--bottom-bar-pull .count",
gitPullCount: ".t--bottom-bar-commit .count",
gitConnectionContainer: "[data-test=t--git-connection-container]",
gitRemoteURLContainer: "[data-test=t--remote-url-container]",
discardChanges: ".t--discard-button",

View File

@ -153,6 +153,8 @@ export class AggregateHelper {
cy.get(this.locator._saveStatusContainer, { timeout: 30000 }).should(
"not.exist",
); //adding timeout since waiting more time is not worth it!
//this.ValidateNetworkStatus("@sucessSave", 200);
}
public ValidateCodeEditorContent(selector: string, contentToValidate: any) {

View File

@ -480,7 +480,7 @@ export class DataSources {
public NavigateToActiveTab() {
this.NavigateToDSCreateNew();
this.agHelper.GetNClick(this._activeTab);
this.agHelper.GetNClick(this._activeTab,0,true);
}
public NavigateFromActiveDS(datasourceName: string, createQuery: boolean) {

View File

@ -100,7 +100,7 @@ export class GitSync {
this.agHelper.TypeText(this._gitConfigEmailInput, "test@test.com");
this.agHelper.ClickButton("CONNECT");
if (assertConnect) {
this.agHelper.ValidateNetworkStatus("@connectGitLocalRepo", 200, 30000);//Increasing wait time for GitRepo to create in Gitea
this.agHelper.ValidateNetworkStatus("@connectGitLocalRepo", 200, 40000);//Increasing wait time for GitRepo to create in Gitea
this.agHelper.AssertElementExist(this._bottomBarCommit, 0, 30000);
this.CloseGitSyncModal();
}

View File

@ -28,6 +28,9 @@ const queryLocators = require("../locators/QueryEditor.json");
const welcomePage = require("../locators/welcomePage.json");
const publishWidgetspage = require("../locators/publishWidgetspage.json");
// import { ObjectsRegistry } from "../support/Objects/Registry";
// let agHelper = ObjectsRegistry.AggregateHelper;
let pageidcopy = " ";
const chainStart = Symbol();
@ -1026,6 +1029,10 @@ Cypress.Commands.add("startServerAndRoutes", () => {
req.headers["origin"] = "Cypress";
},
).as("connectGitLocalRepo");
cy.intercept({
method: "PUT",
}).as("sucessSave");
});
Cypress.Commands.add("startErrorRoutes", () => {
@ -1179,6 +1186,7 @@ Cypress.Commands.add("assertPageSave", () => {
cy.get(commonlocators.saveStatusContainer).should("not.exist", {
timeout: 30000,
});
//agHelper.ValidateNetworkStatus("@sucessSave", 200);
});
Cypress.Commands.add(