From 9b84400aecb320840bcf3cf7f2fe07ceaa75cb99 Mon Sep 17 00:00:00 2001 From: Yuliya C Date: Thu, 15 Jan 2026 19:43:59 -0500 Subject: [PATCH 1/6] RF TC_01.001.04 to POM --- data/data.py | 14 +++++++++- data/endpoints.py | 3 ++- ..._blank_item_name_field_validation_rf_tn.py | 26 +++++++++++++++++++ ...est_blank_item_name_field_validation_yc.py | 7 +---- 4 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 tests/new_item/test_blank_item_name_field_validation_rf_tn.py diff --git a/data/data.py b/data/data.py index efe8b49d..28364713 100644 --- a/data/data.py +++ b/data/data.py @@ -6,4 +6,16 @@ class BaseConfigurationPageData: class ManageJenkinsData: STATUS_INFORMATION = ["System Information", "System Log", "Load Statistics", "About Jenkins"] - TOOLS_AND_ACTIONS = ["Reload Configuration from Disk", "Jenkins CLI", "Script Console", "Prepare for Shutdown"] \ No newline at end of file + TOOLS_AND_ACTIONS = ["Reload Configuration from Disk", "Jenkins CLI", "Script Console", "Prepare for Shutdown"] + +class ItemTypesData: + ITEM_TYPES = [ + "Freestyle project", + "Pipeline", + "Multi-configuration project", + "Folder", + "Multibranch Pipeline", + "Organization Folder", + ] +class NewItemPageData: + EMPTY_ITEM_NAME_VALIDATION_TEXT = "» This field cannot be empty, please enter a valid name" \ No newline at end of file diff --git a/data/endpoints.py b/data/endpoints.py index 1caacd9c..935d5fc1 100644 --- a/data/endpoints.py +++ b/data/endpoints.py @@ -5,4 +5,5 @@ class Endpoints: JOB_STATUS_PAGE_URL = lambda self, job_name: f"/job/{job_name}" MANAGE_URL = "/manage" SECURITY_REALM_URL = "/securityRealm/" - VIEW_ALL_PAGE_URL = "/view/all/" \ No newline at end of file + VIEW_ALL_PAGE_URL = "/view/all/" + ALL_NEW_JOB_URL = "/view/all/newJob" diff --git a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py new file mode 100644 index 00000000..f877bf64 --- /dev/null +++ b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py @@ -0,0 +1,26 @@ +from playwright.sync_api import expect +from locators.base_locators import BaseLocators +from locators.new_item_locators import NewItemLocators +from data.endpoints import Endpoints +from conftest import open_page +from pages.base_page import BasePage +from data.data import NewItemPageData +from data.data import ItemTypesData +import pytest + + + +class TestBlankFieldValidation: + locators = BaseLocators(), NewItemLocators() + endpoints = Endpoints() + + + @pytest.mark.parametrize("item_type", ItemTypesData.ITEM_TYPES) + def test_tc_01_001_04_blank_item_name_validation_1(self, open_page, page, item_type): + """TC_01.001.04 | New Item > Create a new item > Validation error when "Enter an item name" field is blank""" + + open_page(BasePage, self.endpoints.ALL_NEW_JOB_URL) + page.get_by_text(item_type, exact=True).click() + expect(page.get_by_text(NewItemPageData.EMPTY_ITEM_NAME_VALIDATION_TEXT, exact=True)).to_be_visible() + expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() + diff --git a/tests/old_tests/test_blank_item_name_field_validation_yc.py b/tests/old_tests/test_blank_item_name_field_validation_yc.py index 561b1f70..a9dd1c41 100644 --- a/tests/old_tests/test_blank_item_name_field_validation_yc.py +++ b/tests/old_tests/test_blank_item_name_field_validation_yc.py @@ -46,9 +46,4 @@ def test_tc_01_001_04(page): page.get_by_text(item_type_text_organization_folder, exact=True).click() expect(page.locator(validation_message)).to_be_visible() - expect(page.locator(ok_btn_loc)).to_be_disabled() - - - - - + expect(page.locator(ok_btn_loc)).to_be_disabled() \ No newline at end of file From 62edeb1ae2ac0ae44a1222e7c7a33ebf6c19508e Mon Sep 17 00:00:00 2001 From: Yuliya C Date: Thu, 15 Jan 2026 19:53:11 -0500 Subject: [PATCH 2/6] RF TC_01.001.04 to POM --- data/data.py | 3 ++- data/endpoints.py | 2 +- tests/new_item/test_blank_item_name_field_validation_rf_tn.py | 3 +-- tests/old_tests/test_blank_item_name_field_validation_yc.py | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/data/data.py b/data/data.py index 28364713..31e4f3e3 100644 --- a/data/data.py +++ b/data/data.py @@ -17,5 +17,6 @@ class ItemTypesData: "Multibranch Pipeline", "Organization Folder", ] + class NewItemPageData: - EMPTY_ITEM_NAME_VALIDATION_TEXT = "» This field cannot be empty, please enter a valid name" \ No newline at end of file + EMPTY_ITEM_NAME_VALIDATION_TEXT = "» This field cannot be empty, please enter a valid name" diff --git a/data/endpoints.py b/data/endpoints.py index 935d5fc1..0d6d8824 100644 --- a/data/endpoints.py +++ b/data/endpoints.py @@ -6,4 +6,4 @@ class Endpoints: MANAGE_URL = "/manage" SECURITY_REALM_URL = "/securityRealm/" VIEW_ALL_PAGE_URL = "/view/all/" - ALL_NEW_JOB_URL = "/view/all/newJob" + ALL_NEW_JOB_URL = "/view/all/newJob" \ No newline at end of file diff --git a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py index f877bf64..1e8bd489 100644 --- a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py +++ b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py @@ -22,5 +22,4 @@ def test_tc_01_001_04_blank_item_name_validation_1(self, open_page, page, item_t open_page(BasePage, self.endpoints.ALL_NEW_JOB_URL) page.get_by_text(item_type, exact=True).click() expect(page.get_by_text(NewItemPageData.EMPTY_ITEM_NAME_VALIDATION_TEXT, exact=True)).to_be_visible() - expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() - + expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() \ No newline at end of file diff --git a/tests/old_tests/test_blank_item_name_field_validation_yc.py b/tests/old_tests/test_blank_item_name_field_validation_yc.py index a9dd1c41..b9f47864 100644 --- a/tests/old_tests/test_blank_item_name_field_validation_yc.py +++ b/tests/old_tests/test_blank_item_name_field_validation_yc.py @@ -16,7 +16,6 @@ def test_tc_01_001_04(page): ok_btn_loc = "button[id='ok-button']" validation_message = "#itemname-required" - page.locator(new_item_btn_loc).click() page.get_by_text(item_type_text_freestyle_project, exact=True).click() From 4ea991a5459ae49883df8496dbfbc4c9f83f7474 Mon Sep 17 00:00:00 2001 From: Yuliya C Date: Thu, 15 Jan 2026 20:09:34 -0500 Subject: [PATCH 3/6] RF TC_01.001.04 to POM --- data/data.py | 1 + data/endpoints.py | 2 +- tests/new_item/test_blank_item_name_field_validation_rf_tn.py | 2 +- tests/old_tests/test_blank_item_name_field_validation_yc.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/data.py b/data/data.py index 31e4f3e3..c95b86bd 100644 --- a/data/data.py +++ b/data/data.py @@ -20,3 +20,4 @@ class ItemTypesData: class NewItemPageData: EMPTY_ITEM_NAME_VALIDATION_TEXT = "» This field cannot be empty, please enter a valid name" + diff --git a/data/endpoints.py b/data/endpoints.py index 0d6d8824..935d5fc1 100644 --- a/data/endpoints.py +++ b/data/endpoints.py @@ -6,4 +6,4 @@ class Endpoints: MANAGE_URL = "/manage" SECURITY_REALM_URL = "/securityRealm/" VIEW_ALL_PAGE_URL = "/view/all/" - ALL_NEW_JOB_URL = "/view/all/newJob" \ No newline at end of file + ALL_NEW_JOB_URL = "/view/all/newJob" diff --git a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py index 1e8bd489..afdb7762 100644 --- a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py +++ b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py @@ -22,4 +22,4 @@ def test_tc_01_001_04_blank_item_name_validation_1(self, open_page, page, item_t open_page(BasePage, self.endpoints.ALL_NEW_JOB_URL) page.get_by_text(item_type, exact=True).click() expect(page.get_by_text(NewItemPageData.EMPTY_ITEM_NAME_VALIDATION_TEXT, exact=True)).to_be_visible() - expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() \ No newline at end of file + expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() diff --git a/tests/old_tests/test_blank_item_name_field_validation_yc.py b/tests/old_tests/test_blank_item_name_field_validation_yc.py index b9f47864..84a280c6 100644 --- a/tests/old_tests/test_blank_item_name_field_validation_yc.py +++ b/tests/old_tests/test_blank_item_name_field_validation_yc.py @@ -45,4 +45,4 @@ def test_tc_01_001_04(page): page.get_by_text(item_type_text_organization_folder, exact=True).click() expect(page.locator(validation_message)).to_be_visible() - expect(page.locator(ok_btn_loc)).to_be_disabled() \ No newline at end of file + expect(page.locator(ok_btn_loc)).to_be_disabled() From 2332be3a98116dbfd532c250014e12878e2e368b Mon Sep 17 00:00:00 2001 From: Yuliya C Date: Thu, 15 Jan 2026 20:15:18 -0500 Subject: [PATCH 4/6] RF TC_01.001.04 to POM --- data/data.py | 1 - data/endpoints.py | 2 +- tests/new_item/test_blank_item_name_field_validation_rf_tn.py | 2 +- tests/old_tests/test_blank_item_name_field_validation_yc.py | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/data/data.py b/data/data.py index c95b86bd..31e4f3e3 100644 --- a/data/data.py +++ b/data/data.py @@ -20,4 +20,3 @@ class ItemTypesData: class NewItemPageData: EMPTY_ITEM_NAME_VALIDATION_TEXT = "» This field cannot be empty, please enter a valid name" - diff --git a/data/endpoints.py b/data/endpoints.py index 935d5fc1..0d6d8824 100644 --- a/data/endpoints.py +++ b/data/endpoints.py @@ -6,4 +6,4 @@ class Endpoints: MANAGE_URL = "/manage" SECURITY_REALM_URL = "/securityRealm/" VIEW_ALL_PAGE_URL = "/view/all/" - ALL_NEW_JOB_URL = "/view/all/newJob" + ALL_NEW_JOB_URL = "/view/all/newJob" \ No newline at end of file diff --git a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py index afdb7762..1e8bd489 100644 --- a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py +++ b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py @@ -22,4 +22,4 @@ def test_tc_01_001_04_blank_item_name_validation_1(self, open_page, page, item_t open_page(BasePage, self.endpoints.ALL_NEW_JOB_URL) page.get_by_text(item_type, exact=True).click() expect(page.get_by_text(NewItemPageData.EMPTY_ITEM_NAME_VALIDATION_TEXT, exact=True)).to_be_visible() - expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() + expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() \ No newline at end of file diff --git a/tests/old_tests/test_blank_item_name_field_validation_yc.py b/tests/old_tests/test_blank_item_name_field_validation_yc.py index 84a280c6..b9f47864 100644 --- a/tests/old_tests/test_blank_item_name_field_validation_yc.py +++ b/tests/old_tests/test_blank_item_name_field_validation_yc.py @@ -45,4 +45,4 @@ def test_tc_01_001_04(page): page.get_by_text(item_type_text_organization_folder, exact=True).click() expect(page.locator(validation_message)).to_be_visible() - expect(page.locator(ok_btn_loc)).to_be_disabled() + expect(page.locator(ok_btn_loc)).to_be_disabled() \ No newline at end of file From c272e0ef227bae57f81e9c7c932b745b88c98532 Mon Sep 17 00:00:00 2001 From: Yuliya C Date: Thu, 15 Jan 2026 20:20:52 -0500 Subject: [PATCH 5/6] RF TC_01.001.04 to POM --- data/data.py | 2 +- data/endpoints.py | 2 +- tests/new_item/test_blank_item_name_field_validation_rf_tn.py | 2 +- tests/old_tests/test_blank_item_name_field_validation_yc.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/data.py b/data/data.py index 31e4f3e3..2371b0f4 100644 --- a/data/data.py +++ b/data/data.py @@ -19,4 +19,4 @@ class ItemTypesData: ] class NewItemPageData: - EMPTY_ITEM_NAME_VALIDATION_TEXT = "» This field cannot be empty, please enter a valid name" + EMPTY_ITEM_NAME_VALIDATION_TEXT = "» This field cannot be empty, please enter a valid name" \ No newline at end of file diff --git a/data/endpoints.py b/data/endpoints.py index 0d6d8824..935d5fc1 100644 --- a/data/endpoints.py +++ b/data/endpoints.py @@ -6,4 +6,4 @@ class Endpoints: MANAGE_URL = "/manage" SECURITY_REALM_URL = "/securityRealm/" VIEW_ALL_PAGE_URL = "/view/all/" - ALL_NEW_JOB_URL = "/view/all/newJob" \ No newline at end of file + ALL_NEW_JOB_URL = "/view/all/newJob" diff --git a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py index 1e8bd489..afdb7762 100644 --- a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py +++ b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py @@ -22,4 +22,4 @@ def test_tc_01_001_04_blank_item_name_validation_1(self, open_page, page, item_t open_page(BasePage, self.endpoints.ALL_NEW_JOB_URL) page.get_by_text(item_type, exact=True).click() expect(page.get_by_text(NewItemPageData.EMPTY_ITEM_NAME_VALIDATION_TEXT, exact=True)).to_be_visible() - expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() \ No newline at end of file + expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() diff --git a/tests/old_tests/test_blank_item_name_field_validation_yc.py b/tests/old_tests/test_blank_item_name_field_validation_yc.py index b9f47864..84a280c6 100644 --- a/tests/old_tests/test_blank_item_name_field_validation_yc.py +++ b/tests/old_tests/test_blank_item_name_field_validation_yc.py @@ -45,4 +45,4 @@ def test_tc_01_001_04(page): page.get_by_text(item_type_text_organization_folder, exact=True).click() expect(page.locator(validation_message)).to_be_visible() - expect(page.locator(ok_btn_loc)).to_be_disabled() \ No newline at end of file + expect(page.locator(ok_btn_loc)).to_be_disabled() From 91c63b17bf1609f49ec0e151cdf340710f977577 Mon Sep 17 00:00:00 2001 From: Yuliya C Date: Thu, 15 Jan 2026 20:23:48 -0500 Subject: [PATCH 6/6] RF TC_01.001.04 to POM --- data/data.py | 2 +- data/endpoints.py | 2 +- tests/new_item/test_blank_item_name_field_validation_rf_tn.py | 2 +- tests/old_tests/test_blank_item_name_field_validation_yc.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/data.py b/data/data.py index 2371b0f4..31e4f3e3 100644 --- a/data/data.py +++ b/data/data.py @@ -19,4 +19,4 @@ class ItemTypesData: ] class NewItemPageData: - EMPTY_ITEM_NAME_VALIDATION_TEXT = "» This field cannot be empty, please enter a valid name" \ No newline at end of file + EMPTY_ITEM_NAME_VALIDATION_TEXT = "» This field cannot be empty, please enter a valid name" diff --git a/data/endpoints.py b/data/endpoints.py index 935d5fc1..0d6d8824 100644 --- a/data/endpoints.py +++ b/data/endpoints.py @@ -6,4 +6,4 @@ class Endpoints: MANAGE_URL = "/manage" SECURITY_REALM_URL = "/securityRealm/" VIEW_ALL_PAGE_URL = "/view/all/" - ALL_NEW_JOB_URL = "/view/all/newJob" + ALL_NEW_JOB_URL = "/view/all/newJob" \ No newline at end of file diff --git a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py index afdb7762..1e8bd489 100644 --- a/tests/new_item/test_blank_item_name_field_validation_rf_tn.py +++ b/tests/new_item/test_blank_item_name_field_validation_rf_tn.py @@ -22,4 +22,4 @@ def test_tc_01_001_04_blank_item_name_validation_1(self, open_page, page, item_t open_page(BasePage, self.endpoints.ALL_NEW_JOB_URL) page.get_by_text(item_type, exact=True).click() expect(page.get_by_text(NewItemPageData.EMPTY_ITEM_NAME_VALIDATION_TEXT, exact=True)).to_be_visible() - expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() + expect(page.locator(BaseLocators.OK_BUTTON)).to_be_disabled() \ No newline at end of file diff --git a/tests/old_tests/test_blank_item_name_field_validation_yc.py b/tests/old_tests/test_blank_item_name_field_validation_yc.py index 84a280c6..b9f47864 100644 --- a/tests/old_tests/test_blank_item_name_field_validation_yc.py +++ b/tests/old_tests/test_blank_item_name_field_validation_yc.py @@ -45,4 +45,4 @@ def test_tc_01_001_04(page): page.get_by_text(item_type_text_organization_folder, exact=True).click() expect(page.locator(validation_message)).to_be_visible() - expect(page.locator(ok_btn_loc)).to_be_disabled() + expect(page.locator(ok_btn_loc)).to_be_disabled() \ No newline at end of file