예제 #1
0
def test_user_creation():
    client = logged_in_client()

    # launch useradmin
    client.click(id='hue-useradmin-menu')
    client.waits.forElement(jquery='(".useradmin")[0]', timeout='2000')

    # click add user and add "windmill_joe" user
    client.click(jquery="('.useradmin_add_user')[0]")
    client.type(text='windmill_joe', id='id_username')
    client.type(text='windmill', id='id_password1')
    client.type(text='windmill', id='id_password2')
    client.click(value='Save')
    # verify user is in list
    client.waits.forElement(classname='useradmin_userlist', timeout='2000')
    client.asserts.assertTextIn(classname='useradmin_userlist',
                                validator='windmill_joe')

    # log in as windmill_joe
    logout(client)

    client = logged_in_client(user='******', passwd='windmill')
    logout(client)

    client = logged_in_client()

    # launch useradmin
    client.click(id='hue-useradmin-menu')
    client.waits.forElement(jquery='(".useradmin")[0]', timeout='2000')

    # delete the user
    client.click(jquery="('tr:contains(windmill_joe) .delete:last')[0]")
    client.click(jquery="('.useradmin .closeWin')[1]")

    # verify user is NOT in list
    client.waits.forElement(classname='useradmin_userlist', timeout='2000')
    client.asserts.assertNotTextIn(classname='useradmin_userlist',
                                   validator='windmill_joe')
예제 #2
0
def test_user_creation():
  client = logged_in_client()

  # launch useradmin
  client.click(id='ccs-useradmin-menu')
  client.waits.forElement(jquery='(".useradmin")[0]', timeout='2000')

  # click add user and add "windmill_joe" user
  client.click(jquery="('.useradmin_add_user')[0]")
  client.type(text='windmill_joe', id='id_username')
  client.type(text='windmill', id='id_password1')
  client.type(text='windmill', id='id_password2')
  client.click(value='Save')
  # verify user is in list
  client.waits.forElement(classname='useradmin_userlist', timeout='2000')
  client.asserts.assertTextIn(classname='useradmin_userlist', validator='windmill_joe')

  # log in as windmill_joe
  logout(client)

  client = logged_in_client(user='******', passwd='windmill')
  logout(client)

  client = logged_in_client()

  # launch useradmin
  client.click(id='ccs-useradmin-menu')
  client.waits.forElement(jquery='(".useradmin")[0]', timeout='2000')

  # delete the user
  client.click(jquery="('tr:contains(windmill_joe) .delete:last')[0]")
  client.click(jquery="('.useradmin .closeWin')[1]")

  # verify user is NOT in list
  client.waits.forElement(classname='useradmin_userlist', timeout='2000')
  client.asserts.assertNotTextIn(classname='useradmin_userlist', validator='windmill_joe')
예제 #3
0
def test_login_and_logout():
    client = logged_in_client()
    # TODO: there's some race condition here :(
    time.sleep(2.5)
    logout(client)
예제 #4
0
def test_login_and_logout():
    client = logged_in_client()
    # TODO: there's some race condition here :(
    time.sleep(2.5)
    logout(client)