Fixed failing cypress for glossary (#9380)

* Fixed failing cypress for glossary spec

* Removed formatting of spec files for easy review

* reverted file formatting for glossary spec

* reverted formatting for glossary spec
This commit is contained in:
Aniket Katkar 2022-12-18 10:31:22 +05:30 committed by GitHub
parent c06dbfd22e
commit 2abe40f08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -744,7 +744,7 @@ export const editCreatedProperty = (propertyName) => {
verifyResponseStatusCode('@checkPatchForDescription', 200); verifyResponseStatusCode('@checkPatchForDescription', 200);
cy.get('.tw-modal-container').should('not.exist'); cy.get('.ant-modal-wrap').should('not.exist');
//Fetching for updated descriptions for the created custom property //Fetching for updated descriptions for the created custom property
cy.get(`[data-row-key="${propertyName}"]`).find('[data-testid="viewer-container"]').should('contain', 'This is new description'); cy.get(`[data-row-key="${propertyName}"]`).find('[data-testid="viewer-container"]').should('contain', 'This is new description');

View File

@ -245,7 +245,7 @@ describe('Glossary page should work properly', () => {
// updating description // updating description
cy.get('[data-testid="edit-description"]').should('be.visible').click(); cy.get('[data-testid="edit-description"]').should('be.visible').click();
cy.get('.tw-modal-container').should('be.visible'); cy.get('.ant-modal-wrap').should('be.visible');
cy.get(descriptionBox).should('be.visible').as('description'); cy.get(descriptionBox).should('be.visible').as('description');
cy.get('@description').clear(); cy.get('@description').clear();
@ -254,7 +254,7 @@ describe('Glossary page should work properly', () => {
interceptURL('PATCH', '/api/v1/glossaries/*', 'saveGlossary'); interceptURL('PATCH', '/api/v1/glossaries/*', 'saveGlossary');
cy.get('[data-testid="save"]').click(); cy.get('[data-testid="save"]').click();
cy.get('.tw-modal-container').should('not.exist'); cy.get('.ant-modal-wrap').should('not.exist');
verifyResponseStatusCode('@saveGlossary', 200); verifyResponseStatusCode('@saveGlossary', 200);
@ -298,7 +298,7 @@ describe('Glossary page should work properly', () => {
// updating description // updating description
cy.get('[data-testid="edit-description"]').should('be.visible').click(); cy.get('[data-testid="edit-description"]').should('be.visible').click();
cy.get('.tw-modal-container').should('be.visible'); cy.get('.ant-modal-wrap').should('be.visible');
cy.get('.toastui-editor-md-container > .toastui-editor > .ProseMirror') cy.get('.toastui-editor-md-container > .toastui-editor > .ProseMirror')
.should('be.visible') .should('be.visible')
.as('description'); .as('description');
@ -306,7 +306,7 @@ describe('Glossary page should work properly', () => {
cy.get('@description').type(newDescription); cy.get('@description').type(newDescription);
cy.get('[data-testid="save"]').click(); cy.get('[data-testid="save"]').click();
verifyResponseStatusCode('@saveData', 200); verifyResponseStatusCode('@saveData', 200);
cy.get('.tw-modal-container').should('not.exist'); cy.get('.ant-modal-wrap').should('not.exist');
cy.get('[data-testid="viewer-container"]') cy.get('[data-testid="viewer-container"]')
.contains(newDescription) .contains(newDescription)