Cypress: fixed s3 service and permission cypress (#15645)

* Cypress: fixed s3 service and permission cypress

* fixed api issue in postgresIngestion

* fixed big query cypress

* fixed big query failure in cypress

* miner fix for bigquery cypress test
This commit is contained in:
Shailesh Parmar 2024-03-22 14:56:42 +05:30 committed by GitHub
parent e52156aa94
commit 83a40f11af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 11 deletions

View File

@ -35,10 +35,9 @@ class BigQueryIngestionClass extends ServiceBaseClass {
fillConnectionDetails() {
const clientEmail = Cypress.env('bigqueryClientEmail');
cy.get('.form-group > #root\\/credentials\\/gcpConfig\\/type')
cy.get('#root\\/credentials\\/gcpConfig__oneof_select')
.scrollIntoView()
.type('service_account');
checkServiceFieldSectionHighlighting('type');
.select('GCP Credentials Values');
cy.get('#root\\/credentials\\/gcpConfig\\/projectId')
.scrollIntoView()
.type(Cypress.env('bigqueryProjectId'));

View File

@ -152,7 +152,11 @@ class PostgresIngestionClass extends ServiceBaseClass {
entity: EntityType.Table,
});
verifyResponseStatusCode('@entityDetailsPage', 200);
interceptURL('GET', '/api/v1/queries?*', 'queriesTab');
interceptURL(
'GET',
'/api/v1/search/query?q=*&index=query_search_index*',
'queriesTab'
);
cy.get('[data-testid="table_queries"]')
.should('be.visible')
.trigger('click');

View File

@ -17,7 +17,7 @@ import { Services } from '../Utils/Services';
class S3IngestionClass extends ServiceBaseClass {
name: string;
constructor() {
super(Services.Storage, 'cypress-s3-storage', 'S3', 'cypress-bucket');
super(Services.Storage, 'cypress-s3-storage', 'S3', 'om-cypress-bucket');
}
createService() {
@ -37,12 +37,14 @@ class S3IngestionClass extends ServiceBaseClass {
Cypress.env('s3StorageSecretAccessKey')
);
checkServiceFieldSectionHighlighting('awsSecretAccessKey');
cy.get('#root\\/awsConfig\\/awsRegion').type('us');
cy.get('#root\\/awsConfig\\/awsRegion').type('us-east-2');
checkServiceFieldSectionHighlighting('awsRegion');
cy.get('#root\\/awsConfig\\/endPointURL').type(
Cypress.env('s3StorageEndPointUrl')
);
checkServiceFieldSectionHighlighting('endPointURL');
}
fillIngestionDetails() {
cy.get('#root\\/containerFilterPattern\\/includes')
.scrollIntoView()
.type(`${this.entityName}{enter}`);
}
}

View File

@ -358,7 +358,11 @@ describe('Permissions', { tags: 'Settings' }, () => {
serviceName: DATABASE_SERVICE.service.name,
entity: EntityType.Table,
});
interceptURL('GET', '/api/v1/queries?*', 'getQueries');
interceptURL(
'GET',
'/api/v1/search/query?q=*&index=query_search_index*',
'getQueries'
);
cy.get('[data-testid="table_queries"]').click();
verifyResponseStatusCode('@getQueries', 200);
cy.get('[data-testid="query-btn"]').click();