Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

196 lines (151 sloc) 5.934 kb

Scope selectors

Providing abstraction for xpath / css selectors for common areas of application, to operate easily on:

  • parts of page
    • top|left|bottom|right
    • main menu, footer
  • table sectors
    • a row that contains sth
      **a default area (i.e without menus, columns and footer)

Verification mechanism that ensures taken action results in desirable state within app

Distinct what user see from what browser see in the source. This includes:

  • see sth that is visible for user
    • visible object is a text ( regex, string )
    • visible object is a value in field { hash of pairs field (id|name), value }
    • elements in proper order
  • send in email (emails should be attached per user – mailbox)
  • see sth in the source code (in debug mode)

Interactions with applications.

  • clicking
  • visiting
  • drag and drop
  • fill_in forms
    • including rich text (‘textarea’, ‘ckeditor’, ’’)
    • all type of inputs (‘text’, ‘password’, ‘email’, ‘checkbox’, ‘radio’, ‘file’, ‘select’, ‘multi-select’)
  • handling tricky testing parts in better manner
    • popups
    • frames / windows
    • native windows (like confirmations)
  • support for common ui components
    • jquery ui
      • calendars
      • sliders
    • colorbox // other modalboxes
      **
  • all browser simulation handlers
    • … go back etc
  • all mouse and keyboard simulation
    • hover over
  • using javascript (might be as debug mode)
    • to trigger events that are hard to imitate
  • testing visibility of element (debug mode)
  • support for mobile applications – touching around the specified html element.

user object

  • is a ruby object containing info about
    • session
    • user in system he represents(including not encrypted password)
    • can perform many actions in will { … } block
    • can login/logout
  • customization (specific classes for specific types of users)
    • roles
    • methods for setup certain state of account (must to work well with factories and support bulk update to speed up things)

handle somehow guest type of account

sessions (from browser perspective)

  • by default share the same sessions
  • exclusive session support ( when testing multiuser interactions)

shared examples that are skeleton for testing

  • pagination
  • sorting

Make kameleon agnostic from devise, support for other authentication solutions

i18n support

using keys other than labels

shortcuts to abstract some internal elements

long class names, constants etc

see partial elemnts in what scope you are

print debug.send(:scopes).last.native

see sorted columns

  • ordered => [:asc, :column => ‘Title’]
  • within :multiple need to be rewritten – is very ugly so far
  • implement better keyboard support

Other

  • Make kameleon agnostic from devise, easier integrating other authentication solutions
  • Add support for nice frame/window switching
  • Support for interaction with mobile websites – sometimes you have to ‘touch’ an element, pull a slider, etc. To do so, you have to click around the specified text. And example:
    I18n.locale = :en
    translation = I18n.t(arg1)
    element = page.find(:xpath, "//span[contains(.,'#{arg1}') or contains(.,'#{translation}')]").find(:xpath, ".//..").find(:xpath, ".//..")
    element.click

Notes form past

  1. scope selectors
goals is to provide abstraction above xpath / css selectors for common areas of application * parts of page * on (top|left|bottom|right) * in main menu, footer * tables sectors * within row that contains sth * default area (i.e without menus, columns and footer)
  1. verification that action complete with desirable state in app
goals is to distinct what user see from what browser see in the source * see sth that is visible for user * as text ( regex, string ) * as value in field { hash of pairs field (id|name), value } * elements in proper order * send in email (emails should be attached per user – mailbox)
# * see in the source code (in debug mode)
#
  1. Interactions with applications
* clicking * visiting * drag and drop * fill_in forms * including rich text (‘textarea’, ‘ckeditor’, ’’) * all type of inputs (‘text’, ‘password’, ‘email’, ‘checkbox’, ‘radio’, ‘file’, ‘select’, ‘multi-select’) * handling tricky testing parts in better manner * popups * frames / windows * native windows (like confirmations) * support for common ui components * jquery ui * calendars * sliders * … * colorbox // other modalboxes * * all browser simulation handlers * … go back etc * all mouse and keyboard simulation * hover over * using javascript (might be as debug mode) * to trigger events that are hard to imitate * testing visibility of element (debug mode)
  1. user object
* is ruby object with info about * session * user in system that he is (including not encrypted password) * can perform many actions in will { … } * can login/logout * customization (specific classes for specific types of users) * roles * methods for setuping certain state of account (must to work well with factories and support bulk update to speed up things)
  1. handle somehow guest type of account
  1. sessions (from browsers point)
* be default share the same sessions * is possible that they have exclusive session ( when testing multiuser interactions)
  1. shared examples that are skeleton for testing
* pagination * sorting * …
  1. i18n support
using keys other that labels
  1. shortcuts to abstract some internal elements
long class names, constants etc
  1. see partial elemnts in what scope you are
    print debug.send(:scopes).last.native
  1. see sorted columns
    ordered => [:asc, :column => ‘Title’]

within :multiple need to be rewritten – is very ugly so far

implement better keyboard support

Jump to Line
Something went wrong with that request. Please try again.