2020年12月21日星期一

Cypress 6.2.0 intercept regular match is invalid

I use intercept in cypress, and sometimes it fails to match the corresponding http request. Is it because of a problem with my writing or a bug in cypress? I have raised an issue to cypress. The address is here github

cy.intercept(/\/api\/song\/url/).as('getUrl')  cy.intercept(/\/api\/song\/detail/).as('getDetail')  cy.intercept(/\/api\/lyric/).as('getLyric')    cy.get(    '.toplist-expansion-contanier:first-child .none-select:first-child'  ).dblclick()    cy.wait(['@getUrl', '@getDetail', '@getLyric']).then(interceptions => {    cy.get('source')      .invoke('attr', 'src')      .then(src => {        expect(src).to.have.string('.mp3')      })      // pause music    cy.get('.music-command-group button:nth-child(3)').click()  })  

https://i.stack.imgur.com/UejlG.png

https://stackoverflow.com/questions/65402751/cypress-6-2-0-intercept-regular-match-is-invalid December 22, 2020 at 11:06AM

没有评论:

发表评论