# author:qinguanglei
# ddate:2023/11/14 16:47
# 购买一个非序列号商品
import allure
import pytest
from test_buy.steps_buy import StepsBuy


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

    @allure.story('购买一个非序列号商品')
    def test_buy_one_nonseq_commodity(self):
        # 载入步骤集合
        steps_buy = StepsBuy(self.driver)
        # 打开浏览器
        steps_buy.open_browser()
        # 登录
        steps_buy.login()
        # 进入普通采购单页面
        steps_buy.enter_buy_op_page()
        # 进入新建单据界面
        steps_buy.enter_new_op_frame()
        # 输入供应商
        steps_buy.input_supplier()
