mirror of
https://github.com/yattee/yattee.git
synced 2026-02-19 17:29:45 +00:00
Fix UI tests for onboarding flow and AddRemoteServer redesign
- Skip onboarding in tests by setting UserDefaults before launch - Update all addSource.* identifiers to addRemoteServer.* for new flow - Switch from identifier-based to text-based element lookups (iOS 26 AXe limitation) - Add Yattee Server credential support in instance setup - Update baseline screenshots for Home tab and settings
This commit is contained in:
@@ -38,15 +38,15 @@ RSpec.describe 'Invidious Instance', :smoke do
|
||||
invidious_url = UITest::Config.invidious_url
|
||||
invidious_host = UITest::Config.invidious_host
|
||||
|
||||
# Ensure we start from Library (check for text since inlineLarge title has no AXUniqueId)
|
||||
expect(@axe).to have_text('Library')
|
||||
# Ensure we start from Home
|
||||
expect(@axe).to have_text('Home')
|
||||
|
||||
# Remove existing instance (if any) and add fresh - always tests the add flow
|
||||
@instance_setup.remove_and_add_invidious(invidious_url)
|
||||
|
||||
# Navigate to Sources to verify the instance was added
|
||||
# Open Settings using accessibility identifier
|
||||
@axe.tap_id('library.settingsButton')
|
||||
@axe.tap_id('home.settingsButton')
|
||||
sleep 1
|
||||
|
||||
expect(@axe).to have_element('settings.view')
|
||||
@@ -55,15 +55,13 @@ RSpec.describe 'Invidious Instance', :smoke do
|
||||
@axe.tap_id('settings.row.sources')
|
||||
sleep 0.5
|
||||
|
||||
# Verify we're on Sources list
|
||||
expect(@axe).to have_element('sources.view')
|
||||
|
||||
# Verify instance appears in Sources list
|
||||
expect(@axe).to have_element("sources.row.invidious.#{invidious_host}")
|
||||
# Verify instance appears in Sources list (check by host text since
|
||||
# SwiftUI accessibilityIdentifier doesn't expose as AXUniqueId)
|
||||
expect(@axe).to have_text(invidious_host)
|
||||
|
||||
# Close settings
|
||||
begin
|
||||
@axe.tap_label('Done')
|
||||
@axe.tap_id('settings.doneButton')
|
||||
rescue StandardError
|
||||
nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user