From patchwork Mon Oct 30 22:25:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 33141 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 490CCC4167D for ; Mon, 30 Oct 2023 22:25:36 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.173126.1698704733261293417 for ; Mon, 30 Oct 2023 15:25:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=bgdxoAV8; 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 F1B859C3231 for ; Mon, 30 Oct 2023 18:25:31 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id fGK8hNPN-abo; Mon, 30 Oct 2023 18:25:31 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 416709C0C62; Mon, 30 Oct 2023 18:25:31 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 416709C0C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1698704731; bh=hoj5Z+H1lnrzriSY58HGeJeI91BUA3QSPERLn9+Zrs0=; h=From:To:Date:Message-Id:MIME-Version; b=bgdxoAV8H93Wq1E6HITYhfqRAgtTDl24lj0Z2t/I+M7vQMvec/O/vSkHXxMRnMbY0 HOH5DqOP33X8bnly6qMUlhgiPzZ6eRBTcvZ4jYqC6DYlSsN3VDNHy8S2H8paOTtZv5 3lGDbz8HP4bsAEqHS2/PB3CCE7mEpQzg64Ae/una5xB+b+gt6RTz7+UzSsY22eNP81 CTSz3B5BS5QTfuWEDB/k8JduQeYOCzf99Sl9xjmWJvILYCjWx8eIKsq+UGssYc/eol lLRt6Ex8qxbkHAvB2kxidnQWmdzF+YepWGIaLkpPx3Y8btePd9wt/ZvnNa8FIw4O7q YSn5xIyrB6djg== 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 NWh367WTCG7X; Mon, 30 Oct 2023 18:25:31 -0400 (EDT) Received: from localhost.localdomain (unknown [192.168.51.254]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 5ED9D9C091F; Mon, 30 Oct 2023 18:25:30 -0400 (EDT) From: Alassane Yattara To: toaster@lists.yoctoproject.org Cc: Alassane Yattara Subject: [PATCH 2/3] Toaster: Test documentation link in landing header is displayed Date: Mon, 30 Oct 2023 23:25:12 +0100 Message-Id: <20231030222513.403014-2-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231030222513.403014-1-alassane.yattara@savoirfairelinux.com> References: <20231030222513.403014-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 ; Mon, 30 Oct 2023 22:25:36 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/5913 - check that the documentation link is visible - check browser open new tab toaster manual when clicking on the documentation link Signed-off-by: Alassane Yattara Reviewed-by: Tim Orling --- lib/toaster/tests/browser/test_landing_page.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/toaster/tests/browser/test_landing_page.py b/lib/toaster/tests/browser/test_landing_page.py index 2f092400..e731af22 100644 --- a/lib/toaster/tests/browser/test_landing_page.py +++ b/lib/toaster/tests/browser/test_landing_page.py @@ -46,6 +46,21 @@ class TestLandingPage(SeleniumTestCase): self.assertTrue(info_modal.is_displayed()) self.assertTrue("Toaster version information" in info_modal.text) + def test_documentation_link_displayed(self): + """ Test that the documentation link is displayed """ + self.get(reverse('landing')) + documentation_link = self.find('#navbar-docs > a') + + # check that the documentation link is visible + self.assertTrue(documentation_link.is_displayed()) + + # check browser open new tab toaster manual when clicking on the documentation link + self.assertEqual(documentation_link.get_attribute('target') , '_blank') + self.assertEqual( + documentation_link.get_attribute('href'), + 'http://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual') + self.assertTrue("Documentation" in documentation_link.text) + def test_only_default_project(self): """ No projects except default