From 98cc1b2f3afc3f63fee530b3431911b5787773fa Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Mon, 24 Aug 2015 11:50:59 -0300 Subject: [PATCH] Initial e2e test for pages --- e2e/pages/article.spec.js | 14 ++++++++++++++ e2e/pages/inicio.spec.js | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ e2e/pages/layout.js | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ e2e/pages/progama.spec.js | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ e2e/pages/sobre.spec.js | 28 ++++++++++++++++++++++++++++ 5 files changed, 253 insertions(+), 0 deletions(-) create mode 100644 e2e/pages/article.spec.js create mode 100644 e2e/pages/inicio.spec.js create mode 100644 e2e/pages/layout.js create mode 100644 e2e/pages/progama.spec.js create mode 100644 e2e/pages/sobre.spec.js diff --git a/e2e/pages/article.spec.js b/e2e/pages/article.spec.js new file mode 100644 index 0000000..80f92a4 --- /dev/null +++ b/e2e/pages/article.spec.js @@ -0,0 +1,14 @@ +(function(){ + 'use strict'; + + describe('The index page', function () { + + beforeEach(function () { + browser.get('/'); + }); + + describe('Common layout', function (){ + require('layout')(); + }); + }); +})(); diff --git a/e2e/pages/inicio.spec.js b/e2e/pages/inicio.spec.js new file mode 100644 index 0000000..8674cb3 --- /dev/null +++ b/e2e/pages/inicio.spec.js @@ -0,0 +1,92 @@ +/* global require */ +(function(){ + 'use strict'; + + describe('The index page', function () { + + beforeEach(function () { + browser.get('/'); + }); + + describe('Common layout', function (){ + require('layout')(); + }); + + describe('Component: Main Video', function(){ + it('should have a alt text', function() {}); + it('should have a thumb background image (for async)', function() {}); + it('should have a button play trigger', function() {}); + it('should be accessible', function() {}); + }); + + describe('Component: Agenda', function(){ + it('should have a title', function() {}); + it('should have a icon', function() {}); + it('should show the number of scheduled chats', function() {}); + it('should have a open trigger', function() {}); + it('should be accessible', function() {}); + + describe('Component: Agenda / Open-panel', function(){ + it('should have a close trigger', function() {}); + it('should have the date/time of scheduled chat', function() {}); + 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 + }); + }); +})(); diff --git a/e2e/pages/layout.js b/e2e/pages/layout.js new file mode 100644 index 0000000..625737c --- /dev/null +++ b/e2e/pages/layout.js @@ -0,0 +1,64 @@ +module.exports = function(){ + 'use strict'; + + describe('The common layout', function () { + + describe('Accessibility (a11y) top bar', function(){ + it('should have a "go-to-content" anchor', function() {}); + it('should have a "go-to-menu" anchor', function() {}); + it('should have a "go-to-search" anchor', function() {}); + it('should have a "go-to-footer" anchor', function() {}); + + it('should have a accessibility anchor', function() {}); + it('should have a adjust contrast anchor', function() {}); + it('should have a sitemap anchor', function() {}); + }); + + describe('Header', function(){ + it('should have a logo', function() {}); + it('should have a navigation', function() {}); + it('should have a social share area', function() {}); + it('should have a "CADASTRAR" anchor', function() {}); + it('should have a "ENTRAR" anchor', function() {}); + it('should have a "Veja mais" area', function() {}); + it('should have a valid ARIA', function() {}); + + describe('Header / Navigation', function(){ + it('should have a "SOBRE" anchor', function() {}); + it('should have a "PROGRAMAS" anchor', function() {}); + it('should have a "PROPOSTAS" anchor', function() {}); + it('should have a "DÚVIDAS" anchor', function() {}); + it('should be condensed on mobile', function() {}); + it('should have a valid ARIA', function() {}); + // it('should have a "ENTRAR?" anchor on MOBILE?', function() {}); + // it('should have a "RANKING?" anchor on MOBILE?', function() {}); + // it('should have a "RESPOSTAS?" anchor on MOBILE?', function() {}); + // it('should have a "PARTICIPE?" anchor on MOBILE?', function() {}); + }); + + describe('Header / Social Share', function(){ + it('should have a facebook share button', function() {}); + it('should have a twitter share button', function() {}); + it('should have a gplus share button', function() {}); + it('should have a whatsapp share button', function() {}); + it('should be condensed on mobile', function() {}); + it('should have a email share button', function() {}); + it('should have a valid ARIA', function() {}); + // what to do when on mobile? + // too small on mobile? point issues + }); + + describe('Header / "Veja mais"', function(){ + it('should have a youtube link', function() {}); + // it('should have a flicker? link', function() {}); + it('should have a valid ARIA', function() {}); + // what to do when on mobile? + }); + }); + + describe('Footer', function(){ + it('should have a ?', function() {}); + it('should have a valid ARIA', function() {}); + }); + }); +}; diff --git a/e2e/pages/progama.spec.js b/e2e/pages/progama.spec.js new file mode 100644 index 0000000..0be7d27 --- /dev/null +++ b/e2e/pages/progama.spec.js @@ -0,0 +1,55 @@ +(function(){ + 'use strict'; + + describe('The "Programa" page', function () { + + beforeEach(function () { + browser.get('/'); + + }); + + describe('Common layout', function (){ + require('layout')(); + }); + + describe('Component: article-preview', function (){}); + + describe('Component: article-content', function (){}); + + // describe('Component: article-template-1', function (){}); + + describe('Component: proposal-random', function (){ + it('should have a loading state', function() {}); + it('should have a breadcrumb', function() {}); + it('should have the text-content of proposal', function() {}); + it('should have a vote up button', function() {}); + it('should have a vote skip button', function() {}); + it('should have a vote down button', function() {}); + it('should have a social share area', function() {}); + it('should have the ranking position', function() {}); + it('should have a ranking button trigger', function() {}); + it('should be accessible', function() {}); + }); + + describe('Component: proposal-ranking', function (){ + it('should have a loading state', function() {}); + it('should have a close button trigger', function() {}); + it('should have the ranking position of proposal', function() {}); + it('should have the text-content of proposal', function() {}); + it('should have the number of views', function() {}); + it('should have the number of votes up', function() {}); + it('should have the number of votes down', function() {}); + it('should have a link to proposal', function() {}); + it('should have a link to all proposals', function() {}); + it('should be accessible', function() {}); + }); + + describe('Component: proposal-maker', function (){ + it('should be accessible', function() {}); + }); + + describe('Component: proposal-ranking', function (){ + it('should be accessible', function() {}); + }); + }); +})(); diff --git a/e2e/pages/sobre.spec.js b/e2e/pages/sobre.spec.js new file mode 100644 index 0000000..cb5e7d3 --- /dev/null +++ b/e2e/pages/sobre.spec.js @@ -0,0 +1,28 @@ +(function(){ + 'use strict'; + + describe('The "Sobre" page', function () { + + beforeEach(function () { + browser.get('/'); + }); + + describe('Common layout', function (){ + require('layout')(); + }); + + describe('Breadcrumb', function(){ + it('should have two itens', function() {}); + }); + + describe('Content', function(){ + it('should have a main video', function() {}); + it('should have a main video thumb image', function() {}); + it('should have a main video thumb image alternative text', function() {}); + + it('should have a "Programas" description', function() {}); + it('should have a "Propostas" tutorial', function() {}); + it('should be accessible', function() {}); + }); + }); +})(); -- libgit2 0.21.2