Skip to content

Commit

Permalink
try more random stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kshann committed Mar 26, 2024
1 parent 74eb759 commit b3eebc8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ui_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
12 changes: 8 additions & 4 deletions UITests/FindInPageTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class FindInPageTests: XCTestCase {
}

override class func tearDown() {
removeLocalHTML()
//removeLocalHTML()
}

override func setUpWithError() throws {
Expand Down Expand Up @@ -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
}

Expand All @@ -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)")
}
Expand Down

0 comments on commit b3eebc8

Please sign in to comment.