Cypress test. Settings. Auto save. (#2764)

main
Dmitry Kruchinin 5 years ago committed by GitHub
parent e0fc323a4d
commit 3e9281942f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,33 @@
// Copyright (C) 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
import { taskName } from '../../support/const';
context('Settings. "Auto save" option.', () => {
const caseId = '51';
before(() => {
cy.openTaskJob(taskName);
});
describe(`Testing case "${caseId}"`, () => {
it('Check "Enable auto save". Change the interval.', () => {
cy.openSettings();
cy.contains('Workspace').click();
cy.get('.cvat-workspace-settings-auto-save').within(() => {
cy.get('[type="checkbox"]').check();
cy.get('.ant-checkbox-checked').should('exist');
cy.get('[type="checkbox"]').uncheck();
cy.get('.ant-checkbox-checked').should('not.exist');
});
cy.get('.cvat-workspace-settings-auto-save-interval').within(() => {
cy.get('[role="spinbutton"]').clear().tab(); // Clear field and press Tab
cy.get('[role="spinbutton"]').should('have.value', 1); // Interval should`t be empty
cy.get('[role="spinbutton"]').clear().type(5).should('have.value', 5);
});
});
});
});
Loading…
Cancel
Save