Skip to content

Commit

Permalink
Merge pull request #14 from ThePalaceProject/refactoring
Browse files Browse the repository at this point in the history
Refactoring Android
  • Loading branch information
AEkaterina authored Oct 11, 2023
2 parents 4d85400 + 2dde299 commit eef675c
Show file tree
Hide file tree
Showing 16 changed files with 208 additions and 325 deletions.
29 changes: 4 additions & 25 deletions src/test/java/features/AudiobookLyrasis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Feature: Audiobooks in LYRASIS Reads
Then Library "LYRASIS Reads" is opened on Libraries screen
When Enter credentials for 'LYRASIS Reads' library
Then Login is performed successfully
When Open Catalog
When Activate sync bookmarks on Sign in screen
And Open Catalog
And Open search modal

@logout @returnBooks @tier1
Expand Down Expand Up @@ -326,18 +327,7 @@ Feature: Audiobooks in LYRASIS Reads

@smoke @logout @returnBooks
Scenario: Audiobooks: Perform check of Listen and Back button
Given Close tutorial screen
Then Welcome screen is opened
When Close welcome screen
Then Add library screen is opened
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 "Down The Hatch" and save bookName as 'bookNameInfo'
When Search for "Down the Hatch" and save bookName 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 @@ -349,18 +339,7 @@ Feature: Audiobooks in LYRASIS Reads

@smoke @logout @returnBooks
Scenario: Audiobooks: Perform check of Play button and Pause buttons
Given Close tutorial screen
Then Welcome screen is opened
When Close welcome screen
Then Add library screen is opened
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 "Down The Hatch" and save bookName as 'bookNameInfo'
When Search for "Down the Hatch" and save bookName 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 Down
42 changes: 42 additions & 0 deletions src/test/java/features/CatalogNavigation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,48 @@ 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 Close tutorial screen
Then Welcome screen is opened
When Close welcome screen
Then Add library screen is opened
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

@smoke @logout @returnBooks @exclude_android
Scenario: Catalog: Alert: Perform check of "Don't Allow" button
When Close tutorial screen
Then Welcome screen is opened
When Close welcome screen
Then Add library screen is opened
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 Don't 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

# More button is not available
# @smoke
# Scenario: Catalog navigation: "More" button: Perform check of the button in Palace Bookshelf
Expand Down
49 changes: 47 additions & 2 deletions src/test/java/features/EpubLyrasis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Feature: Read EPUB in Lyrasis Reads
Then Library "LYRASIS Reads" is opened on Libraries screen
When Enter credentials for 'LYRASIS Reads' library
Then Login is performed successfully
When Open Catalog
When Activate sync bookmarks on Sign in screen
And Open Catalog
And Open search modal

# @logout @returnBooks @tier1
Expand Down Expand Up @@ -229,4 +230,48 @@ Feature: Read EPUB in Lyrasis Reads
| distributor |
| Bibliotheca |
| Palace Marketplace |
| Axis 360 |
| Axis 360 |

@smoke @logout @returnBooks
Scenario: Read ebooks: Pages: Perform check of reader navigating (swiping left and right)
When Search for "The Giants Return" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
And Wait for 5 seconds
Then 'bookInfo' book is present on epub reader screen
When Scroll page forward from 7 to 10 times
And Save pageNumber as 'pageNumberKey' and chapterName as 'chapterNameKey' on epub reader screen
And Go to next page on Reader epub screen
Then Next page is opened and old page has 'pageNumberKey' pageNumber and 'chapterNameKey' chapterName on epub reader screen
When Save pageNumber as 'pageNumberKey' and chapterName as 'chapterNameKey' on epub reader screen
And Tap on right book corner on epub reader screen
Then Next page is opened and old page has 'pageNumberKey' pageNumber and 'chapterNameKey' chapterName on epub reader screen
When Save pageNumber as 'pageNumberKey' and chapterName as 'chapterNameKey' on epub reader screen
And Click on left book corner on epub reader screen
Then Previous page is opened and old page has 'pageNumberKey' pageNumber and 'chapterNameKey' chapterName on epub reader screen
# When Save pageNumber as 'pageNumberKey' and chapterName as 'chapterNameKey' on epub reader screen
# And Go to previous page on reader epub screen
# Then Previous page is opened and old page has 'pageNumberKey' pageNumber and 'chapterNameKey' chapterName on epub reader screen

@smoke @logout @returnBooks
Scenario: Read ebooks: Table of contents: Perform check of navigation
When Search for "The Giants Return" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
Then 'bookInfo' book is present on epub reader screen
When Open TOC epub screen
Then TOC screen is opened
When Switch to bookmarks on toc epub screen
Then Bookmark epub screen is opened

@smoke @logout @returnBooks
Scenario: Read ebooks: Table of contents: Contents: Perform check of Contents navigation
When Search for "Faith, Finance, and Economy" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
Then 'bookInfo' book is present on epub reader screen
When Open random chapter of epub and save it as 'chapterName' from toc epub screen
Then Chapter 'chapterName' is opened on epub reader screen
134 changes: 83 additions & 51 deletions src/test/java/features/PdfLyrasisAndroid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Feature: Read PDF in LYRASIS Reads on Android
Then Library "LYRASIS Reads" is opened on Libraries screen
When Enter credentials for 'LYRASIS Reads' library
Then Login is performed successfully
When Open Catalog
When Activate sync bookmarks on Sign in screen
And Open Catalog

@logout @returnBooks @tier1 @exclude_ios
Scenario: Check of book title
Expand Down Expand Up @@ -132,81 +133,112 @@ Feature: Read PDF in LYRASIS Reads on Android

@smoke @logout @returnBooks @exclude_ios
Scenario: Android: Read pdfs: Table of contents: Perform check of navigation of TOC button
When Close tutorial screen
Then Welcome screen is opened
When Close welcome screen
Then Add library screen is opened
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 "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
When Open search modal
And Search for "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then EBOOK book with READ action button and 'bookInfo' bookInfo is present on Catalog books screen
When Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
And Click READ action button on Book details screen
Then Reader pdf screen is opened
When Open TOC on pdf reader screen
Then There are content list with thumbnails and chapter content on pdf toc screen
When Return to pdf reader screen from pdf toc screen
Then PDF toc screen is closed
When Open TOC on pdf reader screen
And Open TOC on pdf reader screen
And Open TOC on pdf reader screen
Then PDF toc screen is closed
When Open TOC on pdf reader screen
And Close pdf toc screen by back button
And Close pdf toc screen by back button
Then PDF toc screen is closed

@smoke @logout @returnBooks @exclude_ios
Scenario: Android: Read pdfs: Perform check of Settings
When Close tutorial screen
Then Welcome screen is opened
When Close welcome screen
Then Add library screen is opened
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 "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
When Open search modal
And Search for "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then EBOOK book with READ action button and 'bookInfo' bookInfo is present on Catalog books screen
When Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
And Click READ action button on Book details screen
Then Reader pdf screen is opened
When Open pdf settings screen on pdf reader screen
Then PDF settings screen is opened

@smoke @logout @returnBooks @exclude_ios
Scenario: Android: Read pdfs: Perform check of scrolling by default (down and up)
When Close tutorial screen
Then Welcome screen is opened
When Close welcome screen
Then Add library screen is opened
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 "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
When Open search modal
And Search for "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then EBOOK book with READ action button and 'bookInfo' bookInfo is present on Catalog books screen
When Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
And Click READ action button on Book details screen
Then Reader pdf screen is opened
When Save page number as 'pageInfo' on pdf reader screen
And Open pdf settings screen on pdf reader screen
Then Vertical scrolling is chosen by default on settings screen
When Open pdf settings screen on pdf reader screen
And Scroll page down on pdf reader screen
Then Vertical scrolling is chosen by default on settings screen
When Open pdf settings screen on pdf reader screen
And Scroll page down on pdf reader screen
And Save page number as 'pageInfo' on pdf reader screen
And Scroll page down on pdf reader screen
Then Page number is not equal to 'pageInfo' on pdf reader screen
When Save page number as 'pageInfo2' on pdf reader screen
And Scroll page up on pdf reader screen
Then Page number is not equal to 'pageInfo2' on pdf reader screen
And Scroll page up on pdf reader screen
Then Page number is not equal to 'pageInfo2' on pdf reader screen

@smoke @logout @returnBooks
Scenario: Read pdfs: Table of contents: Perform check of navigation
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then EBOOK book with READ action button and 'bookInfo' bookInfo is present on Catalog books screen
When Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
Then Reader pdf screen is opened
When Open TOC on pdf reader screen
Then There are content list with thumbnails and chapter content on pdf toc screen
When Open text chapter content on pdf toc screen
Then Text chapter content is opened on pdf toc screen
When Open content with thumbnails on pdf toc screen
Then Thumbnails of the book pages are displayed

@smoke @logout @returnBooks
Scenario: Read pdfs: Perform check of back button
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then EBOOK book with READ action button and 'bookInfo' bookInfo is present on Catalog books screen
When Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
Then Reader pdf screen is opened
When Close pdf reader by back button
Then Book "bookInfo" is opened on book details screen

@smoke @logout @returnBooks
Scenario: Read pdfs: Table of contents: Contents with thumbnails: Perform check of navigation
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then EBOOK book with READ action button and 'bookInfo' bookInfo is present on Catalog books screen
When Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
Then Reader pdf screen is opened
When Open TOC on pdf reader screen
And Open content with thumbnails on pdf toc screen
Then Thumbnails of the book pages are displayed
When Open random thumbnail and save the number as 'pageInfo' on pdf toc screen
And Return to pdf reader screen from pdf toc screen
Then Page number is equal to 'pageInfo' on pdf reader screen

@smoke @logout @returnBooks
Scenario: Read pdfs: Table of contents: Chapter content: Perform check of navigation
When Open search modal
And Search for "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Click GET action button on EBOOK book with 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
Then EBOOK book with READ action button and 'bookInfo' bookInfo is present on Catalog books screen
When Open EBOOK book with READ action button and 'bookNameInfo' bookName on Catalog books screen and save book as 'bookInfo'
And Click READ action button on Book details screen
Then Reader pdf screen is opened
When Open TOC on pdf reader screen
And Open text chapter content on pdf toc screen
Then Text chapter content is opened on pdf toc screen
When Open random chapter and save the number as 'pageInfo' on pdf toc screen
And Return to pdf reader screen from pdf toc screen
Then Page number is equal to 'pageInfo' on pdf reader screen
Loading

0 comments on commit eef675c

Please sign in to comment.