-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest3.js
52 lines (40 loc) · 2.04 KB
/
test3.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
describe('Send file', function() {
it('Sending file', function() {
cy.visit('https://dev.2sign.online/');
cy.get('input[type="file"]').attachFile('filefortest.pdf');
cy.get('input[type="checkbox"]').check();
// cy.get('input[type="radio"]').check(3);
cy.get(':nth-child(3) > .MuiButtonBase-root > .MuiIconButton-label > .jss181').click();
cy.get('input[type="text"]').type('[email protected]');
cy.get('button[type="button"]').click();
cy.wait(3000);
cy.contains('Отправить на подпись').click();
});
it('Sending file2', function() {
cy.visit('https://dev.2sign.online/');
cy.get('input[type="file"]').attachFile('filefortest.pdf');
// cy.get('input[type="radio"]').check(3);
cy.get(':nth-child(3) > .MuiButtonBase-root > .MuiIconButton-label > .jss181').click();
cy.get('input[name="recipientName"]').type('User1');
cy.get('input[name="recipientEmail"]').type('[email protected]');
cy.get('input[name="senderName"]').type('User2');
cy.get('input[name="senderEmail"]').type('[email protected]');
cy.get('.MuiButton-containedSecondary > .MuiButton-label').click();
cy.wait(3000);
// cy.get(':nth-child(2) > .DraggableButton_btnWrap__1zzqX > .DraggableButton_b__tkLgb')
// .drag('.DocumentWrapper_wrap__39sB2');
});
it('drop-n-drug', function() {
const dataTransfer = new DataTransfer();
cy.get(':nth-child(2) > .DraggableButton_btnWrap__1zzqX > .DraggableButton_b__tkLgb')
.trigger('dragstart', {
dataTransfer
});
cy.get('.DocumentWrapper_wrap__39sB2').trigger('drop', {
dataTransfer
});
cy.get('.MuiButton-label').click();
cy.get('.MuiButton-label').click();
cy.get('h2').should('have.text', 'Ваш документ был успешно отправлен');
})
});