-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path500_control.cy.js
More file actions
86 lines (81 loc) · 3.39 KB
/
500_control.cy.js
File metadata and controls
86 lines (81 loc) · 3.39 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
describe('load control page, verify stream is there', () => {
it('checks sidebar contents', () => {
cy.visit('http://localhost:8080')
cy.get('.v-carousel').should('exist')
cy.get('button.v-app-bar-nav-icon').should('exist').click()
cy.get('a.v-list-item[href*="control"]').click()
cy.get('img[src*="video/stream"]').should('exist')
})
it('move', () => {
cy.visit('http://localhost:8080')
cy.get('.v-carousel').should('exist')
cy.get('button.v-app-bar-nav-icon').should('exist').click()
cy.get('a.v-list-item[href*="control"]').click()
cy.get('#app').click()
cy.get('button.up').click()
cy.get('button.left').click()
cy.get('button.right').click()
cy.get('button.down').click()
})
it('takes a picture', () => {
cy.visit('http://localhost:8080')
cy.get('.v-carousel').should('exist')
cy.get('button.v-app-bar-nav-icon').should('exist').click()
cy.get('a.v-list-item[href*="control"]').click()
cy.get('#app').click()
cy.get('button.photo').click()
cy.visit('http://localhost:8080')
cy.get('.v-carousel').should('exist')
cy.get('button.v-app-bar-nav-icon').should('exist').click()
cy.get('a.v-list-item[href*="gallery"]').click()
cy.get('#app').click()
cy.get('.gallery').contains('DSC1').should('exist')
cy.get('.v-main').contains('DSC1').click()
cy.get('.v-card-title.details').contains('DSC1').should('exist')
cy.get('.v-card-title.details').contains('DSC1').parents('.v-card').find('button.ok').click()
cy.get('.v-main').contains('DSC1').parents('.v-card').find('.mdi-delete').click()
cy.get('#gallery_photo_confirm_card').find('.ok').click()
})
it('record a video', () => {
cy.visit('http://localhost:8080')
cy.get('.v-carousel').should('exist')
cy.get('button.v-app-bar-nav-icon').should('exist').click()
cy.get('a.v-list-item[href*="control"]').click()
cy.get('#app').click()
cy.get('button.video').click()
cy.wait(5000)
cy.get('button.video').click()
cy.visit('http://localhost:8080')
cy.get('.v-carousel').should('exist')
cy.get('button.v-app-bar-nav-icon').should('exist').click()
cy.get('a.v-list-item[href*="gallery"]').click()
cy.get('#app').click()
cy.get('.gallery').contains('VID1').should('exist')
cy.get('.v-main').contains('VID1').click()
cy.get('.v-card-title.details').contains('VID1').should('exist')
cy.get('.v-card-title.details').contains('VID1').parents('.v-card').find('button.ok').click()
cy.get('.v-main').contains('VID1').parents('.v-card').find('.mdi-delete').click()
cy.get('#gallery_photo_confirm_card').find('.ok').click()
})
/*
it('say a phrase', () => {
cy.visit('http://localhost:8080')
cy.get('.v-carousel').should('exist')
cy.get('button.v-app-bar-nav-icon').should('exist').click()
cy.get('a.v-list-item[href*="control"]').click()
cy.get('#app').click()
cy.get('button.speak').click()
cy.get('#control_text_to_speech').clear().type('hello world!')
cy.get('#dialog_control_speak_title').find('button.ok').click()
})
it('opens gallery', () => {
cy.visit('http://localhost:8080')
cy.get('.v-carousel').should('exist')
cy.get('button.v-app-bar-nav-icon').should('exist').click()
cy.get('a.v-list-item[href*="control"]').click()
cy.get('#app').click()
cy.get('a.gallery').click()
cy.url().should('include', '/gallery')
})
*/
})