From 09fc217a416a96d7ff702079324a6ad306234e67 Mon Sep 17 00:00:00 2001 From: Tiago Marques Date: Wed, 23 Aug 2023 17:10:32 -0300 Subject: [PATCH] Change fisrCalendarDay locator from staticText to button --- .../Screens/Editor/EditorPostSettings.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WordPress/UITestsFoundation/Screens/Editor/EditorPostSettings.swift b/WordPress/UITestsFoundation/Screens/Editor/EditorPostSettings.swift index 9f2fdf7e08f8..16312b729c58 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/EditorPostSettings.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/EditorPostSettings.swift @@ -35,8 +35,8 @@ public class EditorPostSettings: ScreenObject { $0.buttons["Next Month"] } - private let firstCalendarDayLabelGetter: (XCUIApplication) -> XCUIElement = { - $0.staticTexts["1"] + private let firstCalendarDayButtonGetter: (XCUIApplication) -> XCUIElement = { + $0.buttons.containing(.staticText, identifier: "1").element } private let doneButtonGetter: (XCUIApplication) -> XCUIElement = { @@ -48,7 +48,7 @@ public class EditorPostSettings: ScreenObject { var dateSelector: XCUIElement { dateSelectorGetter(app) } var doneButton: XCUIElement { doneButtonGetter(app) } var featuredImageButton: XCUIElement { featuredImageButtonGetter(app) } - var firstCalendarDayLabel: XCUIElement { firstCalendarDayLabelGetter(app) } + var firstCalendarDayButton: XCUIElement { firstCalendarDayButtonGetter(app) } var nextMonthButton: XCUIElement { nextMonthButtonGetter(app) } var publishDateButton: XCUIElement { publishDateButtonGetter(app) } var settingsTable: XCUIElement { settingsTableGetter(app) } @@ -137,7 +137,7 @@ public class EditorPostSettings: ScreenObject { // Selects the first day of the next month nextMonthButton.tap() - firstCalendarDayLabel.tap() + firstCalendarDayButton.tap() doneButton.tap() return self