添加allure标注
This commit is contained in:
@@ -2,6 +2,7 @@ from pathlib import Path
|
||||
import re
|
||||
import sys
|
||||
|
||||
import allure
|
||||
import pytest
|
||||
from playwright.sync_api import expect
|
||||
|
||||
@@ -15,6 +16,9 @@ from utils.logger import get_logger
|
||||
logger = get_logger(__name__)
|
||||
|
||||
|
||||
@allure.feature("FAQ")
|
||||
@allure.story("FAQ页面内容")
|
||||
@allure.title("校验 FAQ 页面核心内容和分类链接可见")
|
||||
def test_faq_page_key_content_visible(page):
|
||||
logger.info("使用 pytest-playwright 统一无头浏览器配置")
|
||||
|
||||
@@ -31,6 +35,9 @@ def test_faq_page_key_content_visible(page):
|
||||
assert faq_links.count() > 0
|
||||
|
||||
|
||||
@allure.feature("FAQ")
|
||||
@allure.story("FAQ分类详情")
|
||||
@allure.title("校验 FAQ 分类详情链接可见且地址格式正确")
|
||||
def test_faq_category_detail_link_visible(page):
|
||||
logger.info("使用 pytest-playwright 统一无头浏览器配置")
|
||||
|
||||
@@ -47,6 +54,9 @@ def test_faq_category_detail_link_visible(page):
|
||||
assert re.match(r"/faq/\d+(\?.*)?$", faq_detail_href)
|
||||
|
||||
|
||||
@allure.feature("FAQ")
|
||||
@allure.story("提交问题")
|
||||
@allure.title("游客提交 FAQ 问题表单成功")
|
||||
def test_faq_submit_question_form_success(page, ensure_guest_user):
|
||||
logger.info("打开 FAQ 页面")
|
||||
page.goto("/faq", wait_until="domcontentloaded")
|
||||
|
||||
Reference in New Issue
Block a user