【发布时间】:2021-06-30 15:21:47
【问题描述】:
it.only('Create new film', () => {
function randomStringFc() {
var a = "abcdefghijklmnopqrstuvwxyz";
var n = "1234567890";
var t = function(input, length) { return Array(length).fill(input).map(function(v) { return v[Math.floor(Math.random() * v.length)] }).join(''); }
var m = "testFilm-" + t(a+n, 8);
return m;
}
cy.contains('Create new', { timeout: 12000 }).click()
cy.get('#title', { timeout: 12000 }).then( input => {
let filmName = cy.wrap(input).type(randomStringFc())
cy.get('#slug').should('have.value', filmName)
})
})
10000 毫秒后重试超时:预期 '' 的值为 { Object (userInvocationStack, specWindow, ...) },但值为 'testfilm-fruh5tn5'
【问题讨论】: