Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8172500

Create test for SwingSet SliderDemo

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P2
    • 9
    • None
    • client-libs
    • None
    • b161

    Backports

      Description

        Scenario to be automated and Review Comments:

        Horizontal Slider:
        Plain:
        1. Move slider 10 units forward.
        There are several ways to move slider. Shouldn't be a problem to check several. Mouse, keyboard operation and JSlider methods. Mouse includes dragging and clicking on the track. Keyboard has arrows, PageUp, PageDn, Home and End keys. No need to test everything on all sliders though.
        2. Assert slider value as 30 (20+10) (20 has been set as initial value)
        3. Move Slider to beginning
        4. Assert Slider value = -10
        5. Move Slider to end
        6. Assert Slider value = 100
        Major Ticks:
        1. Move slider 100 units forward
        2. Assert slider value as 500 (400+100) (400 has been set as initial value)
        3. Move Slider to beginning
        4. Assert Slider value = 100
        5. Move Slider to end
        6. Assert Slider value = 1000
        7. Check Major ticks
        I believe there is no way to check ticks and labels besides just verifying JSlider properties. But let's at least check them. Seems like this slider.
        We should check that value between ticks is selectable.
        Minor Ticks, Snap to ticks and Labels:
        1. Move slider 2 units forward
        2. Assert slider value as 8 (6+2) (6 has been set as initial value)
        3. Move Slider to beginning
        4. Assert Slider value = 0
        5. Move Slider to end
        6. Assert Slider value = 11
        7. Check Major ticks
        8. Check Minor ticks
        9. Check labels
        We should check that value between ticks snaps to ticks.
        Disabled Slider:
        1. Try to change the slider position
        2. Check that it has not changed
        We should also check that it doesn't receive focus.
         
        Vertical Slider:
        Plain:
        1. Move slider 10 units up
        2. Assert slider value as 30 (20+10) (20 has been set as initial value)
        3. Move Slider to bottom
        4. Assert Slider value = -10
        5. Move Slider to top
        6. Assert Slider value = 100
        Major Ticks:
        1. Move slider up 100 units
        2. Assert slider value as 500 (400 + 100) (400 has been set as initial value)
        3. Move Slider to bottom
        4. Assert Slider value = 100
        5. Move Slider to top
        6. Assert Slider value = 1000
        7. Check Major ticks
        Minor Ticks:
        1. Move Slider up 10 units
        2. Assert slider value as 70 (60+10) (60 has been set as initial value)
        3. Move Slider to bottom
        4. Assert Slider value = 0
        5. Move Slider to top
        6. Assert Slider value = 100
        7. Check Major ticks
        8. Check Minor ticks
        9. Check labels
        Disabled Slider:
        1. Try to change the slider position
        2. Check that it has not changed

        Attachments

          Issue Links

            Activity

              People

                vagarwal Vikrant Agarwal
                vagarwal Vikrant Agarwal
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: