Skip to content

Commit

Permalink
Merge pull request #31 from ThePalaceProject/refactoring_ios
Browse files Browse the repository at this point in the history
changed step to check library on iOS
  • Loading branch information
AEkaterina authored Feb 9, 2024
2 parents 72acf24 + caeec73 commit b87e53e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/java/screens/pdf/BookmarksPdfScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class BookmarksPdfScreen extends Screen {
public BookmarksPdfScreen() {
super(LocatorUtils.getLocator(
new AndroidLocator(By.xpath("")),
new IosLocator(By.xpath("//XCUIElementTypeCollectionView"))), "Bookmarks screen");
new IosLocator(By.xpath("//XCUIElementTypeStaticText[contains(@name=\"no bookmarks\")]"))), "Bookmarks screen");
}

public int getCountOfBookmarks() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/screens/pdf/SearchPdfScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class SearchPdfScreen extends Screen {
private final IButton returnKey = getElementFactory().getButton(By.xpath("//XCUIElementTypeButton[@name=\"Return\"]"), "Return key");

private static final String NUMBER_OF_FOUND_TEXT_LOCATOR_IOS = "//XCUIElementTypeCell/XCUIElementTypeStaticText[2]";
private static final String FOUND_TEXT_NUMBER_LOCATOR_IOS = "//XCUIElementTypeCell[%d]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeStaticText[2]";
private static final String FOUND_TEXT_NUMBER_LOCATOR_IOS = "//XCUIElementTypeCell[%d]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeStaticText[2]";
private static final String FOUND_TEXT_LOCATOR_IOS = "//XCUIElementTypeCell/XCUIElementTypeStaticText[1]";

public SearchPdfScreen() {
Expand Down
1 change: 1 addition & 0 deletions src/test/java/stepdefinitions/CatalogSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public void isLibraryOpenedInCatalog(String libraryName){
menuBarScreen.openBottomMenuTab(MenuBar.SETTINGS);
settingsScreen.openLibraries();
Assert.assertTrue(libraryName + " is not present on Libraries screen", librariesScreen.isLibraryPresent(libraryName));
menuBarScreen.openBottomMenuTab(MenuBar.CATALOG);
});
}

Expand Down

0 comments on commit b87e53e

Please sign in to comment.