describe('WagonTypeEdit', () => {
    const trayColorRow =
        '.q-select > .q-field__inner > .q-field__control > .q-field__control-container';
    beforeEach(() => {
        cy.viewport(1920, 1080);
        cy.login('developer');
        cy.visit('/#/wagon/type/1/edit');
    });

    it('should edit the name and the divisible field of the wagon type', () => {
        cy.get('.q-card');
        cy.get('input').first().type(' changed');
        cy.get('div.q-checkbox__bg').first().click();
        cy.get('.q-btn--standard').click();
    });

    it('should delete a tray', () => {
        cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').first().click();
        cy.reload();
    });

    it('should create a tray', () => {
        cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').last().click();
        cy.get('input').last().type('150');
        cy.get(trayColorRow).type('{downArrow}{downArrow}{downArrow}{enter}');
    });
});
