Coder Social home page Coder Social logo

splunk / addon-factory-smartx-ui-test-library Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 3.0 5.61 MB

UI test module to test UCC-based Technology Add-ons

Home Page: https://splunk.github.io/addon-factory-smartx-ui-test-library/

License: Apache License 2.0

Python 99.78% Shell 0.22%

addon-factory-smartx-ui-test-library's Introduction

Splunk OCSF Extension

The Splunk schema extension repository

addon-factory-smartx-ui-test-library's People

Contributors

anilvaza-crest avatar arjunkhunti-crest avatar artemrys avatar dependabot[bot] avatar dhruvanshus-crest avatar dkaras-splunk avatar harshilgajera-crest avatar harshpatel-crest avatar harshshah2-crest avatar hetangmodi-crest avatar jayjoshi-crest avatar kkania-splunk avatar mkolasinski-splunk avatar monishshah-crest avatar nariyanibhargav avatar pdudhaiya-crest avatar rajkarkar-crest avatar renovate[bot] avatar rohanm-crest avatar ryanfaircloth avatar seanmalloy-crest avatar semantic-release-bot avatar srv-rr-github-token avatar uoboda-splunk avatar vtsvetkov-splunk avatar yashs-crest avatar zahrasidhpuri-crest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

addon-factory-smartx-ui-test-library's Issues

Feature Request: Add support for clear_text() function for multipleSelect field

The following test case for the multipleSelect field will not work as it should and will result in failure.

In the below test case, the multi_select field is of type multipleSelect with the list of values ["Device1", "Device2", "Device3", "Alert1", "Alert2"]. It will first list values starting with "Device", then try to search the list of values with "DeviceAlert". Ideally, it should first list the values starting with "Device", then list values starting with "Alert".

 def test_inputs_multiple_select_field(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """
        Check the list of options for the 'multi_select' field
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.inputs_dropdown.select(const.INPUT_TYPE)
        input_page.test_entity.account.wait_for_values()

        self.assert_util(
            len(
                input_page.test_entity.multi_select.search_get_list(
                    "Device"
                )
            ),
            3,
        )
		self.assert_util(
            len(
                input_page.test_entity.multi_select.search_get_list(
                    "Alert"
                )
            ),
            2,
        )

Cause:
For multipleSelect component, there is no method to clear the search textbox in multi_select.py file.

Adding this function in multi_select.py will solve this issue.

def clear_text(self):
    """
    Clears the search box value in the multi-select field
    """
    self.input.clear()

Updated Test Case

 def test_inputs_multiple_select_field(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """
        Check the list of options for the 'multi_select' field
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.inputs_dropdown.select(const.INPUT_TYPE)
        input_page.test_entity.account.wait_for_values()

        self.assert_util(
            len(
                input_page.test_entity.multi_select.search_get_list(
                    "Device"
                )
            ),
            3,
        )
		# updated test case with clear_text() function
		input_page.test_entity.multi_select.clear_text()
		self.assert_util(
            len(
                input_page.test_entity.multi_select.search_get_list(
                    "Alert"
                )
            ),
            2,
        )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.