test:optimize the method of get editor value

This commit is contained in:
Hufe921
2023-02-21 21:07:52 +08:00
parent 63487d4f90
commit 708d57812e
20 changed files with 288 additions and 302 deletions
+5 -7
View File
@@ -13,12 +13,6 @@ describe('控件-复选框', () => {
it('复选框', () => {
cy.getEditor().then((editor: Editor) => {
editor.listener.saved = function (payload) {
const data = payload.data[0]
expect(data.control!.code).to.be.eq('98175')
}
editor.command.executeSelectAll()
editor.command.executeBackspace()
@@ -40,7 +34,11 @@ describe('控件-复选框', () => {
}
}])
cy.get('@canvas').type('{ctrl}s')
const payload = editor.command.getValue()
const data = payload.data[0]
expect(data.control!.code).to.be.eq('98175')
})
})