提交 2431aa1d 编写于 作者: G Guillaume Chau

test(e2e): fix

上级 a0eacfa1
......@@ -4,6 +4,7 @@ suite('component data edit', () => {
it('should edit data using the decrease button', () => {
// select Instance
cy.get('.instance:nth-child(1) .instance:nth-child(2)').eq(0).click()
cy.get('.component-state-inspector .data-type').should('contain', 'data')
cy.get('.data-field').eq(7).find('.actions .vue-ui-button').eq(1).click({ force: true })
cy.get('.component-state-inspector').within(() => {
cy.get('.key').contains('0').parent().get('.value').contains('0')
......@@ -21,6 +22,7 @@ suite('component data edit', () => {
it('should edit data using the increase button', () => {
cy.get('.instance:nth-child(1) .instance:nth-child(2)').eq(0).click()
cy.get('.component-state-inspector .data-type').should('contain', 'data')
cy.get('.data-field').eq(7).find('.actions .vue-ui-button').eq(2).click({ force: true })
cy.get('.component-state-inspector').within(() => {
cy.get('.key').contains('0').parent().get('.value').contains('0')
......
......@@ -120,30 +120,27 @@ suite('components tab', () => {
it('should display injected props', () => {
cy.get('.left .search input').clear().type('Mine')
cy.get('.instance').eq(1).click()
cy.get('.right .data-wrapper').then(el => {
expect(el.text()).to.contain('injected')
expect(el.text()).to.contain('answer:42')
expect(el.text()).to.contain('foo:"bar"')
expect(el.text()).to.contain('noop:ƒ noop(a, b, c)')
})
cy.get('.right .data-wrapper')
.should('contain', 'injected')
.should('contain', 'answer:42')
.should('contain', 'foo:"bar"')
.should('contain', 'noop:ƒ noop(a, b, c)')
cy.get('.left .search input').clear()
})
it('should display $refs', () => {
cy.get('.instance .item-name').contains('RefTester').click()
cy.get('.right .data-wrapper').then(el => {
expect(el.text()).to.contain('list:Array[4]')
expect(el.text()).to.contain('<li>')
expect(el.text()).to.contain('tester:<p id="testing"')
})
cy.get('.right .data-wrapper')
.should('contain', 'list:Array[4]')
.should('contain', '<li>')
.should('contain', 'tester:<p id="testing"')
})
it('should display $attrs', () => {
cy.get('.instance .instance:nth-child(2) .arrow-wrapper').click()
cy.get('.instance .instance .instance:nth-child(1) .item-name').click()
cy.get('.right .data-wrapper').then(el => {
expect(el.text()).to.contain('$attrs')
expect(el.text()).to.contain('attr:"some-attr"')
})
cy.get('.right .data-wrapper')
.should('contain', '$attrs')
.should('contain', 'attr:"some-attr"')
})
})
......@@ -14,10 +14,9 @@ suite('vuex tab', () => {
cy.get('[data-id="load-vuex-state"]').click()
cy.get('.recording-vuex-state').should('not.be.visible')
cy.get('.loading-vuex-state').should('not.be.visible')
cy.get('.vuex-state-inspector').then(el => {
expect(el.text()).to.include('type:"DECREMENT"')
expect(el.text()).to.include('count:1')
})
cy.get('.vuex-state-inspector')
.should('contain', 'type:"DECREMENT"')
.should('contain', 'count:1')
cy.get('.history .entry').eq(5).should('have.class', 'inspected').should('have.class', 'active')
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册