Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cypress: fixed AUT failure part 1 #13686

Merged
merged 9 commits into from
Oct 25, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const deleteKpiRequest = () => {
};

const checkSuccessStatus = (count = 1, timer = BASE_WAIT_TIME) => {
cy.get('[data-testid="ingestion-details-container"]')
cy.get('[data-testid="app-run-history-table"]')
.find('[data-testid="pipeline-status"]')
.as('checkRun');
// the latest run should be success
Expand Down Expand Up @@ -139,12 +139,12 @@ describe('Data Insight feature', () => {
interceptURL('GET', '/api/v1/apps?limit=*', 'apps');
interceptURL(
'GET',
'/api/v1/apps/name/DataInsightsApplication/runs?offset=*&limit=*',
'/api/v1/apps/name/DataInsightsApplication?fields=owner,pipelines',
'dataInsightsApplication'
);
interceptURL(
'POST',
'/api/v1/services/ingestionPipelines/deploy/*',
'/api/v1/apps/deploy/DataInsightsApplication',
'deploy'
);
interceptURL(
Expand All @@ -160,10 +160,10 @@ describe('Data Insight feature', () => {
).click();
verifyResponseStatusCode('@dataInsightsApplication', 200);
cy.get('[data-testid="deploy-button"]').click();
verifyResponseStatusCode('@triggerPipeline', 200);
verifyResponseStatusCode('@deploy', 200);
cy.reload();
verifyResponseStatusCode('@dataInsightsApplication', 200);
cy.get('[data-testid="run"]').click();
cy.get('[data-testid="run-now-button"]').click();
verifyResponseStatusCode('@triggerPipeline', 200);
checkSuccessStatus();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { BASE_URL } from '../../constants/constants';

const PIPELINE_NAME = 'cypress_dataInsight_pipeline';

describe('Data Insight settings page should work properly', () => {
// NOTE: need to re-write the test based on new UI
describe.skip('Data Insight settings page should work properly', () => {
beforeEach(() => {
cy.login();
interceptURL('GET', '/api/v1/teams/name/*', 'settingsPage');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ const updateTags = (inTerm) => {
// visit glossary page
interceptURL(
'GET',
'/api/v1/search/query?q=disabled:false&index=tag_search_index&from=0&size=10&query_filter=%7B%7D',
'/api/v1/search/query?q=*&index=tag_search_index&from=0&size=*&query_filter=*',
'tags'
);
cy.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,6 @@ describe('Policy page should work properly', () => {
.should('contain', policy)
.should('be.visible');
});
// Validate role is displayed
cy.get('[data-testid="role-link"]')
.contains(roles.dataConsumer)
.should('exist');

cy.get('[data-testid="role-link"]')
.contains(roles.dataSteward)
.should('exist');
});

it('Add new policy', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ describe('Services page should work properly', () => {
'[data-testid="description-container"] [data-testid="viewer-container"] [data-testid="markdown-parser"] :nth-child(1) .toastui-editor-contents p'
).contains(service.newDescription);
cy.get(':nth-child(1) > .link-title').click();
searchService();
cy.get('.toastui-editor-contents > p').contains(service.newDescription);
});

Expand Down Expand Up @@ -129,7 +130,7 @@ describe('Services page should work properly', () => {
// Checking if description exists after assigning the owner
cy.get(':nth-child(1) > .link-title').click();
// need wait here

searchService();
cy.get('[data-testid="viewer-container"]').contains(service.newDescription);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ describe('Tags page should work', () => {
)
.click()
.type(assignee);
cy.get('.ant-select-item-option-content').contains(assignee).click();
cy.get(`[data-testid="assignee-option-${assignee}"]`)
.scrollIntoView()
.click();

// click outside the select box
cy.clickOutside();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ describe('Teams flow should work properly', () => {
.should('be.visible')
.should('contain', TEAM_DETAILS.updatedName);

cy.get('[role="tablist"] [data-icon="right"]').click();

// Click on edit description button
cy.get('[data-testid="edit-description"]')
.should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const AppRunsHistory = forwardRef(

return (
<StatusBadge
dataTestId={record.appId + '-status'}
dataTestId="pipeline-status"
label={capitalize(record.status)}
status={status}
/>
Expand Down
Loading