81 Commits

Author SHA1 Message Date
Doug
6e83ecb290 Don't reset the simulator contents on GitHub. 2024-09-23 16:25:49 +01:00
Doug
6818be1afc Update UI tests for Xcode 16. 2024-09-23 16:25:49 +01:00
Stefan Ceriu
2f6fea29f3
Replace Prefire with a very similar but simpler and more direct approach (#3232)
* Replace Prefire with a very similar but simpler and more direct approach

* Move PreviewTest snapshots to their new location (snapshotting default, mirrors UITests)

* Update acknowledgements

* Switch snapshot configuration extensions to a custom version

* Exclude snapshots from the PreviewTests target

* Fix acknowledgements

* Rename snapshotting preference keys

* Remove `skipPackagePluginValidation`
2024-09-09 15:07:41 +03:00
Doug
50c2b593e7 Put a space between the version and build numbers. 2024-08-06 21:29:55 +03:00
Doug
cdd763efd4
Add a certificate validator hook. (#3069)
* Add a certificate validator hook.

* General tidy up of AppHooks.

* Don't worry about the generic call links.
2024-07-19 17:05:54 +01:00
Doug
c92c6a28ae
Upgrade the project to use Xcode 15.4 (#3027)
* Update snapshots for Xcode 15.4

* Update CI.

* Fix crashing UI test.

* Fix compile error in Integration Tests.

* Try putting UI tests on GH runners again.
2024-07-11 17:38:32 +01:00
Doug
1178561853
Setup unit tests for Enterprise. (#2984)
* Fix Analytics on Enterprise.
2024-07-01 12:34:47 +01:00
Doug
3cc4145a4c
Use XcodeGen files for app variants and setup Enterprise submodule. (#2976)
- Create an app.yml with the base app variant.
- Override app.yml contents on Nightly/PR builds.
- Add AppHooks mechanism.
- Add Enterprise submodule.
- Conditionally import Enterprise/fastlane/Fastfile if available.
2024-06-27 18:18:17 +01:00
Doug
82823c94ce
Replace Towncrier with GitHub releases + labels. (#2966)
* Set up GitHub generated release notes.

* Remove Towncrier from the release script.

* Add changelog failures for Labels with Danger and stop requesting a changelog file.

* Update changelog documentation.
2024-06-25 11:07:01 +00:00
Doug
9282088891 Remove OTLP support. 2024-05-08 11:33:37 +01:00
Stefan Ceriu
4e828e6f5c Remove include_simulator_logs from the integration tests. 2024-03-28 10:34:12 +02:00
Stefan Ceriu
98af0ae169
UI test shenanigans (#2611)
* Hardcode Xcode 15.2 as there are multiple versions available on the performance runner

* Remove the derived data caching step as it's not necessary on the performance runner.
2024-03-27 14:10:20 +02:00
Stefan Ceriu
92eaa7075a
UI test cleanup (#2598)
* Stop running the UI tests on the double localized pseudolanguage

* Fix UI tests signalling comms problem because the json key ordering wasn't defined and the messages wouldn't match.

* Remove UI tests that are now the same as preview tests (i.e. non flow based, only screen based), fixed the rest so they run on iOS 17.2, the iPhone 15 and iPad 10th gen simulators.

* Remove unnecessary gitignore instructions, change UI test snapshot naming convention to be more similar to the unit test ones

* Enable derived data and spm checkout caching for UI tests

* Switch UI tests back to the perf-only runner, moved the integration tests to the iPhone 15 Pro simulator.

* Address PR comments
2024-03-25 17:34:11 +02:00
Stefan Ceriu
1d950fa803 Switch back to iOS 17.2 and the iPhone 15 and iPad 10th generation 2024-03-25 11:02:06 +02:00
Stefan Ceriu
83f5ae9192
Prefire multiple devices (#2543)
* Update Prefire, setup multiple snapshot devices and languages
Squashed commits:
[28cb4ae6d] Switch to macos-14, iOS 17 and the iPhone 15 simulator
[080fc82cb] Update snapshots
[c874ca9c7] Bump Compound and Prefire, reduce perceptual precission to 0.98
[a59b8a54c] Update snapshots after adding iPad and pseudolanguage snapshotting
[f30cc3277] Setup multi-language snapshotting
[aeb11c7e7] Update prefire template, setup multiple snapshot devices

* Update ruby dependencies and fastlane plugins

* Bump Compound, switch back to the original prefire - version 2.0.4

* Remove preview test simulator version specifiers
2024-03-12 13:08:54 +02:00
Doug
5f0c782ce2
Use xcresultparser in all workflows. (#2510)
* Fix integration tests.
2024-02-28 18:01:20 +00:00
Doug
a3b3aa8517
Move PreviewTests into their own scheme. (#2492)
* Use xcresultparser for coverage as there are 2 schemes now.
2024-02-22 15:13:52 +00:00
Doug
09b276d94b
Update most references of vector-im to element-hq (#2231)
Sonarcloud and codecov will follow in a later PR when confirmed working. Changelog ignored as it isn't particularly important with the redirect.
2023-12-12 14:34:44 +00:00
Stefan Ceriu
12e8ffaf87 Show the build number on the nightly app icons 2023-11-27 10:55:38 +02:00
Doug
d03c97a02a
Switch to Xcode 15 (with the iOS 16.4 Simulator for tests still) (#2113)
* Use Xcode 15 in GitHub actions.

Use iOS 16.4 simulators from Xcode 14 as iOS 17.0.1 simulators are **super** slow.

* Fix failing preview snapshots.

Snapshot fix.

* Improve setup

* Regenerate snapshots that had a conflict.

---------

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>
2023-11-21 16:25:18 +00:00
Stefan Ceriu
56879caae6 Add back automatic unit test retrying 2023-11-16 17:23:13 +02:00
Doug
e42977a7b0 Remove smudging workarounds. 2023-10-16 12:55:05 +01:00
Doug
56a9820ded
Add remaining iOS 17 introspections. (#1806)
* Update compound.

* Update Ruby gems.

* Skip smudging in Fastlane.

* Link Git LFS for Xcode in setup-project.
2023-09-29 17:29:27 +01:00
Stefan Ceriu
a05c3e3774
Fix various flakey unit tests (#1783)
* Fix flakey emoji provider tests

* Fix flakey RoomScreenViewModel tests

* Fix flakey HomeScreenViewModel tests

* Fix flakey RoomMemberListScreen tests, problem with bindings getting overriden and deferFulfillment cancellable not getting stored

* Fix flakey RoomNotificationSettingsScreen tests and crashes

* Fix flakey RoomMemberDetailsScreen tests

* Deprecate old `deferFulfillment` and `nextViewState` methods

* Convert more files to the new `deferFulfillment`

* Converted the rest of the tests to the new deferFulfillment

* Removed now unused `nextViewState` and `deferFulfillment`

* Remove automatic retries from unit tests

* Reset analytics flag after running unit tests

* Address PR comments

* Introduce a new `deferFulfillment(publisher, keyPath, transitionValues)` method and use it where appropiate
2023-09-26 13:28:29 +03:00
Stefan Ceriu
612a28b7e2 Release script fixes: prevent sed from incorrectly matching other versions, correctly increment the path version past .9 which would previously increment the minor 2023-09-20 18:17:32 +03:00
Mauro
341b177e23
Prefire basic implementation (#1743)
* prefire basic implementation

force the unit tests to run on iPhone 14

skipping plugin validation

archive artifacts

better workflow

removed the OS restriction

lfs

custom stencil

new test file

deleting

* git lfs

* lfs

* test

* customised the stencil to support our internal protocol

* for now we can remove the OS check from the stencil

* added a delay

* tests have been moved

* improvement

* recommit

* perceptual precision lowered

* updated snapshot testing and selected also iOS version

* added ios version control
2023-09-20 14:07:18 +02:00
Stefan Ceriu
ecc549b280 Feature flag to OTLP tracing 2023-08-24 15:12:19 +03:00
Stefan Ceriu
611baf194a
Xcode cloud sentry tweaks (#1459)
* Increase the sentry log level used in debug symbol uploading

* Set sentry max http retries to 5

* Revert: set sentry max http retries to 5 as it doesn't work

* Implement automatic sentry_upload_dif retries
2023-08-08 12:07:55 +03:00
Doug
22c0e38c5d
Upload to sentry before releasing/tagging. (#1457)
This is to prevent tags being created for CI runs that have failed.
2023-08-07 14:52:54 +01:00
Stefan Ceriu
1e8b894298 Prevent xcodegen from creating temporary references in the project file 2023-08-07 12:59:48 +03:00
Doug
07651bd3f5
Specify ElementX target for coverage in integrations plan. (#1398) 2023-07-27 16:03:26 +01:00
Doug
8f2904701b
Fix more unit tests. (#1406)
- Randomise test order.
- Use deferred fulfilment in more places.
- Make sure to change something before awaiting the fulfilment.
- Build a fresh AppSettings after reset().
- Retry tests on failure.
2023-07-27 12:38:48 +01:00
Alfonso Grillo
a7256bb486
Move Map Libre API key to Xcode Cloud (#1313)
* Add config_production lane

* Add maplibre to .gitignore

* Add setupMapLibreKey

* Add documentation

* Fix failing UTs

* Fix more UTs

* Cleanup

* Add secrets.xcconfig

* Cleanup gitignore file

* Update post-checkout hook

* Cleanup SetupProject

* Update project

* Remove leftover in SetupProject

* Cleanup project.yml

* Add fastlane-plugin-xcconfig

* Improve test

* Update docs
2023-07-14 10:19:38 +02:00
Doug
dff18d7851
UI Tests fixes. (#1322)
* Fix broken UI tests and update snapshots.

* Tweak workflow.

* Update schedule and zip the result bundle.
2023-07-13 16:10:41 +01:00
Michael Kaye
5e97a4a0fa
Performance tests (#1301)
* Add signposts to performance tests.

- Update flow to include support for the migration screen.

* If the welcome screen shows, click on the button.

* Ensure a clean simulator each run.

* Add accessibility identifier for migration screen if required.

* Handle walking into the room and back out again.

* use iphone 14 pro to match what's used in xcode.

* Remove ApplicationTests as duplicated in LoginTests.

We measure app startup time in LoginTests as part of the flow - we may as well avoid spending 60s doing only that measurement in ApplicationTests

* Sleep 10s, the ui is otherwise showing up in random order.

* Revert "Remove ApplicationTests as duplicated in LoginTests."

This reverts commit 8670710315bcd0d6c3c3046f534b32b4c728b837.

* Update script to parse out correct values from results file.

* Allow cancellation of password prompt in any order.

* Remove test timeout, performance tests will always take a while.

* Adjust parsing further

* Remove ApplicationTests.

* Move to a more elegant way to wait for something to disappear.

* Linting.

* Fix unit tests.

---------

Co-authored-by: Doug <douglase@element.io>
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-07-11 10:32:24 +01:00
Doug
a88df388f9
Update Fastlane's upload URL for Sentry. (#1260) 2023-07-05 19:47:51 +01:00
Michael Kaye
28d241d39b
Stop asserting integration test run time & move to performance testing runner. (#1132)
* Stop asserting integration test run time.
* Move integration testing to the perf runner.
2023-06-23 13:44:33 +01:00
Stefan Ceriu
09ed9ddff5 Fix nightly icon label generation after switching to single image source
- it was techincally wrong before as it was hardcoded to 30 points for all images
- now it's reading the image height and using a fifth of it
2023-06-14 11:16:38 +03:00
Stefan Ceriu
a1fdfd068a
Fix UI tests (#950)
* Fixed unstored weak reference warning

* Prevent the timeline from jumping whenever we access XCUIApplication properties

* Prevent UI tests from causing side effects on the timeline

* Update userSession reference screenshots

* Fix create room UI tests

* Update inviteUsers UI test reference screenshots

* Allow certain tests to enable timeline accessibility

* Fix roomLayout tests and update reference screenshots

* Disable the testTimelineLayoutInMiddle test because of flakiness

* Update screenshots following timestamp addition

* Another attempt

* Yet another attempt, replace XCUIScreen screenshots with XCUIApplication ones, decrease delay to 1 second

* Allow tests to retry up to 3 times before failing the run
2023-05-26 17:43:38 +03:00
Stefan Ceriu
35f7ad199e Switch the diawi fastlane plugin to another source after original removal, update gems 2023-05-26 15:00:58 +03:00
Stefan Ceriu
1f8affc5fd Revert "Work around the fastlane-diawi-plugin getting deleted"
This reverts commit c2c56549667e769a88f0c6a27ad28b73b0b6836f.
2023-05-26 15:00:58 +03:00
Mauro
eb68f52a0f
Run single Test on CI for faster debugging (#896)
* let's disable autocorrection

* waiting some more time in flaky tests and updated the content of a test that was failing

* controlled delay waited a bit moe for the timeline to settle

* try await

* trying with a bit more waiting time after the tap and a slow velocity for the swipe

* let's try waiting more time

* workflow for a single ui test

* las try

* slow swiping tests

* commenting out flaky CI tests, for now we'll just disable them

* better description

* flaky test improvement

* disabling animations that are not needed in UITests

* code that already prevents animations in UI tests

* code improv
2023-05-17 16:15:43 +00:00
Stefan Ceriu
c2c5654966 Work around the fastlane-diawi-plugin getting deleted 2023-05-15 17:06:56 +03:00
Mauro
a5d555a33d
Fixing Tests for Xcode 14.3 (#888)
* settting macOS to 13, and let's runa test of... the tests

* I want the artifacts of the test, might give me some more insight in Xcode

* archive artifact

* trying a thing with the xcode version

* push notifications alert makes this test fail

* test improvement

* let's try with a very long time

* let's disable autocorrection

* sleep

* 1 seconds fixed 90% of the issue, 2 should fix 100%

* waiting some more time in flaky tests and updated the content of a test that was failing

* updated a screenshot test that had a notification

* this integration test is a bit so flaky increased the timing

* controlled delay waited a bit moe for the timeline to settle

* try await

* MainActor everywhere

* milliseconds fix

* trying with a bit more waiting time after the tap and a slow velocity for the swipe

* let's try waiting more time
2023-05-15 13:42:40 +00:00
Stefan Ceriu
16eb3311f0 Fix fastlane syntax error 2023-05-11 14:09:36 +03:00
Stefan Ceriu
a762fdbc69
Tag nightlies after a successful build (#871)
* Tag nightlies after a successful build

* Tweaks and fixes after code review
2023-05-11 13:34:37 +03:00
Stefan Ceriu
521eeb2ecf
Fix missing UI tests simulator (#860)
* Fix UI and integration tests missing simulators (older)

* Update fastlane and dependencies
2023-05-09 07:43:44 +03:00
Mauro
61d42a24ba
Leave Room (#699)
* created the row in the view and the alert, and added the new function to the RoomProxy

* fixed an issue with the alert function

* handling the navigation

* fixed a bug with the detail coordinators being dismissed incorrectly when inside a stack

* implementation completed

* replaced UI screenshots

* added a test for the fixed bug of the coordinators

* trying to increase the wait time for the expectation

* improved the test

* improved the buttons UI

* uploading artifacts for unit tests

* added result bundle true

* improved the tests

* added a new test

* pr suggestions

* updating mock

* PR suggestions

* improved tests

* fixed UI tests

* pr should be ready now

* removed testing code

* reduced complexity

* fixed test

* added a an assert to the new test case

* more tests and messages cases

* pr comments addressed

* completed
2023-03-17 13:57:08 +00:00
Stefan Ceriu
b0a7d05a8c
BrowserStack support (#561)
* BrowserStack support

* Add fastlane step to automatically upload builds to BrowserStack

* Add error log for when Application Groups are not available

* Use better applicationSupportDirectory API
2023-02-10 16:52:15 +02:00
Stefan Ceriu
ac77743c7a
Add retry decryption encrypted timeline item debug menu option (#384)
* Fixed a couple of warnings (+2 squashed commits)
Squashed commits:
[21fbc3b0] Add changelog
[abb092c6] Add retry decryption encrypted timeline item debug menu option

* Cleanup room list state computations

* Bump the RustSDK to v1.0.25-alpha

* Fix brew CI errors: remove imagemagick and brew lock file entirely

* Fix release script version bumping

* Bump ruby dependencies
2022-12-22 13:59:38 +02:00