File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
step-definitions/radio-steps Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,17 @@ Feature: Letcode Radio Page
4545 When I click radio page
4646 And I check and print which option is selected
4747
48+ Examples :
49+ | |
50+ | |
51+
52+ @regression @radio
53+ Scenario Outline : As a user, I can verify that last option is disabled
54+
55+ Given I am on letcode workspace page
56+ When I click radio page
57+ And I verify that last radio option is disabled
58+
4859 Examples :
4960 | |
5061 | |
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ class RadioPage extends Page {
88 get radioNoBugOption ( ) { return $ ( `//input[@id='nobug']` ) } ;
99 get radioBugOption ( ) { return $ ( `//input[@id='bug']` ) } ;
1010 get fooBarOptions ( ) { return $$ ( `//input[@name='foobar']` ) } ;
11+ get disabledOptions ( ) { return $$ ( `//input[@id='maybe']` ) } ;
1112
1213 //1. select one radio option
1314 async selectFirstRadio ( ) {
@@ -72,6 +73,11 @@ class RadioPage extends Page {
7273 }
7374 }
7475
76+ async verifyRadioDisabled ( ) {
77+ const elmDisabledOptions = await this . disabledOptions ;
78+ await expect ( elmDisabledOptions ) . toBeDisabled ( ) ;
79+ }
80+
7581}
7682
7783export default new RadioPage ( ) ;
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ When(/^I confirm that both option of the third radio automation challenge is sel
3636await RadioPage . verifyRadioBug ( ) ;
3737} ) ;
3838
39+ //4. verify which option is selected
3940When ( / ^ I c h e c k a n d p r i n t w h i c h o p t i o n i s s e l e c t e d $ / , async ( ) => {
4041await RadioPage . printSelectedOption ( ) ;
4142} ) ;
43+
44+ //5. verify last radio option is disabled
45+ When ( / ^ I v e r i f y t h a t l a s t r a d i o o p t i o n i s d i s a b l e d $ / , async ( ) => {
46+ await RadioPage . verifyRadioDisabled ( ) ;
47+ } ) ;
You can’t perform that action at this time.
0 commit comments