Skip to content

Commit

Permalink
Upgrade deps and add @retroactive to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sampettersson committed Jan 20, 2025
1 parent e6e9a38 commit 792ec68
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 18 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ jobs:
with:
xcode-version: latest-stable
- name: Build
env:
platform: ${{ 'iOS Simulator' }}
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
xcodebuild docbuild -scheme Placement -derivedDataPath $GITHUB_WORKSPACE/build -destination "platform=$platform,name=$device"
xcodebuild docbuild -scheme Placement -derivedDataPath $GITHUB_WORKSPACE/build -destination "platform=iOS Simulator,OS=18.0,name=iPhone 16 Pro"
- name: Clone swift-docc
run: git clone -b release/5.10 https://github.com/apple/swift-docc.git
- name: Build swift-docc
Expand Down
4 changes: 2 additions & 2 deletions Placement.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM ="";
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand Down Expand Up @@ -962,7 +962,7 @@
repositoryURL = "https://github.com/nalexn/ViewInspector.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.9.2;
minimumVersion = 0.10.1;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"originHash" : "23e2351daabac1215fcb46bc76dddeaae2e139c702da3e55143877948853cec5",
"pins" : [
{
"identity" : "viewinspector",
"kind" : "remoteSourceControl",
"location" : "https://github.com/nalexn/ViewInspector.git",
"state" : {
"revision" : "ac7df67c4e0593470eda90a550f8493a81609745",
"version" : "0.9.2"
"revision" : "788e7879d38a839c4e348ab0762dcc0364e646a2",
"version" : "0.10.1"
}
}
],
"version" : 2
"version" : 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import Foundation
import ViewInspector
@testable import Placement

extension LayoutSizeModifier: Inspectable {}
extension LayoutSizeModifier: @retroactive Inspectable {}
2 changes: 1 addition & 1 deletion Sources/PlacementTests/Inspectable/Layouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import Foundation
import ViewInspector
@testable import Placement

extension Layouter: Inspectable {}
extension Layouter: @retroactive Inspectable {}
2 changes: 1 addition & 1 deletion Sources/PlacementTests/Inspectable/PlacementModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import Foundation
import ViewInspector
@testable import Placement

extension PlacementModifier: Inspectable {}
extension PlacementModifier: @retroactive Inspectable {}
4 changes: 2 additions & 2 deletions Sources/PlacementTests/PlacementLayoutNativeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ final class PlacementLayoutNativeTests: XCTestCase {
}
}

struct UpdateContentView<Content: View>: View, Inspectable {
struct UpdateContentView<Content: View>: View {
@State var flag: Bool = false
var content: (_ flag: Bool) -> Content
internal var didAppear: ((Self) -> Void)?
Expand Down Expand Up @@ -160,7 +160,7 @@ final class PlacementLayoutNativeTests: XCTestCase {
}

let didAppearExp = sut.on(\.didAppear) { view in
try view.vStack().first?.button().tap()
try view.implicitAnyView().vStack().first?.button().tap()
}

ViewHosting.host(view: sut)
Expand Down
4 changes: 2 additions & 2 deletions Sources/PlacementTests/PlacementLayoutTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ final class PlacementLayoutTests: XCTestCase {
}
}

struct UpdateContentView<Content: View>: View, Inspectable {
struct UpdateContentView<Content: View>: View {
@State var flag: Bool = false
var content: (_ flag: Bool) -> Content
internal var didAppear: ((Self) -> Void)?
Expand Down Expand Up @@ -159,7 +159,7 @@ final class PlacementLayoutTests: XCTestCase {
}

let didAppearExp = sut.on(\.didAppear) { view in
try view.vStack().first?.button().tap()
try view.implicitAnyView().vStack().first?.button().tap()
}

ViewHosting.host(view: sut)
Expand Down
4 changes: 2 additions & 2 deletions Sources/PlacementTests/PositioningTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ enum PlacementLayouterType {
final class PositioningTests: XCTestCase {
func testThatPositioningIsCorrect() {

struct Content: View, Inspectable {
struct Content: View {
var hasPlaced: ((Self) -> Void)?
var onContainerProxy: (_ type: PlacementLayouterType, _ proxy: GeometryProxy) -> Void
var onChildProxy: (_ type: PlacementLayouterType, _ proxy: GeometryProxy) -> Void
Expand Down Expand Up @@ -82,7 +82,7 @@ final class PositioningTests: XCTestCase {

ViewHosting.host(view: sut)

wait(for: [didAppearExp], timeout: 0.1)
wait(for: [didAppearExp], timeout: 0.5)
}
}

0 comments on commit 792ec68

Please sign in to comment.