我是一家科技公司的实习生,我的任务是尝试编写一些测试。我不是开发人员,也不是工程师,我实际上是在学习经济学,所以请原谅任何新手的错误。
我的目标是在我放入彩票后测试购物车中显示的内容。我想测试每个品种(包括奖金游戏等)以及这些品种(例如,将 4 张彩票放入购物车 -> 显示购物车中的4张门票)
describe('visit page', IPHONE_X, () => {
it('visit page Lotto 6aus49', () => {
cy.visit('/lotto')
})
})
describe('filling ticket and proceeding to basket', IPHONE_X, () => {
it('quicktip ticket click', () => {
cy.get('ticketbutton').click()
})
it('basket button click', () => {
cy.get('submit-to-basket-button').click()
})
/// what happens here is that the interface switches to another one. If I test the case cypress shows me that the basket is empty. Why is that? I mean, that's why I clicked all those buttons before.
it('basket contains right weekday of ticket', () => {
cy.get('basket-item').contains("Ticket Lottery Example")```
I hope that I described my case understandable. Thank you.