Skip to content

Commit

Permalink
Cypress. Case 44. Adding additional checks. (#3312)
Browse files Browse the repository at this point in the history
* Added classes

* Test adaptation

* Revert adding classes

* Rework the test

* Remove unnecessary comments
  • Loading branch information
dvkruchinin authored Jun 15, 2021
1 parent 9afb9d0 commit 7699bd3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ context('Changing a default value for an attribute.', () => {
cy.addNewLabel(additionalLabel, additionalAttrsLabel);
cy.wait('@patchTask').its('response.statusCode').should('equal', 200);
cy.wait('@getTask').its('response.statusCode').should('equal', 200);
cy.get('.cvat-constructor-viewer').should('exist').and('be.visible');
});

it('Open label editor. Change default values for text & checkbox attributes, press Done.', () => {
cy.intercept('PATCH', '/api/v1/tasks/**').as('patchTask');
cy.get('.cvat-constructor-viewer').within(() => {
cy.contains(new RegExp(`^${additionalLabel}$`))
.parents('.cvat-constructor-viewer-item')
.should('be.visible')
.find('[aria-label="edit"]')
.should('be.visible')
.then((e) => {
cy.get(e).click();
});
.click();
});

cy.get('.cvat-label-constructor-updater').within(() => {
Expand All @@ -74,6 +74,7 @@ context('Changing a default value for an attribute.', () => {
)}.values'`,
).should('not.exist');
cy.wait('@patchTask').its('response.statusCode').should('equal', 200);
cy.get('.cvat-constructor-viewer').should('exist').and('be.visible');
});

it('Open a job, create an object. Attribute values are correct.', () => {
Expand Down

0 comments on commit 7699bd3

Please sign in to comment.