Full Smoke Suite
Sat Oct 29 2022 07:40:48 GMT+0000 (Coordinated Universal Time)
Feature: Smoke Scenario: User Login Given I open the url "/" When I set "dancefront6@gmail.com" to the inputfield "//input[@type='email']" And I set "te$t$tudent" to the inputfield "//input[@type='password']" And I click on the button "//button" And I pause for 1000ms Then I expect that element "//i[@class='fa fa-sign-out']" is displayed # The Logout icon is displayed Scenario: User Searches for a Song When I set "Ketsa" to the inputfield "//input[@name='q']" And I pause for 2000ms Then I expect that container "//section[@class='songs']//span[@class='details']" contains the text "Ketsa" # There is a bug in the framework - only 'container' type works here Scenario: User Plays a Song Given I open the url "#!/songs" # Easier way to start the playback is from All Songs page And I doubleclick on the button "//section[@id='songsWrapper']//td[@class='title']" # Double click is handy here And I pause for 2000ms Then I expect that element "//button[@data-testid='toggle-visualizer-btn']" is displayed # Equalizer is a solid way of checking the playback without listening the music Scenario: User Creates a Playlist When I click on the element "//i[@class='fa fa-plus-circle create']" And I pause for 1000ms And I click on the element "//li[@data-testid='playlist-context-menu-create-simple']" And I pause for 1000ms And I set "aa" to the inputfield "//input[@name='name']" And I press "Enter" # This is how you can press an any key on a keyboard And I pause for 2000ms Then I expect that element "//a[text()='aa']" is displayed # Better use a text in this case since you only know that Scenario: User Adds a Song to a Playlist Given I open the url "#!/songs" # Easier way to add a song to the playback is from All Songs page When I click on the element "//tr[@class='song-item']" # It is always a first not playing song in this case And I pause for 1000ms And I click on the element "//button[@class='btn-add-to']" And I pause for 2000ms And I click on the element "//section[@id='songsWrapper']//li[contains(text(), 'aa')]" # Partial text here since names have extra spaces in the list for some reason And I pause for 1000ms And I click on the element "//a[text()='aa']" And I pause for 1000ms Then I expect that container "//section[@id='playlistWrapper']//td[@class='title']" contains the text "Ketsa - That_s a Beat" Scenario: User Removes a Song from a Playlist Given I click on the element "//a[text()='aa']" And I pause for 1000ms When I click on the element "//section[@id='playlistWrapper']//td[@class='title']" And I pause for 1000ms And I press "Delete" # This is a secret way of deleting songs since there are no such buttons anywhere And I pause for 1000ms Then I expect that container "//section[@id='playlistWrapper']//div[@class='text']" contains the text "The playlist is currently empty." Scenario: User Renames the Playlist When I doubleclick on the element "//a[text()='aa']" # The easiest way of getting to the rename functionality And I pause for 1000ms And I set "bb" to the inputfield "//input[@name='name']" # To change the name from 'aa' to 'bb' And I press "Enter" And I pause for 1000ms Then I expect that element "//a[text()='bb']" is displayed Scenario: User Deletes the Playlist When I click on the element "//button[@class='del btn-delete-playlist']" And I pause for 6000ms # It takes a while for those green messages to go away, so the Logout button is clickable Then I expect that element "//a[text()='bb']" is not displayed # You can also check for invisibility by adding 'not' Scenario: User Logout When I click on the button "//i[@class='fa fa-sign-out']" And I pause for 2000ms Then I expect that element "//input[@type='password']" is displayed # You can check that user is logged out when password field is shown
Comments