'
}, class {
list = ['x'];
onInit() {
setTimeout(() => {
this.list = [];
});
}
});
describe('for', () => {
it('shows a list of things from a map', () => {
cy.mount('');
cy.get('#thing_thing1').should('have.text', 'thing1 = value1');
cy.get('#thing_thing2').should('have.text', 'thing2 = value2');
cy.get('button').click();
cy.get('#thing_x1').should('have.text', 'x1 = y1');
cy.get('#thing_x2').should('have.text', 'x2 = y2');
cy.get('#thing_x3').should('have.text', 'x3 = y3');
});
it('shows a list of things from an object', () => {
cy.mount('');
cy.get('#thing_thing1').should('have.text', 'thing1 = value1');
cy.get('#thing_thing2').should('have.text', 'thing2 = value2');
cy.get('button').click();
cy.get('#thing_x1').should('have.text', 'x1 = y1');
cy.get('#thing_x2').should('have.text', 'x2 = y2');
cy.get('#thing_x3').should('have.text', 'x3 = y3');
});
it('removes update hooks when a list is emptied', () => {
cy.mount('');
cy.get('button').click();
});
it('does not error when the list is empty or embedded in another object', () => {
cy.mount('');
cy.get('#x').should('not.have.text', 'x');
});
});