test(ticketBoxing): e2e
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
96c16727ff
commit
f1d24cc103
|
@ -0,0 +1,38 @@
|
|||
describe('TicketBoxing', () => {
|
||||
beforeEach(() => {
|
||||
const ticketId = 1;
|
||||
cy.viewport(1280, 720)
|
||||
cy.login('developer')
|
||||
cy.visit(`/#/ticket/${ticketId}/boxing`);
|
||||
});
|
||||
|
||||
it('should load expeditions of ticket', () => {
|
||||
cy.get('div[class="q-item__label text-h6"]').eq(0).should('have.text', '#1');
|
||||
cy.get('div[class="q-item__label text-h6"]').eq(1).should('have.text', '#2');
|
||||
cy.get('div[class="q-item__label text-h6"]').eq(2).should('have.text', '#3');
|
||||
});
|
||||
|
||||
it('should show error if not have video list', () => {
|
||||
cy.get('div[class="q-item__label text-h6"]').eq(0).click();
|
||||
cy.get('.q-notification__message').should('have.text', 'No videos available');
|
||||
});
|
||||
|
||||
it('should show select time and video if have video list', () => {
|
||||
cy.intercept(
|
||||
{
|
||||
method: 'GET',
|
||||
url: '/api/Boxings/*',
|
||||
},
|
||||
[
|
||||
"2022-01-01T01-01-00.mp4",
|
||||
"2022-02-02T02-02-00.mp4",
|
||||
"2022-03-03T03-03-00.mp4",
|
||||
]
|
||||
).as('getVideoList');
|
||||
cy.get('.q-list > :nth-child(3)').click();
|
||||
|
||||
cy.get('.q-list > :nth-child(1)').should('be.visible');
|
||||
cy.get('.q-list > :nth-child(2)').should('be.visible');
|
||||
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue