Git Product home page Git Product logo

common-tests's Introduction

common-tests

Boilerplate Tests that we should add to every single great web app.

TOC

  1. Accessibility
  2. Performance
  3. User Authentication
  4. Twitter Social Sharing
  5. Facebook Social Sharing
  6. CRUD

Accessibility

Stolen from A11yproject Checklist

# Aria Tests
should have HTML element with role="navigation"
should have HTML element with role="main"

# Language
should have language specified on <html> 

# Document Outline
should have title attribute
should have description attribute
links should have :focus state 
links should have :hover state 
links should have :active state
images should have alt text

# Routes
...routes should be accessible via a URL
...routes.states should be accessible via a URL

# Javascript 
should render something basic without javascript

# Forms
should be able to tab between form elements
should have label for between form controls (e.g. input, select etc.)

# Contrast
should have a suitable contrast

# Devices
should work with a screen reader

Performance

Stolen from Google PageSpeed

should Avoid CSS @import
should Avoid a character set in the meta tag
should not have bad requests
should Avoid landing page redirects
should Combine images into CSS sprites
should Enable Keep-Alive
should Inline Small CSS
should Inline Small JavaScript
should Minify CSS
should Minify HTML
should Optimize images
should Optimize the order of styles and scripts
should Prefer asynchronous resources
should Put CSS in the document head
should Put JS at the end of the document body
should Serve resources from a consistent URL
should Specify a character set
should Minimize redirects
should Minimize payload 
should Enable compression
should Serve scaled images
should Minimize delay in page load 
should Minimize request size
should Specify image dimensions
should Defer parsing of JavaScript
should Leverage browser caching
should Specify a cache validator
should Remove query strings from static resources
should Specify a Vary: Accept-Encoding header

Features

User Authentication

should log in
should sign up
should log out
should reset password
should refresh [authentication method (token or cookie) ]
should create new user
should delete user
should update user

Twitter Social Sharing

should have <meta name="twitter:card" content="summary">
should have <meta name="twitter:site" content="">
should have <meta name="twitter:url" content="">
should have <meta name="twitter:title" content="">
should have <meta name="twitter:description" content="">
should have <meta name="twitter:image" content="">

Facebook Social Sharing

should have <meta property="og:title" content="" />
should have <meta property="og:type" content="website" />
should have <meta property="og:url" content="" />
should have <meta property="og:image" content="" />
should have <meta property="og:description" content="" /> 
should have <meta property="og:site_name" content="" />

Crud

should create [ RESOURCE ]
should read [ RESOURCE ]
should update [ RESOURCE ]
should delete [ RESOURCE ]

common-tests's People

Contributors

clintonhalpin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

common-tests's Issues

Generate spec file formated for Mocha

Tests should fail when you first add them to the project

e.g.

describe("SECTION", function(){
    before(function () {
    });

    it("should MEET EXAMPLE TEST!", function(done) {
    });
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.