From 3571f5fb0fc118f913fea9d0464d2857b94eb771 Mon Sep 17 00:00:00 2001 From: dengqichen Date: Thu, 6 Mar 2025 13:21:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E4=BB=B6=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/pages/LongiMainPage.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/pages/LongiMainPage.js b/tests/pages/LongiMainPage.js index 408e59c..fa4f185 100644 --- a/tests/pages/LongiMainPage.js +++ b/tests/pages/LongiMainPage.js @@ -341,7 +341,7 @@ class LongiMainPage extends BasePage { * @returns {Promise} 三级菜单项数组 * @private */ - async getThirdLevelMenus(parentMenu) { + async findThirdLevelMenus(parentMenu) { // 检查三级菜单是否存在 const elements = await this.page.locator('.el-popper.is-light.el-popover .menuTitle.canClick').all(); if (elements.length === 0) { @@ -379,7 +379,7 @@ class LongiMainPage extends BasePage { await this.page.waitForTimeout(500); // 2. 获取三级菜单列表 - const thirdMenus = await this.getThirdLevelMenus(menu); + const thirdMenus = await this.findThirdLevelMenus(menu); if (thirdMenus.length === 0) { console.log(`未找到三级菜单项`); return; @@ -455,7 +455,7 @@ class LongiMainPage extends BasePage { } console.log(`📑 ${menu.text} 找到 ${tabs.length} 个TAB页`); - const tabInfos = await this.getTabInfos(tabs); + const tabInfos = await this.findTabInfos(tabs); for (const tabInfo of tabInfos) { if (!tabInfo.isActive) { @@ -475,7 +475,7 @@ class LongiMainPage extends BasePage { * @returns {Promise} TAB页信息数组 * @private */ - async getTabInfos(tabs) { + async findTabInfos(tabs) { return Promise.all( tabs.map(async element => ({ text: await this.getTextByElement(element),