From e1d35ce111c74d3b2d473543950881f7843ea37a Mon Sep 17 00:00:00 2001 From: Olena Stepaniuk <92721590+OlenaPostindustria@users.noreply.github.com> Date: Fri, 3 Jun 2022 11:15:30 +0300 Subject: [PATCH] Skip button improvements (#660) * feat: set default skip button position to topLeft * fix: update test --- .../AdTypes/AdView/VideoControlsConfiguration.swift | 2 +- PrebidMobileTests/RenderingTests/Tests/PBMVideoViewTest.swift | 2 +- .../RenderingTests/Tests/VideoControlsConfigTests.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PrebidMobile/PrebidMobileRendering/AdTypes/AdView/VideoControlsConfiguration.swift b/PrebidMobile/PrebidMobileRendering/AdTypes/AdView/VideoControlsConfiguration.swift index 37a7cdb04..e5ab2956f 100644 --- a/PrebidMobile/PrebidMobileRendering/AdTypes/AdView/VideoControlsConfiguration.swift +++ b/PrebidMobile/PrebidMobileRendering/AdTypes/AdView/VideoControlsConfiguration.swift @@ -150,5 +150,5 @@ public class VideoControlsConfiguration: NSObject { private var _closeButtonPosition = Position.topRight private var _skipButtonArea = PBMConstants.BUTTON_AREA_DEFAULT.doubleValue - private var _skipButtonPosition = Position.topRight + private var _skipButtonPosition = Position.topLeft } diff --git a/PrebidMobileTests/RenderingTests/Tests/PBMVideoViewTest.swift b/PrebidMobileTests/RenderingTests/Tests/PBMVideoViewTest.swift index d03396a41..f39c64c5b 100644 --- a/PrebidMobileTests/RenderingTests/Tests/PBMVideoViewTest.swift +++ b/PrebidMobileTests/RenderingTests/Tests/PBMVideoViewTest.swift @@ -286,7 +286,7 @@ class PBMVideoViewTest: XCTestCase, PBMCreativeResolutionDelegate, PBMCreativeVi } XCTAssertEqual(videoView.skipButtonDecorator.buttonArea, 0.1) - XCTAssertEqual(videoView.skipButtonDecorator.buttonPosition, .topRight) + XCTAssertEqual(videoView.skipButtonDecorator.buttonPosition, .topLeft) XCTAssertEqual(videoView.skipButtonDecorator.button.image(for: .normal), UIImage(named: "PBM_skipButton", in: PBMFunctions.bundleForSDK(), compatibleWith: nil)) XCTAssertEqual(videoView.skipButtonDecorator.button.isHidden, true) } diff --git a/PrebidMobileTests/RenderingTests/Tests/VideoControlsConfigTests.swift b/PrebidMobileTests/RenderingTests/Tests/VideoControlsConfigTests.swift index b06979b34..ddf172b5f 100644 --- a/PrebidMobileTests/RenderingTests/Tests/VideoControlsConfigTests.swift +++ b/PrebidMobileTests/RenderingTests/Tests/VideoControlsConfigTests.swift @@ -44,7 +44,7 @@ class VideoControlsConfigTests: XCTestCase { func testDefaultSkipButtonPosition() { let adConfiguration = VideoControlsConfiguration() - XCTAssertEqual(adConfiguration.skipButtonPosition, .topRight) + XCTAssertEqual(adConfiguration.skipButtonPosition, .topLeft) } func testDefaultSkipButtonDelay() {