/// <reference types="cypress" />
describe('Item summary', () => {
    beforeEach(() => {
        cy.viewport(1920, 1080);
        cy.login('developer');
        cy.visit(`/#/item/1/summary`);
    });

    it('should clone the item', () => {
        cy.dataCy('descriptor-more-opts').click();
        cy.get('.q-menu > .q-list > :nth-child(2) > .q-item__section').click();
        cy.dataCy('VnConfirm_confirm').click();
        cy.waitForElement('[data-cy="itemTags"]');
        cy.dataCy('itemTags').should('be.visible');
    });

    it('should regularize stock', () => {
        cy.dataCy('descriptor-more-opts').click();
        cy.get('.q-menu > .q-list > :nth-child(1) > .q-item__section').click();
        cy.dataCy('regularizeStockInput').type('10');
        cy.dataCy('Warehouse_select').type('Warehouse One{enter}');
        cy.checkNotification('Data created');
    });
});