diff --git a/.github/workflows/ui_tests.yml b/.github/workflows/ui_tests.yml index 47eb383d2c..340dc69cea 100644 --- a/.github/workflows/ui_tests.yml +++ b/.github/workflows/ui_tests.yml @@ -85,7 +85,11 @@ jobs: # --header "Content-Type: application/json" \ # --data ' { "data": { "name": "GH Workflow Failure - UI Tests", "projects": [ "${{ vars.MACOS_APP_DEVELOPMENT_ASANA_PROJECT_ID }}" ], "notes" : "The end to end workflow has failed. See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" } }' - + - name: Show me html file content + run: | + ls -latr /Users/runner/Documents + cat /Users/runner/Documents/lorem_ipsum.html + - name: Publish tests report uses: mikepenz/action-junit-report@v4 if: always() diff --git a/UITests/FindInPageTests.swift b/UITests/FindInPageTests.swift index d15abad731..84c713d91a 100644 --- a/UITests/FindInPageTests.swift +++ b/UITests/FindInPageTests.swift @@ -31,7 +31,7 @@ class FindInPageTests: XCTestCase { } override class func tearDown() { - removeLocalHTML() + //removeLocalHTML() } override func setUpWithError() throws { @@ -432,8 +432,12 @@ private extension FindInPageTests { /// A shared URL to reference the local HTML file class var loremIpsumFileURL: URL { let loremIpsumFileName = "lorem_ipsum.html" - let tempDirectory = FileManager.default.temporaryDirectory - let loremIpsumHTMLFileURL = tempDirectory.appendingPathComponent(loremIpsumFileName) + XCTAssertNotNil( + FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first, + "It wasn't possible to obtain a local file URL for the sandbox Documents directory." + ) + let documentsDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! + let loremIpsumHTMLFileURL = documentsDirectory.appendingPathComponent(loremIpsumFileName) return loremIpsumHTMLFileURL } @@ -450,7 +454,7 @@ private extension FindInPageTests { let loremIpsumData = Data(loremIpsumHTML.utf8) do { - try loremIpsumData.write(to: loremIpsumFileURL, options: [.atomic, .noFileProtection ]) + try loremIpsumData.write(to: loremIpsumFileURL, options: []) } catch { XCTFail("It wasn't possible to write out the required local HTML file for the tests: \(error.localizedDescription)") }