Skip to content

Commit

Permalink
cypress: fixed cypress AUT for mysql (#16446)
Browse files Browse the repository at this point in the history
* cypress: fixed cypress AUT for mysql

* minor fix
  • Loading branch information
ShaileshParmar11 committed May 29, 2024
1 parent 6688c08 commit 0293702
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const setValueForProperty = (
.scrollIntoView()
.as('editbutton');

cy.get('@editbutton').should('be.visible').click();
cy.get('@editbutton').should('be.visible').click({ force: true });

interceptURL('PATCH', `/api/v1/*/*`, 'patchEntity');
// Checking for value text box or markdown box
Expand Down Expand Up @@ -257,7 +257,13 @@ export const setValueForProperty = (
const refValues = value.split(',');

refValues.forEach((val) => {
interceptURL(
'GET',
`/api/v1/search/query?q=*${encodeURIComponent(val)}*`,
'searchEntityReference'
);
cy.get('#entityReference').clear().type(`${val}`);
cy.wait('@searchEntityReference');
cy.get(`[data-testid="${val}"]`).click();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ export const visitServiceDetailsPage = (service, verifyHeader = true) => {
expect(text).to.equal(service.displayName);
});
}

verifyResponseStatusCode('@getServices', 200);
};

export const createDataWithApi = (data, token) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ describe('Custom Properties should work properly', { tags: 'Settings' }, () => {
cy.login();
});

afterEach(() => {
cy.logout();
});

[
'Integer',
'String',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ describe('Database hierarchy details page', { tags: 'DataAssets' }, () => {
cy.login();

entity.cleanup();
cy.logout();
});

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ describe('Entity detail page', { tags: 'DataAssets' }, () => {
cy.login();

entity.cleanup();
cy.logout();
});

beforeEach(() => {
Expand Down

0 comments on commit 0293702

Please sign in to comment.