inicio.spec.js
6.07 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* global require */
(function(){
'use strict';
describe('The index page', function () {
var page = require('./inicio.po.js');
// beforeEach(function () {
// browser.get('/');
// });
describe('Common layout', function (){
require('./layout.js')();
});
describe('Component: Main Video', function(){
it('should have a thumb background image (for async)', function() {
expect(page.video.element(by.css('.video-thumbnail'))).toBeDefined();
expect(page.video.element(by.css('.video-thumbnail')).getCssValue('background-image')).toContain('youtube-background.png');
expect(page.video.element(by.css('.video-thumbnail')).getAttribute('aria-hidden')).toBe('true');
});
it('should have a button play trigger', function() {
expect(page.video.element(by.css('.video-play-button'))).toBeDefined();
expect(page.video.element(by.css('.video-play-button')).getAttribute('aria-label')).toBeDefined();
});
});
describe('Component: Agenda', function(){
it('should have a tab-trigger', function() {
expect(page.agenda.element(by.css('.event-tab--trigger'))).toBeDefined();
expect(page.agenda.element(by.css('.event-tab--title'))).toBeDefined();
expect(page.agenda.element(by.css('.event-tab--icon'))).toBeDefined();
expect(page.agenda.element(by.css('.event-tab--icon')).element(by.css('.glyphicon'))).toBeDefined();
expect(page.agenda.element(by.css('.event-tab--icon')).element(by.css('.glyphicon')).getAttribute('aria-hidden')).toBe('true');
expect(page.agenda.element(by.css('.event-tab--button'))).toBeDefined();
expect(page.agenda.element(by.css('.event-tab--total-scheduled'))).toBeDefined();
expect(page.agenda.element(by.css('.event-tab--total-scheduled'))).toMatch(/(\d)*/);
});
describe('Component: Agenda / Open-panel', function(){
it('should have a header', function() {
// the 2 lines below need to open panel and make elements visibles
expect(page.agenda.element(by.model('eventListCtrl.isListVisible'))).toBeDefined();
page.agenda.element(by.css('.event-tab--trigger')).click();
expect(page.agenda.element(by.css('.event-list--title'))).toBeDefined();
expect(page.agenda.element(by.css('.event-list--title')).getText()).toEqual('Bate-papo com ministr@s');
expect(page.agenda.element(by.css('.event-list--icon'))).toBeDefined();
expect(page.agenda.element(by.css('.event-list--icon')).element(by.css('.glyphicon'))).toBeDefined();
expect(page.agenda.element(by.css('.event-list--icon')).element(by.css('.glyphicon')).getAttribute('aria-hidden')).toBe('true');
expect(page.agenda.element(by.css('.event-list--minimize'))).toBeDefined();
expect(page.agenda.element(by.css('.event-list--minimize')).element(by.css('.glyphicon'))).toBeDefined();
expect(page.agenda.element(by.css('.event-list--minimize')).element(by.css('.glyphicon')).getAttribute('aria-hidden')).toBe('true');
});
it('should have a table with content', function() {
// date/time
expect(page.agenda.element(by.css('.event-list--minimize')).element(by.css('.glyphicon')).getAttribute('aria-hidden')).toBe('true');
// title
// subscribe button
// total of subscribers
// show only 5 itens
});
// it('should have the title of scheduled chat', function() {});
// it('should have a subscribe button to scheduled chat', function() {});
// it('should show the number of subscribers on each item', function() {});
// it('should show 5 itens at most', function() {});
// it('should be accessible', function() {});
});
describe('Component: Agenda / with Hangout', function(){
it('should have a title', function() {});
it('should have a thumb background image (for async)', function() {});
it('should have a button trigger to start the video', function() {});
it('should have a description', function() {
// PATTERN: %DATETIME - %TITLE, %CATEGORY, ?
// Get it from the endpoint or assembly-it ?
});
it('should have a open trigger', function() {
// with:
// - total of scheduled events
// - icon: arrow down
});
});
});
describe('Component: Category List', function(){
it('should have a title', function() {});
it('should have list of category', function() {});
it('should have the icon of each category', function() {});
it('should have the name of each category', function() {});
it('should be accessible', function() {});
// what expect on hover or focus? Material Desgn likes?
//
});
describe('Component: Article List | Box (each) ', function(){
it('should have a category label', function() {});
it('should have a banner image', function() {});
it('should have a alternatve text for the banner image', function() {});
it('should have a title', function() {});
it('should have 50 letters at most on title', function() {});
it('should have a abstract', function() {});
it('should have 200 letters at most on abstract', function() {});
it('should have the number of sent proposals', function() {});
it('should have a call-to-action button', function() {});
it('should have the same color of the category-color at call-to-action button', function() {});
it('should be accessible', function() {});
// what colors on what?
// what are links/clickable/focusable
});
describe('Component: Search ', function(){
it('should have a hidden label', function() {});
it('should have a html5 search input', function() {});
it('should have be focusable by a11y link', function() {});
it('should have a more filters?', function() {});
it('should be accessible', function() {});
// what behaviours?
// more filters? ordering by alphabet: name, category, random.
// show results at another page
});
});
})();