From patchwork Thu Dec 14 22:11:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 36277 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F34B9C4167D for ; Thu, 14 Dec 2023 22:11:52 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.41703.1702591906673883375 for ; Thu, 14 Dec 2023 14:11:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=CNMCt8iw; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 0DDEA9C40EA for ; Thu, 14 Dec 2023 17:11:46 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id vhHQuh7S5svq; Thu, 14 Dec 2023 17:11:45 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id B2ECF9C3381; Thu, 14 Dec 2023 17:11:45 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com B2ECF9C3381 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1702591905; bh=M5wLagbeoxpV/uu+nXOXFAf9oLjSF68FgWgu69c7T/4=; h=From:To:Date:Message-Id:MIME-Version; b=CNMCt8iwjrhR5jkuTZVZtps91T7p/GxV0KSM5rppDXMFjnidLcRV4PiTZ9sDtHeKd p7V7iDuVjjl9imgkEHQiQYfwybsqxWOx0mgwH5nkAp88SHXREldEd4UEzDW6k+slaK KQeQNlGQjDMXnhmg7Njmxj5c49ikbpHgmk02d13eH1NqSPtrMZF2g7U9R2ataXqixj SIXegHych9nJt71FrPdafsEuu8vDZgwsLCJQt2RfLyvi01/qt9gqvt8v9EKsFwjnXO aDmIJBwx0+z3q51stoqRGGa12I7Jdc/p16Qy7zQKGTwqU8y6uRyCY3Fbe6Wc8XC3ZE A592sG4o4vquQ== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id wnnMkWTclvVW; Thu, 14 Dec 2023 17:11:45 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id E166F9C33C0; Thu, 14 Dec 2023 17:11:44 -0500 (EST) From: Alassane Yattara To: toaster@lists.yoctoproject.org Cc: Alassane Yattara Subject: [PATCH v2 3/6] toaster/test: Added skip to run test on ElementClickInterceptedException Date: Thu, 14 Dec 2023 23:11:29 +0100 Message-Id: <20231214221132.603532-3-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214221132.603532-1-alassane.yattara@savoirfairelinux.com> References: <20231214221132.603532-1-alassane.yattara@savoirfairelinux.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 14 Dec 2023 22:11:52 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/6104 On project layer page, element button(save changes for switch) not properly visible or just hidden by another element which cause follwing exception: ElementClickInterceptedException Signed-off-by: Alassane Yattara --- lib/toaster/tests/browser/test_layerdetails_page.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/toaster/tests/browser/test_layerdetails_page.py b/lib/toaster/tests/browser/test_layerdetails_page.py index 9c8fcded..5be4ba0c 100644 --- a/lib/toaster/tests/browser/test_layerdetails_page.py +++ b/lib/toaster/tests/browser/test_layerdetails_page.py @@ -8,7 +8,7 @@ # from django.urls import reverse -from selenium.common.exceptions import TimeoutException +from selenium.common.exceptions import ElementClickInterceptedException, TimeoutException from tests.browser.selenium_helpers import SeleniumTestCase from orm.models import Layer, Layer_Version, Project, LayerSource, Release @@ -114,6 +114,9 @@ class TestLayerDetailsPage(SeleniumTestCase): btn_save_chg_for_switch = self.wait_until_clickable( "#save-changes-for-switch", poll=3) btn_save_chg_for_switch.click() + except ElementClickInterceptedException: + self.skipTest( + "save-changes-for-switch click intercepted. Element not visible or maybe covered by another element.") except TimeoutException: self.skipTest( "save-changes-for-switch is not clickable within the specified timeout.") @@ -151,6 +154,9 @@ class TestLayerDetailsPage(SeleniumTestCase): btn_save_chg_for_switch = self.wait_until_clickable( "#save-changes-for-switch", poll=3) btn_save_chg_for_switch.click() + except ElementClickInterceptedException: + self.skipTest( + "save-changes-for-switch click intercepted. Element not properly visible or maybe behind another element.") except TimeoutException: self.skipTest( "save-changes-for-switch is not clickable within the specified timeout.")