Skip to content

Commit ef54d03

Browse files
Rename property for brevity.
1 parent b3d9b2c commit ef54d03

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

WooCommerce/Classes/Model/CustomHelpCenterContent.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import WordPressAuthenticator
77
struct CustomHelpCenterContent {
88
/// Custom help center web page's URL
99
///
10-
let helpCenterContentURL: URL
10+
let url: URL
1111

1212
/// Provides a dictionary for analytics tracking
1313
///
@@ -26,15 +26,15 @@ extension CustomHelpCenterContent {
2626
init?(step: AuthenticatorAnalyticsTracker.Step, flow: AuthenticatorAnalyticsTracker.Flow) {
2727
switch step {
2828
case .start where flow == .loginWithSiteAddress:
29-
helpCenterContentURL = WooConstants.URLs.helpCenterForEnterStoreAddress.asURL()
29+
url = WooConstants.URLs.helpCenterForEnterStoreAddress.asURL()
3030
default:
3131
return nil
3232
}
3333

3434
trackingProperties = [
3535
Key.step.rawValue: step.rawValue,
3636
Key.flow.rawValue: flow.rawValue,
37-
Key.url.rawValue: helpCenterContentURL.absoluteString
37+
Key.url.rawValue: url.absoluteString
3838
]
3939
}
4040
}

WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help/HelpAndSupportViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ private extension HelpAndSupportViewController {
313313
/// Opens custom help center URL in a web view
314314
///
315315
func launchCustomHelpCenterWebPage(_ customHelpCenterContent: CustomHelpCenterContent) {
316-
WebviewHelper.launch(customHelpCenterContent.helpCenterContentURL, with: self)
316+
WebviewHelper.launch(customHelpCenterContent.url, with: self)
317317

318318
ServiceLocator.analytics.track(.supportHelpCenterViewed,
319319
withProperties: customHelpCenterContent.trackingProperties)

WooCommerce/WooCommerceTests/Model/CustomHelpCenterContentTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class CustomHelpCenterContentTests: XCTestCase {
2929
let sut = try XCTUnwrap(CustomHelpCenterContent(step: step, flow: flow))
3030

3131
// Then
32-
XCTAssertEqual(sut.helpCenterContentURL, helpContentURL)
32+
XCTAssertEqual(sut.url, helpContentURL)
3333

3434
// Test the `trackingProperties` dictionary values
3535
XCTAssertEqual(sut.trackingProperties[CustomHelpCenterContent.Key.step.rawValue], step.rawValue)

0 commit comments

Comments
 (0)