# author:qinguanglei
# ddate:2023/11/22 9:47
import time

import allure
import pytest

from test_sell.steps_sell import StepsSell


@allure.feature('销售模块')
class TestSellOneNonseqCommodity(object):
    @pytest.fixture(scope='function', autouse=True)
    def housework(self, driver_fixture):
        # 驱动器从fixture传来
        self.driver = driver_fixture

    @allure.story('销售一个非序列号商品')
    def test_sell_one_nonseq_commodity(self):
        # 载入步骤集合
        steps_sell = StepsSell(self.driver)
        # 打开浏览器
        steps_sell.open_browser()
        # 登录
        steps_sell.login()
        # 进入销售订单页面
        steps_sell.enter_sell_so_page()
        # 进入新建单据界面
        steps_sell.enter_new_so_frame()
        # 输入客户
        steps_sell.input_custom()
        # 输入仓库
        # steps_buy.input_warehouse()
        # 输入合同协议
        # steps_buy.input_protocol()
        # 输入业务员员
        # steps_buy.input_businessman()
        # 添加商品
        # steps_buy.add_merchandise()
        # 商品明细处理
        # steps_buy.detail_proc()
        # 订单保存处理
        # steps_buy.save_proc()
        # 订单提交
        # steps_buy.submit_proc()
        time.sleep(15)
