Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Skips browser testing due to freezing" #467

Merged
merged 2 commits into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions Tests/CartonCommandTests/TestCommandTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ private enum Constants {
static let failTestPackageName = "FailTest"
}

func skipBrowserTest() throws {
throw XCTSkip("[FIXME] Running tests in the browser is currently disabled because it causes freezing")
}

final class TestCommandTests: XCTestCase {
func testWithNoArguments() async throws {
try await withFixture(Constants.testAppPackageName) { packageDirectory in
Expand Down Expand Up @@ -79,7 +75,6 @@ final class TestCommandTests: XCTestCase {
}

func testHeadlessBrowser() async throws {
try skipBrowserTest()
guard Process.findExecutable("safaridriver") != nil else {
throw XCTSkip("WebDriver is required")
}
Expand All @@ -93,12 +88,10 @@ final class TestCommandTests: XCTestCase {
}

func testHeadlessBrowserWithCrash() async throws {
try skipBrowserTest()
try await checkCartonTestFail(fixture: Constants.crashTestPackageName)
}

func testHeadlessBrowserWithFail() async throws {
try skipBrowserTest()
try await checkCartonTestFail(fixture: Constants.failTestPackageName)
}

Expand All @@ -111,14 +104,13 @@ final class TestCommandTests: XCTestCase {
["carton", "test", "--environment", "browser", "--headless"],
packageDirectory: packageDirectory.url
)
try result.checkNonZeroExit()
XCTAssertNotEqual(result.exitStatus, .terminated(code: 0))
}
}

// This test is prone to hanging on Linux.
#if os(macOS)
func testEnvironmentDefaultBrowser() async throws {
try skipBrowserTest()
try await withFixture(Constants.testAppPackageName) { packageDirectory in
let expectedTestSuiteCount = 1
let expectedTestsCount = 1
Expand Down