Skip to content

Commit 6ab33a9

Browse files
committed
test: create temporary keychain for mac ui tests
1 parent be91336 commit 6ab33a9

File tree

2 files changed

+29
-14
lines changed

2 files changed

+29
-14
lines changed

.github/workflows/ui-tests.yml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
- targetPlatform: StandaloneOSX
2323
buildMethod: MacBuilder.BuildForAltTester
2424
buildPath: sample/Builds/MacOS
25-
- targetPlatform: StandaloneWindows64
26-
buildMethod: WindowsBuilder.BuildForAltTester
27-
buildPath: sample/Builds/Windows64
28-
- targetPlatform: Android
29-
buildMethod: MobileBuilder.BuildForAltTester
30-
buildPath: sample/Builds/Android
25+
# - targetPlatform: StandaloneWindows64
26+
# buildMethod: WindowsBuilder.BuildForAltTester
27+
# buildPath: sample/Builds/Windows64
28+
# - targetPlatform: Android
29+
# buildMethod: MobileBuilder.BuildForAltTester
30+
# buildPath: sample/Builds/Android
3131
steps:
3232
- uses: actions/checkout@v3
3333
with:
@@ -70,19 +70,29 @@ jobs:
7070
- targetPlatform: StandaloneOSX
7171
runs-on: [self-hosted, macOS]
7272
test_script: pytest -xs test/test_mac.py::MacTest
73-
- targetPlatform: StandaloneWindows64
74-
runs-on: [self-hosted, windows]
75-
test_script: pytest -xs test/test_windows.py::WindowsTest
76-
- targetPlatform: Android
77-
runs-on: [ self-hosted, macOS ]
78-
test_script: browserstack-sdk pytest -s ./test/test_android.py --browserstack.config "browserstack.android.yml"
73+
# - targetPlatform: StandaloneWindows64
74+
# runs-on: [self-hosted, windows]
75+
# test_script: pytest -xs test/test_windows.py::WindowsTest
76+
# - targetPlatform: Android
77+
# runs-on: [ self-hosted, macOS ]
78+
# test_script: browserstack-sdk pytest -s ./test/test_android.py --browserstack.config "browserstack.android.yml"
7979
concurrency:
8080
group: test-${{ matrix.targetPlatform }}
8181
runs-on: ${{ matrix.runs-on }}
8282
steps:
8383
- uses: actions/checkout@v3
8484
with:
8585
lfs: true
86+
- name: Create temporary keychain
87+
if: ${{ matrix.targetPlatform == 'StandaloneOSX' }}
88+
run: |
89+
security list-keychains
90+
security delete-keychain temporary || true
91+
security list-keychains
92+
security create-keychain -p "" temporary
93+
security default-keychain -s temporary
94+
security unlock-keychain -p "" temporary
95+
security set-keychain-settings -lut 600 temporary
8696
- uses: actions/download-artifact@v4
8797
with:
8898
name: Build-${{ matrix.targetPlatform }}
@@ -114,6 +124,13 @@ jobs:
114124
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
115125
working-directory: sample/Tests
116126
run: ${{ matrix.test_script }}
127+
- name: Remove temporary keychain
128+
if: ${{ matrix.targetPlatform == 'StandaloneOSX' }}
129+
run: |
130+
security list-keychains
131+
security default-keychain -s ~/Library/Keychains/login.keychain-db
132+
security delete-keychain temporary
133+
security list-keychains
117134
# test-ios:
118135
# name: Run iOS UI tests 🧪
119136
# runs-on: [ self-hosted, macOS ]

sample/Tests/test/test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,11 @@ def test_1_passport_functions(self):
4949
# Get access token
5050
self.altdriver.find_object(By.NAME, "GetAccessTokenBtn").tap()
5151
text = output.get_text()
52-
print(f"GetAccessTokenBtn output: {text}")
5352
self.assertTrue(len(text) > 50)
5453

5554
# Get ID token
5655
self.altdriver.find_object(By.NAME, "GetIdTokenBtn").tap()
5756
text = output.get_text()
58-
print(f"GetIdTokenBtn output: {text}")
5957
self.assertTrue(len(text) > 50)
6058

6159
# Get email

0 commit comments

Comments
 (0)