From b524b32bd2bede730492f4ea324c34e77db518f5 Mon Sep 17 00:00:00 2001 From: Lukas Hellebrandt Date: Mon, 11 Mar 2024 16:21:51 +0100 Subject: [PATCH] Add test for Webpack 5 presence --- tests/foreman/sys/test_webpack.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/foreman/sys/test_webpack.py diff --git a/tests/foreman/sys/test_webpack.py b/tests/foreman/sys/test_webpack.py new file mode 100644 index 00000000000..c9df1c5a98a --- /dev/null +++ b/tests/foreman/sys/test_webpack.py @@ -0,0 +1,28 @@ +"""Test class for Webpack + +:CaseAutomation: Automated + +:CaseComponent: Packaging + +:Team: Endeavour + +:CaseImportance: High + +""" +import pytest + + +@pytest.mark.tier2 +def test_positive_webpack5(target_sat): + """Check whether Webpack 5 was used at packaging time + + :id: b7f3fbb2-ef4b-4634-877f-b8ea10373e04 + + :expectedresults: There is a file "public/webpack/foreman_tasks/foreman_tasks_remoteEntry.js" when Webpack 5 has been used. It used to be "public/webpack/foreman-tasks-.js" before. + """ + assert ( + target_sat.execute( + "find /usr/share/gems | grep public/webpack/foreman_tasks/foreman_tasks_remoteEntry.js" + ).status + == 0 + )