Skip to content

Commit

Permalink
Merge pull request #20 from ThePalaceProject/refactoring
Browse files Browse the repository at this point in the history
Refactoring
  • Loading branch information
AEkaterina authored Nov 3, 2023
2 parents 97fba3e + 23d58c5 commit a502914
Show file tree
Hide file tree
Showing 22 changed files with 213 additions and 103 deletions.
51 changes: 26 additions & 25 deletions src/test/java/features/AudiobookLyrasis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Feature: Audiobooks in LYRASIS Reads
And Open the 3 chapter on toc audiobook screen and save the chapter name as 'chapterNameKey'
Then Audio player screen of book 'bookInfo' is opened
And Chapter name on audio player screen is equal to 'chapterNameKey' saved chapter name
And Pause button is present on audio player screen
When Select "2.0"X playback speed on playback speed audiobook screen
When Select "1.5"X playback speed on playback speed audiobook screen
And Tap play button on audio player screen
And Wait for 3 seconds
And Tap pause button on audio player screen
Then Play button is present on audio player screen
Expand All @@ -41,7 +41,8 @@ Feature: Audiobooks in LYRASIS Reads
When Open toc audiobook screen
And Open random chapter on toc audiobook screen and save chapter name as 'chapterNameKey2'
Then Audio player screen of book 'bookInfo' is opened
When Wait for 3 seconds
When Tap play button on audio player screen
And Wait for 3 seconds
And Tap pause button on audio player screen
Then Play button is present on audio player screen
When Save book play time as 'timeAhead' on audio player screen
Expand All @@ -61,9 +62,8 @@ Feature: Audiobooks in LYRASIS Reads
| Biblioboard |

@logout @returnBooks @tier1
Scenario: Navigate by Audiobook
# When Search 'available' book of distributor '<distributor>' and bookType 'AUDIOBOOK' and save as 'bookNameInfo'
When Search for "Pinocchio" and save bookName as 'bookNameInfo'
Scenario Outline: Navigate by Audiobook
When Search 'available' book of distributor '<distributor>' and bookType 'AUDIOBOOK' and save as 'bookNameInfo'
And Switch to 'Audiobooks' catalog tab
And Open AUDIOBOOK book with GET action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click GET action button on Book details screen
Expand All @@ -75,19 +75,19 @@ Feature: Audiobooks in LYRASIS Reads
And Skip ahead 15 seconds on audio player screen
And Tap pause button on audio player screen
Then Play button is present on audio player screen
And Playback has been moved forward by 15 seconds from 'timeAhead' and 'chapterTimeKey' seconds on audio player screen
And Playback has been moved forward by 30 seconds from 'timeAhead' and 'chapterTimeKey' seconds on audio player screen
When Save book play time as 'timeBehind' on audio player screen
And Skip behind 15 seconds on audio player screen
And Tap pause button on audio player screen
Then Play button is present on audio player screen
And Playback has been moved behind by 15 seconds from 'timeBehind' and 'chapterTimeKey' seconds on audio player screen
And Playback has been moved behind by 30 seconds from 'timeBehind' and 'chapterTimeKey' seconds on audio player screen

# Scenarios:
# | distributor |
# | Bibliotheca |
# | Palace Marketplace |
# | Axis 360 |
# | Biblioboard |
Scenarios:
| distributor |
| Bibliotheca |
| Palace Marketplace |
| Axis 360 |
| Biblioboard |

@logout @returnBooks @tier1
Scenario Outline: Check end of chapter sleep timer
Expand All @@ -99,16 +99,17 @@ Feature: Audiobooks in LYRASIS Reads
When Click LISTEN action button on Book details screen
Then Audio player screen of book 'bookInfo' is opened
When Open toc audiobook screen
Then The first chapter is loaded
When Open the 2 chapter on toc audiobook screen and save the chapter name as 'chapterName' and chapter number as 'chapterNumber'
And Wait for 3 seconds
And Open the 1 chapter on toc audiobook screen and save the chapter name as 'chapterName' and chapter number as 'chapterNumber'
And Tap pause button on audio player screen
And Set END_OF_CHAPTER sleep timer on sleep timer audiobook screen
And Select 2X playback speed on playback speed audiobook screen
And Stretch slider on the time tracking line to the end of playback
And Select "2.0"X playback speed on playback speed audiobook screen
And Tap play button on audio player screen
And Listen a chapter on audio player screen
Then Play button is present on audio player screen
When Save the name of chapter as 'nextChapter' on audio player screen
And Open toc audiobook screen
Then Chapter name next to 'chapterNumber' on toc audiobook screen is equal to 'nextChapter' saved chapter name
Then Chapter name next to 'chapterNumber' chapter on toc audiobook screen is equal to 'nextChapter' saved chapter name

Scenarios:
| distributor |
Expand Down Expand Up @@ -147,7 +148,7 @@ Feature: Audiobooks in LYRASIS Reads
When Open toc audiobook screen
Then The first chapter is loaded
When Open the 1 chapter on toc audiobook screen and save the chapter name as 'chapterName' and chapter number as 'chapterNumber'
And Select 2X playback speed on playback speed audiobook screen
And Select "2.0"X playback speed on playback speed audiobook screen
And Listen a chapter on audio player screen
Then Next chapter play automatically and chapter name is not 'chapterName' on audio player screen

Expand Down Expand Up @@ -252,7 +253,7 @@ Feature: Audiobooks in LYRASIS Reads
Then Check that book contains LISTEN action button on Book details screen
When Click LISTEN action button on Book details screen
Then Audio player screen of book 'bookInfo' is opened
When Select <speed>X playback speed on playback speed audiobook screen
When Select "<speed>"X playback speed on playback speed audiobook screen
Then Current playback speed value is <speed>X on audio player screen
When Return to previous screen from audio player screen
And Click LISTEN action button on Book details screen
Expand All @@ -275,19 +276,19 @@ Feature: Audiobooks in LYRASIS Reads
| Palace Marketplace | 0.75 | 8 | 6 |
| Palace Marketplace | 1.25 | 8 | 10 |
| Palace Marketplace | 1.50 | 6 | 9 |
| Palace Marketplace | 2 | 5 | 10 |
| Palace Marketplace | 2.0 | 5 | 10 |
| Axis 360 | 0.75 | 8 | 6 |
| Axis 360 | 1.25 | 8 | 10 |
| Axis 360 | 1.50 | 6 | 9 |
| Axis 360 | 2 | 5 | 10 |
| Axis 360 | 2.0 | 5 | 10 |
| Biblioboard | 0.75 | 8 | 6 |
| Biblioboard | 1.25 | 8 | 10 |
| Biblioboard | 1.50 | 6 | 9 |
| Biblioboard | 2 | 5 | 10 |
| Biblioboard | 2.0 | 5 | 10 |
| Bibliotheca | 0.75 | 8 | 6 |
| Bibliotheca | 1.25 | 8 | 10 |
| Bibliotheca | 1.50 | 6 | 9 |
| Bibliotheca | 2 | 5 | 10 |
| Bibliotheca | 2.0 | 5 | 10 |

@logout @returnBooks @tier1
Scenario: TOC: Check of table of contents
Expand Down
14 changes: 7 additions & 7 deletions src/test/java/features/AudiobookOverdrive.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Feature: Audiobooks in A1QA library
Then Audio player screen of book 'bookInfo' is opened
And Chapter name on audio player screen is equal to 'chapterNameKey' saved chapter name
And Pause button is present on audio player screen
When Select 2X playback speed on playback speed audiobook screen
When Select "2"X playback speed on playback speed audiobook screen
And Wait for 3 seconds
And Tap pause button on audio player screen
Then Play button is present on audio player screen
Expand Down Expand Up @@ -75,12 +75,12 @@ Feature: Audiobooks in A1QA library
And Skip ahead 15 seconds on audio player screen
And Tap pause button on audio player screen
Then Play button is present on audio player screen
And Playback has been moved forward by 15 seconds from 'timeAhead' and 'chapterTimeKey' seconds on audio player screen
And Playback has been moved forward by 30 seconds from 'timeAhead' and 'chapterTimeKey' seconds on audio player screen
When Save book play time as 'timeBehind' on audio player screen
And Skip behind 15 seconds on audio player screen
And Tap pause button on audio player screen
Then Play button is present on audio player screen
And Playback has been moved behind by 15 seconds from 'timeBehind' and 'chapterTimeKey' seconds on audio player screen
And Playback has been moved behind by 30 seconds from 'timeBehind' and 'chapterTimeKey' seconds on audio player screen

@logout @returnBooks @tier2
Scenario: Audiobooks: Check end of chapter sleep timer
Expand All @@ -94,13 +94,13 @@ Feature: Audiobooks in A1QA library
When Open toc audiobook screen
And Open the 1 chapter on toc audiobook screen and save the chapter name as 'chapterName' and chapter number as 'chapterNumber'
And Set END_OF_CHAPTER sleep timer on sleep timer audiobook screen
And Select 2X playback speed on playback speed audiobook screen
And Select "2"X playback speed on playback speed audiobook screen
And Stretch slider on the time tracking line forward on audio player screen
And Listen a chapter on audio player screen
Then Play button is present on audio player screen
When Save the name of chapter as 'nextChapter' on audio player screen
And Open toc audiobook screen
Then Chapter name next to 'chapterNumber' on toc audiobook screen is equal to 'nextChapter' saved chapter name
Then Chapter name next to 'chapterNumber' chapter on toc audiobook screen is equal to 'nextChapter' saved chapter name

@logout @returnBooks @tier2 @exclude_android
Scenario: Audiobooks: Check of line for time remaining
Expand All @@ -124,7 +124,7 @@ Feature: Audiobooks in A1QA library
Then Audio player screen of book 'bookInfo' is opened
When Open toc audiobook screen
And Open the 1 chapter on toc audiobook screen and save the chapter name as 'chapterName' and chapter number as 'chapterNumber'
And Select 2X playback speed on playback speed audiobook screen
And Select "2"X playback speed on playback speed audiobook screen
And Listen a chapter on audio player screen
Then Next chapter play automatically and chapter name is not 'chapterName' on audio player screen

Expand Down Expand Up @@ -201,7 +201,7 @@ Feature: Audiobooks in A1QA library
Then Check that book contains LISTEN action button on Book details screen
When Click LISTEN action button on Book details screen
Then Audio player screen of book 'bookInfo' is opened
When Select <speed>X playback speed on playback speed audiobook screen
When Select "<speed>"X playback speed on playback speed audiobook screen
Then Current playback speed value is <speed>X on audio player screen
When Return to previous screen from audio player screen
And Click LISTEN action button on Book details screen
Expand Down
9 changes: 5 additions & 4 deletions src/test/java/features/BookDetailView.feature
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Feature: Book detail view screen
And Switch to '<tabName>' catalog tab
And Open <bookType> book with GET action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then Book 'bookInfo' is opened on book details screen
And Description is not empty on Book details screen
And Description exists on Book details screen
And Button More in Description is available on Book details screen

Scenarios:
Expand Down Expand Up @@ -112,7 +112,8 @@ Feature: Book detail view screen
And Switch to '<tabName>' catalog tab
And Open <bookType> book with GET action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then Book 'bookInfo' is opened on book details screen
And Related books section is displayed on book details screen
When Swipe down
Then Related books section is displayed on book details screen
And There is a list of related books on book details screen
And More button in related books section is available on book details screen

Expand Down Expand Up @@ -178,7 +179,7 @@ Feature: Book detail view screen
And Search for "Persuasion" and save bookName as 'bookNameInfo'
And Open EBOOK book with GET action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then Book 'bookInfo' is opened on book details screen
And Description is not empty on Book details screen
And Description exists on Book details screen
And Button More in Description is available on Book details screen

@tier2
Expand Down Expand Up @@ -254,7 +255,7 @@ Feature: Book detail view screen
And Search for "The Oregon Trail" and save bookName as 'bookNameInfo'
And Open EBOOK book with GET action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then Book 'bookInfo' is opened on book details screen
And Description is not empty on Book details screen
And Description exists on Book details screen
And Button More in Description is available on Book details screen

@tier2
Expand Down
66 changes: 34 additions & 32 deletions src/test/java/features/CatalogNavigation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -195,39 +195,41 @@ Feature: Catalog Navigation module
| type1 | type2 |
| Everything | Popular Books |

@smoke @logout @returnBooks @exclude_android
Scenario: Catalog: Perform check of Reserve button and Allow notifications
When Add library "LYRASIS Reads" on Add library screen
Then Library "LYRASIS Reads" is opened on Libraries screen
When Enter credentials for "LYRASIS Reads" library
Then Login is performed successfully
When Activate sync bookmarks on Sign in screen
And Open Catalog
And Open search modal
And Search for "Fahrenheit 451" and save bookName as 'bookNameInfo'
And Open AUDIOBOOK book with RESERVE action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click RESERVE action button without closing alert on Book details screen
Then There is an alert to allow notifications
When Tap ALLOW button on the alert
Then Alert to allow notification is not displayed
And Check that book contains REMOVE action button on Book details screen
# notifications are after opening the app
# @smoke1 @logout @returnBooks @exclude_android
# Scenario: Catalog: Perform check of Reserve button and Allow notifications
# When Add library "LYRASIS Reads" on Add library screen
# Then Library "LYRASIS Reads" is opened on Libraries screen
# When Enter credentials for "LYRASIS Reads" library
# Then Login is performed successfully
# When Activate sync bookmarks on Sign in screen
# And Open Catalog
# And Open search modal
# And Search 'unavailable' book of distributor 'Palace Marketplace' and bookType 'AUDIOBOOK' and save as 'bookNameInfo'
# And Open AUDIOBOOK book with RESERVE action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
# And Click RESERVE action button without closing alert on Book details screen
# Then There is an alert to allow notifications
# When Tap ALLOW button on the alert
# Then Alert to allow notification is not displayed
# And Check that book contains REMOVE action button on Book details screen

@smoke @logout @returnBooks @exclude_android
Scenario: Catalog: Alert: Perform check of "Don't Allow" button
When Add library "LYRASIS Reads" on Add library screen
Then Library "LYRASIS Reads" is opened on Libraries screen
When Enter credentials for "LYRASIS Reads" library
Then Login is performed successfully
When Activate sync bookmarks on Sign in screen
And Open Catalog
And Open search modal
And Search for "Fahrenheit 451" and save bookName as 'bookNameInfo'
And Open AUDIOBOOK book with RESERVE action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click RESERVE action button without closing alert on Book details screen
Then There is an alert to allow notifications
When Don't Allow notifications on the alert
Then Alert to allow notification is not displayed
And Check that book contains REMOVE action button on Book details screen
# notifications are after opening the app
# @smoke1 @logout @returnBooks @exclude_android
# Scenario: Catalog: Alert: Perform check of "Don't Allow" button
# When Add library "LYRASIS Reads" on Add library screen
# Then Library "LYRASIS Reads" is opened on Libraries screen
# When Enter credentials for "LYRASIS Reads" library
# Then Login is performed successfully
# When Activate sync bookmarks on Sign in screen
# And Open Catalog
# And Open search modal
# And Search 'unavailable' book of distributor 'Palace Marketplace' and bookType 'AUDIOBOOK' and save as 'bookNameInfo'
# And Open AUDIOBOOK book with RESERVE action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
# And Click RESERVE action button without closing alert on Book details screen
# Then There is an alert to allow notifications
# When Don't Allow notifications on the alert
# Then Alert to allow notification is not displayed
# And Check that book contains REMOVE action button on Book details screen

# More button is not available
# @smoke
Expand Down
Loading

0 comments on commit a502914

Please sign in to comment.