Skip to content

[MOB-17169] Add Get/Set APIs for Location Hint#271

Merged
kevinlind merged 9 commits intoadobe:devfrom
kevinlind:mob-17169-hint-apis
Sep 21, 2022
Merged

[MOB-17169] Add Get/Set APIs for Location Hint#271
kevinlind merged 9 commits intoadobe:devfrom
kevinlind:mob-17169-hint-apis

Conversation

@kevinlind
Copy link
Copy Markdown
Contributor

Description

Adds getLocationHint and setLocationHint APIs to Edge+PublicAPI.
The getLocationHint API retrieves the current stored location hint value or nil if the location hint is not set or is expired.
The setLocationHint API sets the given location hint. The setter also allows nil/empty values which clears the currently stored location hint value.

Podfile updated to use AEPCore from GitHub branch dev-v3.7.1, as new EventSource values are needed by Edge. Will need to release Core v3.7.1 before releasing these changes to Edge.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@kevinlind kevinlind requested review from addb and praveek September 19, 2022 17:07
sleep(1)
}

func testSetLocationHint_valueHint_dispatchesEdgeUpdateProperty() {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved these test cases from the Functional test suite to the Unit Test suite. All the above code is the same as before and the below tests are new for setLocationHint and getLocationHint.

import AEPServices
import XCTest

class EdgePublicAPITests: FunctionalTestBase {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new file with new functional tests. The "deleted" file EdgePublicAPITests I moved from the FunctionalTests folder to the UnitTests folder.

Copy link
Copy Markdown
Contributor

@addb addb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left few nit comments. Looks good overall!

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 19, 2022

Codecov Report

Merging #271 (a3a4e14) into dev (03096b0) will increase coverage by 0.05%.
The diff coverage is 93.48%.

@@            Coverage Diff             @@
##              dev     #271      +/-   ##
==========================================
+ Coverage   95.45%   95.50%   +0.05%     
==========================================
  Files          28       28              
  Lines        1143     1045      -98     
==========================================
- Hits         1091      998      -93     
+ Misses         52       47       -5     

Copy link
Copy Markdown
Contributor

@addb addb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@kevinlind kevinlind merged commit d76f350 into adobe:dev Sep 21, 2022
@kevinlind kevinlind deleted the mob-17169-hint-apis branch September 21, 2022 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants