Skip to content

Commit

Permalink
Merge pull request #26 from ThePalaceProject/refactoring
Browse files Browse the repository at this point in the history
Refactoring android, search epub
  • Loading branch information
AEkaterina authored Jan 5, 2024
2 parents 37822ec + e44dc8b commit 8b8e1e4
Show file tree
Hide file tree
Showing 17 changed files with 323 additions and 48 deletions.
115 changes: 112 additions & 3 deletions src/test/java/features/EpubLyrasis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ Feature: Read EPUB in Lyrasis Reads
And Click READ action button on Book details screen
And Open navigation bar on reader epub screen
And Add bookmark on reader epub screen
Then Bookmark is displayed on reader epub screen
When Save pageNumber as 'pageNumberKey' and chapterName as 'chapterNameKey' on epub reader screen
# And Wait for 3 seconds
# Then Bookmark is displayed on reader epub screen
And Save pageNumber as 'pageNumberKey' and chapterName as 'chapterNameKey' on epub reader screen
And Save device time and date as 'deviceTimeDateKey'
And Scroll page forward from 7 to 9 times
And Add bookmark on reader epub screen
Expand Down Expand Up @@ -232,6 +233,91 @@ Feature: Read EPUB in Lyrasis Reads
| Palace Marketplace |
| Axis 360 |

@logout @returnBooks @tier1
Scenario: Read ebooks: Search: Perform check of the placeholder
When Search for "The Voyages of Doctor Dolittle" 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 Tap search icon on epub reader screen
Then Placeholder contains "Search" text on search epub screen

@logout @returnBooks @tier1
Scenario: Read ebooks: Search: Perform check of editing the data
When Search for "The Voyages of Doctor Dolittle" 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 Tap search icon on epub reader screen
And Enter 'Book' text and save it as 'searchedText' on search epub screen
And Edit data by adding characters in search epub screen and save it as 'newText'
Then Placeholder contains word 'newText' text in search epub screen

@logout @returnBooks @tier1
Scenario Outline: Read ebooks: Search: Perform check that search result contain one or more entered latin letters or numeric
When Search for "Make for the Hills" 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 Tap search icon on epub reader screen
And Search for <word> and save word as 'searchedWord' on search epub screen
Then Search results contain word 'searchedWord' on search epub screen

Scenarios:
| word |
| in |
| F |
| 1 |

@logout @returnBooks @tier1
Scenario Outline: Read ebooks: Search: Enter data and get empty search result
When Search for "Make for the Hills" 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 Tap search icon on epub reader screen
And Search for <word> and save word as 'searchedWord' on search epub screen
Then Search result is empty on search epub screen

Scenarios:
| word |
| рнл |
| <font color=red>Red text</font> |
| <script>alert(‘hello world’)</script> |
| @$ |

@logout @returnBooks @tier1
Scenario Outline: Read ebooks: Perform check of the input in different font cases
When Search for "Make for the Hills" 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 Tap search icon on epub reader screen
And Search for <word> and save word as 'searchedWord' on search epub screen
Then Search results contain word 'searchedText' on search epub screen

Scenarios:
| word |
| world |
| WORLD |
| WorLD |

@logout @returnBooks @tier1
Scenario: Read ebooks: Search: Perform check of empty field
When Search for "Make for the Hills" 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 Tap search icon on epub reader screen
And Apply search on search epub screen
Then Search result is empty on search epub screen

@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'
Expand Down Expand Up @@ -296,4 +382,27 @@ Feature: Read EPUB in Lyrasis Reads
Then 'bookInfo' book is present on epub reader screen
When Tap search icon on epub reader screen
And Enter 'try' text and save it as 'searchedText' on search epub screen
Then The field allows to enter characters and contains 'searchedText' on search epub screen
Then The field allows to enter characters and contains 'searchedText' on search epub screen

@logout @returnBooks @smoke
Scenario: Read ebooks: Search: Perform check of finding an existing word
When Search for "Make for the Hills" 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 Tap search icon on epub reader screen
And Search for but and save word as 'searchedText' on search epub screen
Then Search results contain word 'searchedText' on search epub screen

@logout @returnBooks @smoke
Scenario: Read ebooks: Search: Perform check of the "Delete" button
When Search for "Make for the Hills" 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 Tap search icon on epub reader screen
And Enter 'Make for the Hills' text and save it as 'searchedText' on search epub screen
And Delete text in search line on search epub screen
Then Placeholder does not contain word 'searchedText' text on search epub screen
7 changes: 3 additions & 4 deletions src/test/java/features/EpubPalace.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: Read EPUB in Palace Bookshelf
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 Scroll page forward from 3 to 6 times
When Scroll page forward from 3 to 5 times
And Open navigation bar on reader epub screen
And Save pageNumber as 'pageNumberKey' and chapterName as 'chapterNameKey' on epub reader screen
And Tap on right book corner on epub reader screen
Expand All @@ -33,10 +33,9 @@ Feature: Read EPUB in Palace Bookshelf
And Click READ action button on Book details screen
And Open navigation bar on reader epub screen
And Add bookmark on reader epub screen
Then Bookmark is displayed on reader epub screen
When Save pageNumber as 'pageNumberKey' and chapterName as 'chapterNameKey' on epub reader screen
And Save pageNumber as 'pageNumberKey' and chapterName as 'chapterNameKey' on epub reader screen
And Save device time and date as 'deviceTimeDateKey'
And Scroll page forward from 3 to 6 times
And Scroll page forward from 3 to 5 times
And Add bookmark on reader epub screen
And Save pageNumber as 'pageNumberKey2' and chapterName as 'chapterNameKey2' on epub reader screen
And Save device time and date as 'deviceTimeDateKey2'
Expand Down
14 changes: 7 additions & 7 deletions src/test/java/features/PdfLyrasisAndroid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ 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 Open search modal
And Search for "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Search for "A Queen From the North" 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'
Expand All @@ -154,7 +154,7 @@ Feature: Read PDF in LYRASIS Reads on Android
@smoke @logout @returnBooks @exclude_ios
Scenario: Android: Read pdfs: Perform check of Settings
When Open search modal
And Search for "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Search for "Being Plumville" 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'
Expand All @@ -166,7 +166,7 @@ Feature: Read PDF in LYRASIS Reads on Android
@smoke @logout @returnBooks @exclude_ios
Scenario: Android: Read pdfs: Perform check of scrolling by default (down and up)
When Open search modal
And Search for "Comprehension and Critical Thinking Grade 6" and save bookName as 'bookNameInfo'
And Search for "The Art of Three" 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'
Expand All @@ -186,7 +186,7 @@ Feature: Read PDF in LYRASIS Reads on Android
@smoke @logout @returnBooks @exclude_ios
Scenario: Android: Read pdfs: Table of contents: Perform check of navigation
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Search for "The Art of Three" 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'
Expand All @@ -202,7 +202,7 @@ Feature: Read PDF in LYRASIS Reads on Android
@smoke @logout @returnBooks @exclude_ios
Scenario: Android: Read pdfs: Perform check of back button
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Search for "Being Plumville" 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'
Expand All @@ -214,7 +214,7 @@ Feature: Read PDF in LYRASIS Reads on Android
@smoke @logout @returnBooks @exclude_ios
Scenario: Android: 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 Search for "A Queen From the North" 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'
Expand All @@ -230,7 +230,7 @@ Feature: Read PDF in LYRASIS Reads on Android
@smoke @logout @returnBooks @exclude_ios
Scenario: Android: 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 Search for "A Queen From the North" 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'
Expand Down
14 changes: 7 additions & 7 deletions src/test/java/features/PdfLyrasisIos.feature
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Feature: Read PDF in LYRARIS Reads on IOS
@smoke @logout @returnBooks @exclude_android
Scenario: IOS: Read pdfs: Pages: Perform check of reader navigating (swiping left and right)
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Search for "Friended" 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'
Expand All @@ -171,7 +171,7 @@ Feature: Read PDF in LYRARIS Reads on IOS
@smoke @logout @returnBooks @exclude_android
Scenario: iOS: Read pdfs: Search: Perform check that the field allows you to enter characters and delete them
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Search for "Friended" 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'
Expand All @@ -186,7 +186,7 @@ Feature: Read PDF in LYRARIS Reads on IOS
@smoke @logout @returnBooks @exclude_android
Scenario: iOS: Read pdfs: Search: Perform check of finding a word in the book
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Search for "Friended" 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'
Expand All @@ -200,7 +200,7 @@ Feature: Read PDF in LYRARIS Reads on IOS
@smoke @logout @returnBooks @exclude_android
Scenario: iOS: Read pdfs: Table of contents: Perform check of navigation
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Search for "Friended" 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'
Expand All @@ -216,7 +216,7 @@ Feature: Read PDF in LYRARIS Reads on IOS
@smoke @logout @returnBooks @exclude_android
Scenario: iOS: Read pdfs: Perform check of back button
When Open search modal
And Search for "Race Cars" and save bookName as 'bookNameInfo'
And Search for "Friended" 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'
Expand All @@ -228,7 +228,7 @@ Feature: Read PDF in LYRARIS Reads on IOS
@smoke @logout @returnBooks @exclude_android
Scenario: iOS: 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 Search for "Friended" 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'
Expand All @@ -244,7 +244,7 @@ Feature: Read PDF in LYRARIS Reads on IOS
@smoke @logout @returnBooks @exclude_android
Scenario: iOS: 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 Search for "Tell A Thousand Lies" 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'
Expand Down
Loading

0 comments on commit 8b8e1e4

Please sign in to comment.