示例#1
0
def test_03_remove_product_by_its_name(browser):
    AdminLoginPage(browser).login()
    SecurityNotification(browser).close()
    DashBoardPage(browser).navigate_to_products()
    ProductsPage(browser).delete_product_by_name(config.PRODUCT_NAME)
    assert ProductsPage(browser).is_product_present(config.PRODUCT_NAME) is False, "{0} was removed successfully".format(
        config.PRODUCT_NAME)
示例#2
0
def test_02_update_product_model(browser):
    AdminLoginPage(browser).login()
    SecurityNotification(browser).close()
    DashBoardPage(browser).navigate_to_products()
    ProductsPage(browser).update_product_model(config.PRODUCT_NAME, config.PRODUCT_MODEL_NEW)
    assert ProductsPage(browser).get_product_model(
        config.PRODUCT_NAME) == config.PRODUCT_MODEL_NEW, "{0} was updated successfully".format(config.PRODUCT_NAME)
示例#3
0
def test_01_add_new_product(browser):
    AdminLoginPage(browser).login()
    SecurityNotification(browser).close()
    DashBoardPage(browser).navigate_to_products()
    ProductsPage(browser).add_new_product(config.PRODUCT_NAME, config.PRODUCT_TAG, config.PRODUCT_MODEL, config.PRODUCT_IMAGE)
    assert ProductsPage(browser).is_product_present(config.PRODUCT_NAME) is True, "{0} was added successfully".format(
        config.PRODUCT_NAME)
示例#4
0
def test_02_update_product_model(remote):
    browser = remote
    AdminLoginPage(browser).login()
    SecurityNotification(browser).close()
    DashBoardPage(browser).navigate_to_products()
    ProductsPage(browser).update_product_model(PRODUCT_NAME, PRODUCT_MODEL_NEW)
    assert ProductsPage(browser).get_product_model(
        PRODUCT_NAME
    ) == PRODUCT_MODEL_NEW, "{0} was updated successfully".format(PRODUCT_NAME)
    browser_console_error_check(browser)
示例#5
0
def test_04_add_new_product(browserstack):
    browser = browserstack
    AdminLoginPage(browser).login()
    SecurityNotification(browser).close()
    DashBoardPage(browser).navigate_to_products()
    ProductsPage(browser).add_new_product(PRODUCT_NAME, PRODUCT_TAG,
                                          PRODUCT_MODEL, PRODUCT_IMAGE)
    assert ProductsPage(browser).is_product_present(
        PRODUCT_NAME) is True, "{0} was added successfully".format(
            PRODUCT_NAME)
    browser_console_error_check(browserstack)