mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-30 01:59:23 +00:00
cypress: fixed flaky cypress for service specs (#11850)
* cypress: fixed flaky cypress for service specs * updated teams cypress
This commit is contained in:
parent
2bff63fa18
commit
8b0df23b95
@ -129,12 +129,13 @@ export const handleIngestionRetry = (
|
|||||||
|
|
||||||
if (retryCount !== 0) {
|
if (retryCount !== 0) {
|
||||||
cy.wait('@allPermissions').then(() => {
|
cy.wait('@allPermissions').then(() => {
|
||||||
verifyResponseStatusCode('@serviceDetails', 200);
|
cy.wait('@serviceDetails').then(() => {
|
||||||
verifyResponseStatusCode('@ingestionPipelines', 200);
|
verifyResponseStatusCode('@ingestionPipelines', 200);
|
||||||
verifyResponseStatusCode('@pipelineStatuses', 200, {
|
verifyResponseStatusCode('@pipelineStatuses', 200, {
|
||||||
responseTimeout: 50000,
|
responseTimeout: 50000,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
retryCount++;
|
retryCount++;
|
||||||
@ -473,7 +474,11 @@ export const editOwnerforCreatedService = (
|
|||||||
'/api/v1/system/config/pipeline-service-client',
|
'/api/v1/system/config/pipeline-service-client',
|
||||||
'airflow'
|
'airflow'
|
||||||
);
|
);
|
||||||
interceptURL('GET', '/api/v1/databases?service=*&fields=*', 'database');
|
interceptURL(
|
||||||
|
'GET',
|
||||||
|
`/api/v1/*?service=${service_Name}&fields=*`,
|
||||||
|
'assetsDetail'
|
||||||
|
);
|
||||||
// click on created service
|
// click on created service
|
||||||
cy.get(`[data-testid="service-name-${service_Name}"]`)
|
cy.get(`[data-testid="service-name-${service_Name}"]`)
|
||||||
.should('exist')
|
.should('exist')
|
||||||
@ -483,9 +488,9 @@ export const editOwnerforCreatedService = (
|
|||||||
verifyResponseStatusCode('@getSelectedService', 200);
|
verifyResponseStatusCode('@getSelectedService', 200);
|
||||||
verifyResponseStatusCode('@waitForIngestion', 200);
|
verifyResponseStatusCode('@waitForIngestion', 200);
|
||||||
verifyResponseStatusCode('@airflow', 200);
|
verifyResponseStatusCode('@airflow', 200);
|
||||||
if (isDatabaseService(service_type)) {
|
|
||||||
verifyResponseStatusCode('@database', 200);
|
verifyResponseStatusCode('@assetsDetail', 200);
|
||||||
}
|
|
||||||
interceptURL('GET', '/api/v1/users?&isBot=false&limit=15', 'waitForUsers');
|
interceptURL('GET', '/api/v1/users?&isBot=false&limit=15', 'waitForUsers');
|
||||||
|
|
||||||
// Click on edit owner button
|
// Click on edit owner button
|
||||||
|
|||||||
@ -11,6 +11,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="Cypress" />
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addTeam,
|
addTeam,
|
||||||
descriptionBox,
|
descriptionBox,
|
||||||
@ -94,7 +97,8 @@ describe('Teams flow should work properly', () => {
|
|||||||
verifyResponseStatusCode('@getUserDetails', 200);
|
verifyResponseStatusCode('@getUserDetails', 200);
|
||||||
verifyResponseStatusCode('@getTeam', 200);
|
verifyResponseStatusCode('@getTeam', 200);
|
||||||
|
|
||||||
cy.get('[data-testid="edit-email"]').should('be.visible').click();
|
cy.get('[data-testid="edit-email"]').should('be.visible').scrollIntoView();
|
||||||
|
cy.get('[data-testid="edit-email"]').click();
|
||||||
cy.get('[data-testid="email-input"]')
|
cy.get('[data-testid="email-input"]')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.clear()
|
.clear()
|
||||||
@ -121,11 +125,18 @@ describe('Teams flow should work properly', () => {
|
|||||||
.click();
|
.click();
|
||||||
verifyResponseStatusCode('@getUserDetails', 200);
|
verifyResponseStatusCode('@getUserDetails', 200);
|
||||||
verifyResponseStatusCode('@permissions', 200);
|
verifyResponseStatusCode('@permissions', 200);
|
||||||
cy.get('[data-testid="add-new-user"]').should('be.visible').click();
|
cy.get('[data-testid="add-new-user"]')
|
||||||
|
.should('be.visible')
|
||||||
|
.scrollIntoView();
|
||||||
|
cy.get('[data-testid="add-new-user"]').click();
|
||||||
verifyResponseStatusCode('@getUsers', 200);
|
verifyResponseStatusCode('@getUsers', 200);
|
||||||
cy.get('[data-testid="selectable-list"]')
|
cy.get('[data-testid="selectable-list"]')
|
||||||
.find(`[title="${TEAM_DETAILS.username}"]`)
|
.find(`[title="${TEAM_DETAILS.username}"]`)
|
||||||
.click();
|
.click();
|
||||||
|
cy.get('[data-testid="selectable-list"]')
|
||||||
|
.find(`[title="${TEAM_DETAILS.username}"] input[type='checkbox']`)
|
||||||
|
.should('be.checked');
|
||||||
|
|
||||||
cy.get('[data-testid="selectable-list-update-btn"]')
|
cy.get('[data-testid="selectable-list-update-btn"]')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click();
|
.click();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user