chore: Add cypress.env.json to gitIgnore (#21413)
## Description Adding Cypress.env.json to gitIgnore ## Type of change - Chore ## How Has This Been Tested? ### Test Plan > Add Testsmith test cases links that relate to this PR ### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) ## Checklist: ### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [ ] Added Test Plan Approved label after reveiwing all Cypress test --------- Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
This commit is contained in:
parent
fcc4e54dd8
commit
4c31ec35b1
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,7 +2,6 @@
|
||||||
*.iml
|
*.iml
|
||||||
.env
|
.env
|
||||||
|
|
||||||
app/client/cypress.env.json
|
|
||||||
stacks
|
stacks
|
||||||
|
|
||||||
# to ignore the node_modeules folder
|
# to ignore the node_modeules folder
|
||||||
|
|
|
||||||
2
app/client/.gitignore
vendored
2
app/client/.gitignore
vendored
|
|
@ -32,7 +32,7 @@ yarn-error.log*
|
||||||
.storybook-out/
|
.storybook-out/
|
||||||
cypress/videos
|
cypress/videos
|
||||||
cypress/screenshots
|
cypress/screenshots
|
||||||
/cypress.env.json
|
cypress.env.json
|
||||||
results/
|
results/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"MySQL": 1,
|
|
||||||
"Mongo": 1,
|
|
||||||
"Edition": 0
|
|
||||||
}
|
|
||||||
8
app/client/cypress/fixtures/REPO.ts
Normal file
8
app/client/cypress/fixtures/REPO.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
export const REPO = {
|
||||||
|
CE: "CE",
|
||||||
|
EE: "EE",
|
||||||
|
};
|
||||||
|
// CURRENT_REPO value is set as "CE" in appsmith repo and "EE" in appsmith-ee repo.
|
||||||
|
// appsmith-ee has a commit ahead of CE to persist the change.
|
||||||
|
// This file should not be modified to avoid the conflict when ce code merged to ee.
|
||||||
|
export const CURRENT_REPO = REPO.CE;
|
||||||
5
app/client/cypress/fixtures/variables.ts
Normal file
5
app/client/cypress/fixtures/variables.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
// Make the INTERCEPT value as true locally, if there is a need to intercept the DB.
|
||||||
|
export const INTERCEPT = {
|
||||||
|
MYSQL: false,
|
||||||
|
MONGO: false,
|
||||||
|
};
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { REPO, CURRENT_REPO } from "../../../../fixtures/REPO";
|
||||||
|
|
||||||
const Access = {
|
const Access = {
|
||||||
AdminSettingsEntryLink: ".admin-settings-menu-option",
|
AdminSettingsEntryLink: ".admin-settings-menu-option",
|
||||||
LeftPaneAuditLogsLink:
|
LeftPaneAuditLogsLink:
|
||||||
|
|
@ -27,7 +29,7 @@ const locators = { ...Access, ...UpgradePage };
|
||||||
|
|
||||||
describe("Audit logs", () => {
|
describe("Audit logs", () => {
|
||||||
it("1. Super user can access audit logs page", () => {
|
it("1. Super user can access audit logs page", () => {
|
||||||
if (Cypress.env("Edition") === 0) {
|
if (CURRENT_REPO === REPO.CE) {
|
||||||
cy.LogOut();
|
cy.LogOut();
|
||||||
cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||||
cy.visit("/applications");
|
cy.visit("/applications");
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
const commonlocators = require("../../../../locators/commonlocators.json");
|
const commonlocators = require("../../../../locators/commonlocators.json");
|
||||||
|
import { REPO, CURRENT_REPO } from "../../../../fixtures/REPO";
|
||||||
|
|
||||||
const locators = {
|
const locators = {
|
||||||
AdminSettingsEntryLink: ".admin-settings-menu-option",
|
AdminSettingsEntryLink: ".admin-settings-menu-option",
|
||||||
|
|
@ -90,7 +91,7 @@ describe("Branding", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("3. Check if localStorage is populated with tenantConfig values & form cannot be submitted", () => {
|
it("3. Check if localStorage is populated with tenantConfig values & form cannot be submitted", () => {
|
||||||
if (Cypress.env("Edition") === 0) {
|
if (CURRENT_REPO === REPO.CE) {
|
||||||
const tenantConfig = localStorage.getItem("tenantConfig");
|
const tenantConfig = localStorage.getItem("tenantConfig");
|
||||||
expect(tenantConfig).to.be.null;
|
expect(tenantConfig).to.be.null;
|
||||||
cy.get(locators.submitButton).should("be.disabled");
|
cy.get(locators.submitButton).should("be.disabled");
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import gitSyncLocators from "../../../../../locators/gitSyncLocators";
|
import gitSyncLocators from "../../../../../locators/gitSyncLocators";
|
||||||
import * as _ from "../../../../../support/Objects/ObjectsCore";
|
import * as _ from "../../../../../support/Objects/ObjectsCore";
|
||||||
|
import { REPO, CURRENT_REPO } from "../../../../../fixtures/REPO";
|
||||||
|
|
||||||
let repoName1, repoName2, repoName3, repoName4, windowOpenSpy;
|
let repoName1, repoName2, repoName3, repoName4, windowOpenSpy;
|
||||||
describe("Repo Limit Exceeded Error Modal", function() {
|
describe("Repo Limit Exceeded Error Modal", function() {
|
||||||
|
|
@ -46,7 +47,7 @@ describe("Repo Limit Exceeded Error Modal", function() {
|
||||||
// cy.createAppAndConnectGit(repoName3, false);
|
// cy.createAppAndConnectGit(repoName3, false);
|
||||||
// cy.createAppAndConnectGit(repoName4, false, true);
|
// cy.createAppAndConnectGit(repoName4, false, true);
|
||||||
|
|
||||||
if (Cypress.env("Edition") === 0) {
|
if (CURRENT_REPO === REPO.CE) {
|
||||||
cy.get(gitSyncLocators.repoLimitExceededErrorModal).should("exist");
|
cy.get(gitSyncLocators.repoLimitExceededErrorModal).should("exist");
|
||||||
|
|
||||||
// title and info text checking
|
// title and info text checking
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
const EnterpriseAdminSettingsLocators = require("../../../../locators/EnterpriseAdminSettingsLocators.json");
|
const EnterpriseAdminSettingsLocators = require("../../../../locators/EnterpriseAdminSettingsLocators.json");
|
||||||
import adminsSettings from "../../../../locators/AdminsSettings";
|
import adminsSettings from "../../../../locators/AdminsSettings";
|
||||||
|
import { REPO, CURRENT_REPO } from "../../../../fixtures/REPO";
|
||||||
|
|
||||||
describe("Admin settings page", function() {
|
describe("Admin settings page", function() {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
@ -23,7 +24,7 @@ describe("Admin settings page", function() {
|
||||||
cy.visit("/settings/general");
|
cy.visit("/settings/general");
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
cy.get(adminsSettings.authenticationTab).click();
|
||||||
cy.url().should("contain", "/settings/authentication");
|
cy.url().should("contain", "/settings/authentication");
|
||||||
if (Cypress.env("Edition") === 0) {
|
if (CURRENT_REPO === REPO.CE) {
|
||||||
cy.get(EnterpriseAdminSettingsLocators.upgradeOidcButton)
|
cy.get(EnterpriseAdminSettingsLocators.upgradeOidcButton)
|
||||||
.should("be.visible")
|
.should("be.visible")
|
||||||
.should("contain", "UPGRADE");
|
.should("contain", "UPGRADE");
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { INTERCEPT } from "../../../../fixtures/variables";
|
||||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||||
|
|
||||||
let dsName: any;
|
let dsName: any;
|
||||||
|
|
@ -16,7 +17,7 @@ describe("Validate Mongo CRUD with JSON Form", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
if (Cypress.env("Mongo") === 0) {
|
if (INTERCEPT.MONGO) {
|
||||||
cy.log("Mongo DB is not found. Using intercept");
|
cy.log("Mongo DB is not found. Using intercept");
|
||||||
dataSources.StartInterceptRoutesForMongo();
|
dataSources.StartInterceptRoutesForMongo();
|
||||||
} else cy.log("Mongo DB is found, hence using actual DB");
|
} else cy.log("Mongo DB is found, hence using actual DB");
|
||||||
|
|
@ -101,10 +102,10 @@ describe("Validate Mongo CRUD with JSON Form", () => {
|
||||||
table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => {
|
table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => {
|
||||||
expect($cellData).to.eq(col1Text);
|
expect($cellData).to.eq(col1Text);
|
||||||
});
|
});
|
||||||
table.ReadTableRowColumnData(0, 3,"v1", 200).then(($cellData) => {
|
table.ReadTableRowColumnData(0, 3, "v1", 200).then(($cellData) => {
|
||||||
expect($cellData).to.eq(col2Text);
|
expect($cellData).to.eq(col2Text);
|
||||||
});
|
});
|
||||||
table.ReadTableRowColumnData(0, 6,"v1", 200).then(($cellData) => {
|
table.ReadTableRowColumnData(0, 6, "v1", 200).then(($cellData) => {
|
||||||
expect($cellData).to.eq(col3Text);
|
expect($cellData).to.eq(col3Text);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||||
|
// import { INTERCEPT } from "../../../../fixtures/variables";
|
||||||
let dsName: any;
|
let dsName: any;
|
||||||
|
|
||||||
let agHelper = ObjectsRegistry.AggregateHelper,
|
let agHelper = ObjectsRegistry.AggregateHelper,
|
||||||
|
|
@ -13,7 +13,7 @@ let agHelper = ObjectsRegistry.AggregateHelper,
|
||||||
|
|
||||||
describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
||||||
// beforeEach(function() {
|
// beforeEach(function() {
|
||||||
// if (Cypress.env("MySQL") === 0) {
|
// if (INTERCEPT.MYSQL) {
|
||||||
// cy.log("MySQL DB is not found. Using intercept");
|
// cy.log("MySQL DB is not found. Using intercept");
|
||||||
// //dataSources.StartInterceptRoutesForMySQL();
|
// //dataSources.StartInterceptRoutesForMySQL();
|
||||||
// } else cy.log("MySQL DB is found, hence using actual DB");
|
// } else cy.log("MySQL DB is found, hence using actual DB");
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||||
|
// import { INTERCEPT } from "../../../../fixtures/variables";
|
||||||
let dsName: any, newStoreSecret: any;
|
let dsName: any, newStoreSecret: any;
|
||||||
|
|
||||||
let agHelper = ObjectsRegistry.AggregateHelper,
|
let agHelper = ObjectsRegistry.AggregateHelper,
|
||||||
|
|
@ -12,7 +12,7 @@ let agHelper = ObjectsRegistry.AggregateHelper,
|
||||||
|
|
||||||
describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
||||||
// beforeEach(function() {
|
// beforeEach(function() {
|
||||||
// if (Cypress.env("MySQL") === 0) {
|
// if (INTERCEPT.MYSQL) {
|
||||||
// cy.log("MySQL DB is not found. Using intercept");
|
// cy.log("MySQL DB is not found. Using intercept");
|
||||||
// //dataSources.StartInterceptRoutesForMySQL();
|
// //dataSources.StartInterceptRoutesForMySQL();
|
||||||
// } else cy.log("MySQL DB is found, hence using actual DB");
|
// } else cy.log("MySQL DB is found, hence using actual DB");
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { INTERCEPT } from "../../../../fixtures/variables";
|
||||||
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
|
||||||
|
|
||||||
let dsName: any;
|
let dsName: any;
|
||||||
|
|
@ -17,7 +18,7 @@ describe("Validate Mongo Query Pane Validations", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
if (Cypress.env("Mongo") === 0) {
|
if (INTERCEPT.MONGO) {
|
||||||
cy.log("Mongo DB is not found. Using intercept");
|
cy.log("Mongo DB is not found. Using intercept");
|
||||||
dataSources.StartInterceptRoutesForMongo();
|
dataSources.StartInterceptRoutesForMongo();
|
||||||
} else cy.log("Mongo DB is found, hence using actual DB");
|
} else cy.log("Mongo DB is found, hence using actual DB");
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
const testdata = require("../../../fixtures/testdata.json");
|
const testdata = require("../../../fixtures/testdata.json");
|
||||||
import { ObjectsRegistry } from "../../../support/Objects/Registry";
|
import { ObjectsRegistry } from "../../../support/Objects/Registry";
|
||||||
|
import { CURRENT_REPO, REPO } from "../../../fixtures/REPO";
|
||||||
|
|
||||||
let agHelper = ObjectsRegistry.AggregateHelper;
|
let agHelper = ObjectsRegistry.AggregateHelper;
|
||||||
const tedUrl = "http://localhost:5001/v1/parent/cmd";
|
const tedUrl = "http://localhost:5001/v1/parent/cmd";
|
||||||
|
|
@ -33,7 +34,7 @@ describe("Upgrade appsmith version", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
//verify the Applications after upgrade only on CE and skip for BE
|
//verify the Applications after upgrade only on CE and skip for BE
|
||||||
if (Cypress.env("Edition") === 0) {
|
if (CURRENT_REPO === REPO.CE) {
|
||||||
cy.forceVisit(testdata.APPURL);
|
cy.forceVisit(testdata.APPURL);
|
||||||
agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true);
|
agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true);
|
||||||
agHelper.Sleep(1000);
|
agHelper.Sleep(1000);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { ObjectsRegistry } from "../Objects/Registry";
|
import { ObjectsRegistry } from "../Objects/Registry";
|
||||||
|
import { REPO, CURRENT_REPO } from "../../fixtures/REPO";
|
||||||
export class HomePage {
|
export class HomePage {
|
||||||
private agHelper = ObjectsRegistry.AggregateHelper;
|
private agHelper = ObjectsRegistry.AggregateHelper;
|
||||||
private locator = ObjectsRegistry.CommonLocators;
|
private locator = ObjectsRegistry.CommonLocators;
|
||||||
|
|
@ -25,7 +26,7 @@ export class HomePage {
|
||||||
workspaceName +
|
workspaceName +
|
||||||
") button:contains('Share')";
|
") button:contains('Share')";
|
||||||
private _email =
|
private _email =
|
||||||
Cypress.env("Edition") === 0
|
CURRENT_REPO === REPO.CE
|
||||||
? "//input[@type='email' and contains(@class,'bp3-input-ghost')]"
|
? "//input[@type='email' and contains(@class,'bp3-input-ghost')]"
|
||||||
: "//input[@type='text' and contains(@class,'bp3-input-ghost')]";
|
: "//input[@type='text' and contains(@class,'bp3-input-ghost')]";
|
||||||
_visibleTextSpan = (spanText: string) => "//span[text()='" + spanText + "']";
|
_visibleTextSpan = (spanText: string) => "//span[text()='" + spanText + "']";
|
||||||
|
|
@ -125,7 +126,7 @@ export class HomePage {
|
||||||
.click({ force: true });
|
.click({ force: true });
|
||||||
cy.get(this._renameWorkspaceInput)
|
cy.get(this._renameWorkspaceInput)
|
||||||
.should("be.visible")
|
.should("be.visible")
|
||||||
.type(newWorkspaceName.concat("{enter}"), {delay : 0});
|
.type(newWorkspaceName.concat("{enter}"), { delay: 0 });
|
||||||
this.agHelper.Sleep(2000);
|
this.agHelper.Sleep(2000);
|
||||||
this, this.agHelper.ValidateNetworkStatus("@updateWorkspace");
|
this, this.agHelper.ValidateNetworkStatus("@updateWorkspace");
|
||||||
this.agHelper.AssertContains(newWorkspaceName);
|
this.agHelper.AssertContains(newWorkspaceName);
|
||||||
|
|
@ -173,7 +174,7 @@ export class HomePage {
|
||||||
text: string,
|
text: string,
|
||||||
) {
|
) {
|
||||||
const errorMessage =
|
const errorMessage =
|
||||||
Cypress.env("Edition") === 0
|
CURRENT_REPO === REPO.CE
|
||||||
? "Invalid email address(es) found"
|
? "Invalid email address(es) found"
|
||||||
: "Invalid email address(es) or group(s) found";
|
: "Invalid email address(es) or group(s) found";
|
||||||
this.StubPostHeaderReq();
|
this.StubPostHeaderReq();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user