Cypress. Fix tests. (#3783)

* Additional fix case 28

* Fix case 69

* Additional fix case 31.

* case 69
main
Dmitry Kruchinin 4 years ago committed by GitHub
parent e484aa7587
commit 68d412b134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,10 +59,9 @@ context('Filters, sorting jobs.', () => {
}
function testSetJobFilter({ column, menuItem, reset }) {
cy.get(column).find('[role="button"]').click().wait(300); // Waiting for dropdown menu transition
cy.get(column).find('[role="button"]').trigger('mouseover').click().wait(300); // Waiting for dropdown menu transition
cy.get('.ant-dropdown')
.not('.ant-dropdown-hidden')
.should('not.have.attr', 'style', 'poiner-events')
.within(() => {
if (!reset) {
cy.contains('[role="menuitem"]', menuItem)
@ -70,11 +69,12 @@ context('Filters, sorting jobs.', () => {
.should('not.be.checked')
.check()
.should('be.checked');
cy.contains('[type="button"]', 'OK').click();
cy.contains('[type="button"]', 'OK').should('be.visible').click();
} else {
cy.contains('[type="button"]', 'Reset').click();
cy.contains('[type="button"]', 'Reset').should('be.visible').click();
}
});
cy.get('.ant-dropdown').last().should('be.hidden');
}
before(() => {

@ -151,6 +151,7 @@ context('Label constructor. Color label. Label name editing', () => {
cy.contains('hex').prev().clear().type(labelColor.yellowHex);
cy.contains('button', 'Cancel').click();
});
cy.get('.cvat-label-color-picker').should('be.hidden');
cy.get('.cvat-change-task-label-color-badge')
.children()
.invoke('attr', 'style')
@ -170,6 +171,7 @@ context('Label constructor. Color label. Label name editing', () => {
.within(() => {
cy.contains('button', 'Reset').click();
});
cy.get('.cvat-label-color-picker').should('be.hidden');
cy.get('.cvat-change-task-label-color-badge')
.children()
.should('have.attr', 'style')

@ -341,8 +341,9 @@ context('Review pipeline feature', () => {
it('Go to "Issues" tab at right sidebar and select an issue.', () => {
cy.get('.cvat-objects-sidebar').within(() => {
cy.contains('Issues').click();
cy.contains('[role="tab"]', 'Issues').click().should('have.attr', 'aria-selected', 'true');
});
cy.get('.cvat-objects-sidebar-issues-list-header').should('be.visible');
cy.get('.cvat-objects-sidebar-issue-item').then((sidebarIssueItems) => {
cy.get('.cvat-hidden-issue-label').then((issueLabels) => {
expect(sidebarIssueItems.length).to.be.equal(issueLabels.length);
@ -365,10 +366,10 @@ context('Review pipeline feature', () => {
it('Issue navigation. Navigation works and go only to frames with issues.', () => {
cy.get('.cvat-issues-sidebar-previous-frame').should('have.attr', 'style').and('contain', 'opacity: 0.5;'); // The element is not active
cy.get('.cvat-issues-sidebar-next-frame').trigger('mouseout').click();
cy.get('.cvat-issues-sidebar-next-frame').should('be.visible').click();
cy.checkFrameNum(2); // Frame changed to 2
cy.get('.cvat-issues-sidebar-next-frame').should('have.attr', 'style').and('contain', 'opacity: 0.5;'); // The element is not active
cy.get('.cvat-issues-sidebar-previous-frame').trigger('mouseout').click();
cy.get('.cvat-issues-sidebar-previous-frame').should('be.visible').click();
cy.checkFrameNum(0); // Frame changed to 0
});

@ -587,6 +587,7 @@ Cypress.Commands.add('changeColorViaBadge', (labelColor) => {
cy.contains('hex').prev().clear().type(labelColor);
cy.contains('button', 'Ok').click();
});
cy.get('.cvat-label-color-picker').should('be.hidden');
});
Cypress.Commands.add('collectLabelsName', () => {

Loading…
Cancel
Save