test: add common methods for ME (#25763)
This commit is contained in:
parent
00ef2b9e09
commit
cef487583d
|
|
@ -77,6 +77,7 @@ export class TEDTestConfigs {
|
|||
mockHttpCodeUrl: "http://host.docker.internal:5001/v1/mock-http-codes/",
|
||||
AirtableBaseForME: "appubHrVbovcudwN6",
|
||||
AirtableTableForME: "tblsFCQSskVFf7xNd",
|
||||
ApiUrlME: "http://host.docker.internal:5001/v1/production",
|
||||
|
||||
firestore_database_url: "https://appsmith-22e8b.firebaseio.com",
|
||||
firestore_projectID: "appsmith-22e8b",
|
||||
|
|
@ -98,7 +99,7 @@ export class TEDTestConfigs {
|
|||
mongo_authenticationAuthtype: "SCRAM-SHA-1",
|
||||
mongo_host: "host.docker.internal",
|
||||
mongo_port: 28017,
|
||||
mongo_databaseName: "mongo_samples",
|
||||
mongo_databaseName: "mongo_samples2",
|
||||
|
||||
postgres_host: "host.docker.internal",
|
||||
postgres_port: 5432,
|
||||
|
|
@ -165,6 +166,7 @@ export class TEDTestConfigs {
|
|||
mockHttpCodeUrl: "http://host.docker.internal:5001/v1/mock-http-codes/",
|
||||
AirtableBaseForME: "appubHrVbovcudwN6",
|
||||
AirtableTableForME: "tblsFCQSskVFf7xNd",
|
||||
ApiUrlME: "http://host.docker.internal:5001/v1/staging",
|
||||
|
||||
firestore_database_url: "https://appsmith-22e8b.firebaseio.com",
|
||||
firestore_projectID: "appsmith-22e8b",
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ export class ApiPage {
|
|||
public _autoGeneratedHeaderInfoIcon = (key: string) =>
|
||||
`.t--auto-generated-${key}-info`;
|
||||
private _createQuery = ".t--create-query";
|
||||
public _editorDS = ".t--datasource-editor";
|
||||
|
||||
CreateApi(
|
||||
apiName = "",
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ export class DataSources {
|
|||
ddTitle +
|
||||
"']/following-sibling::span//button";
|
||||
_reconnectModal = "[data-testid='reconnect-datasource-modal']";
|
||||
_reconnect = ".t--reconnect-btn";
|
||||
_dropdown = (ddTitle: string) =>
|
||||
"//span[contains(@title, '" +
|
||||
ddTitle +
|
||||
|
|
@ -193,7 +194,7 @@ export class DataSources {
|
|||
dbName +
|
||||
"']/ancestor::div[contains(@class, 't--entity-item')]/following-sibling::div//p[text()='Schema not available']";
|
||||
// Authenticated API locators
|
||||
private _authApiDatasource = ".t--createAuthApiDatasource";
|
||||
public _authApiDatasource = ".t--createAuthApiDatasource";
|
||||
private _authType = "[data-testid=authType]";
|
||||
private _oauth2 = ".rc-select-item-option:contains('OAuth 2.0')";
|
||||
private _accessTokenUrl =
|
||||
|
|
@ -987,6 +988,18 @@ export class DataSources {
|
|||
this.assertHelper.AssertNetworkStatus("getWorkspace");
|
||||
}
|
||||
|
||||
public AssertReconnectDS(datasourceName: string) {
|
||||
cy.get(this._datasourceCard, { withinSubject: null })
|
||||
.find(this._activeDS)
|
||||
.contains(datasourceName)
|
||||
.scrollIntoView()
|
||||
.should("be.visible")
|
||||
.closest(this._datasourceCard)
|
||||
.scrollIntoView()
|
||||
.within(() => {
|
||||
this.agHelper.AssertElementVisible(this._reconnect, 0, 20000);
|
||||
});
|
||||
}
|
||||
public ReconnectModalValidation(
|
||||
dbName: string,
|
||||
dsName: "PostgreSQL" | "MySQL" | "MongoDB",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user