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:
Arkadiusz Fal
2026-02-10 00:05:39 +01:00
parent 3905fd8b18
commit 9cd9506dcf
17 changed files with 350 additions and 150 deletions

View File

@@ -38,15 +38,15 @@ RSpec.describe 'Yattee Server Instance', :smoke do
server_url = UITest::Config.yattee_server_url
server_host = UITest::Config.yattee_server_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_yattee_server(server_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,12 @@ RSpec.describe 'Yattee Server 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.yatteeServer.#{server_host}")
expect(@axe).to have_text(server_host)
# Close settings
begin
@axe.tap_label('Done')
@axe.tap_id('settings.doneButton')
rescue StandardError
nil
end