Changeset 949 for branches


Ignore:
Timestamp:
May 29, 2011, 2:32:59 PM (13 years ago)
Author:
gav
Message:

Functional test, extend 'If we type in the wrong password or username' to be data driven.

Location:
branches/features/purchaseOrders/test/functional
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/features/purchaseOrders/test/functional/GebReportingSpecBase.groovy

    r948 r949  
    2020     * authentication or by directly requesting the login page.
    2121     */
    22     def login(username, password, targetPage = null, params = [:]) {
     22    void login(username, password, targetPage = null, params = [:]) {
    2323        if (targetPage) {
    2424            to([*:params], targetPage)
  • branches/features/purchaseOrders/test/functional/LoginSpec.groovy

    r948 r949  
    3232    }
    3333
    34     def "If we type in the wrong password"() {
    35         when:
    36         login('admin', 'bogus')
    37 
    38         then:
     34    def "If we type in the wrong password or username"() {
     35        expect:
     36        login(username, password)
    3937        at LoginPage
    4038        verifyLoginFailureMessage()
     39
     40        where:
     41        username  | password
     42        'admin'   | 'bogus' /* Bogus Password. */
     43        'admin'   | ''      // Blank.
     44        'admin'   | 'PASS'  // Capitals
     45        'admin'   | 'Pass'  // First Capital.
     46        'admin'   | 'pasS'  // Last Capital.
     47        'admin'   | 'pas'   // One letter short.
     48        'admin'   | 'passs' // One letter longer.
     49        'admin'   | 'pass ' // Trailing space.
     50        'admin'   | '*'     // Star Wildcard.
     51        'admin'   | '%'     // Percentage Wildcard.
     52        'admin'   | '.'     // Dot Wildcard.
     53        'admin'   | 'pas*'  // Star Wildcard in pattern.
     54        'admin'   | 'pas%'  // Percentage Wildcard in pattern.
     55        'bogus'   | 'pass'  /* Bogus Username. */
     56        ''        | 'pass'  // Blank
     57        'ADMIN'   | 'pass'  // Capitals
     58        'Admin'   | 'pass'  // First Capital.
     59        'admiN'   | 'pass'  // Last Capital.
     60        'admi'    | 'pass'  // One letter short.
     61        'adminn'  | 'pass'  // One letter longer.
     62        //'admin '  | 'pass' // Trailing space.
     63        '*'       | 'pass'  // Star Wildcard.
     64        '%'       | 'pass'  // Percentage Wildcard.
     65        '.'       | 'pass'     // Dot Wildcard.
     66        'admi*'   | 'pass'  // Star Wildcard in pattern.
     67        'admi%'   | 'pass'  // Percentage Wildcard in pattern.
    4168    }
    4269
Note: See TracChangeset for help on using the changeset viewer.