Skip to content

Commit

Permalink
Minor: Fix glossary version cypress for AUT (#15114)
Browse files Browse the repository at this point in the history
* fix glossary version cypress for AUT

* remove the unnecessary deletion in cypress test
  • Loading branch information
aniketkatkar97 authored Feb 9, 2024
1 parent 1ede4d8 commit b996f2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,27 +170,6 @@ describe('Observability Alert Flow', () => {
cy.getAllLocalStorage().then((storageData) => {
const token = Object.values(storageData)[0].oidcIdToken;

// Delete test case
cy.request({
method: 'DELETE',
url: `/api/v1/dataQuality/testCases/logicalTestCases/${data.testSuite.id}/${data.testCase.id}`,
headers: { Authorization: `Bearer ${token}` },
});

// Delete test suite
cy.request({
method: 'DELETE',
url: `/api/v1/dataQuality/testSuites/executable/${data.testSuite.id}`,
headers: { Authorization: `Bearer ${token}` },
});

// Delete ingestion pipeline
cy.request({
method: 'DELETE',
url: `/api/v1/services/ingestionPipelines/${data.ingestionPipeline.id}?hardDelete=true`,
headers: { Authorization: `Bearer ${token}` },
});

// Delete created services
hardDeleteService({
token,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,17 @@ describe('Glossary and glossary term version pages should work properly', () =>
`/api/v1/glossaryTerms/*/versions/0.2`,
'getSelectedVersionDetails'
);
interceptURL(
'GET',
`/api/v1/glossaryTerms/${data.glossaryTerm2.id}`,
'getGlossaryTermDetails'
);

cy.get('[data-testid="version-button"]').contains('0.2').click();

verifyResponseStatusCode('@getVersionsList', 200);
verifyResponseStatusCode('@getSelectedVersionDetails', 200);
verifyResponseStatusCode('@getGlossaryTermDetails', 200);

cy.get(
'[data-testid="glossary-right-panel-owner-link"] [data-testid="diff-added"]'
Expand All @@ -330,6 +336,7 @@ describe('Glossary and glossary term version pages should work properly', () =>

verifyResponseStatusCode('@getVersionsList', 200);
verifyResponseStatusCode('@getSelectedVersionDetails', 200);
verifyResponseStatusCode('@getGlossaryTermDetails', 200);

cy.get('[data-testid="glossary-reviewer"] [data-testid="diff-added"]')
.scrollIntoView()
Expand Down

0 comments on commit b996f2f

Please sign in to comment.