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

update company name from backend, remove hardcoded company name #28

Merged
merged 8 commits into from
Aug 2, 2022

Conversation

creative-dev-lab
Copy link
Contributor

@creative-dev-lab creative-dev-lab commented Jun 27, 2022

Test plans

How it works
We are currently getting company name, privacy url, find out more url, category mapping data etc. from connector/graphql with below query.

query GetShoppingData ($appId: String) {
  shop(appId: $appId) {
    name
    privacyUrl
    popupFindOutMoreUrl
    categoryMappings(mappedOrExcludedOnly: true) {
      from
      to
      excluded
    }
    minimumPriceThresholds {
      default
      department
      minimumPriceCents
    }
  }
}

if privacyUrl is null, we hide "By opting in..." text block.
if not, we use this privacyUrl for the privacy link in "By opting in..." text block.
Also we use name value for the company name in "By opting in..." text block.
And we use popupFindOutMoreUrl for the find out more URL in Learn More popup widget.

-- Note
name and popupFindOutMoreUrl are not nullable while privacyUrl is nullable.
And in order to test it successfully, categoryMappings should have data. but optional.

Test Environment

  • Open our demo project through Android Studio.
  • Inside ../airrobedemo/ApplicationController.kt -> ApplicationController class -> onCreate(), we have initialize function which has appId and mode as params.
  • Update these appId and mode and test out the below cases.

Test Cases
We can test this out by simulating the connector api call with a specific app_id.

  • check whether "By opting in ..." text block is hidden if the privacy URL is null.
  • check whether it's updated with company name and privacy URL as per it comes from the connector based on app_id.
  • check whether it's updated with popup find more URL as per it comes from the connector based on app_id.

@creative-dev-lab creative-dev-lab requested a review from piusj June 29, 2022 17:44
@piusj
Copy link
Contributor

piusj commented Jul 11, 2022

Deleted my earlier comments as I was testing the wrong branch 😅

@piusj
Copy link
Contributor

piusj commented Jul 11, 2022

  • check whether "By opting in ..." text block is hidden if the privacy URL is null.
    This doesn't work as expected. i set the sandbox app to nil and the text block still shows

Its currently set to nil for that app so please test again

@piusj piusj requested a review from egold July 11, 2022 04:59
@creative-dev-lab creative-dev-lab merged commit 9a2fb72 into master Aug 2, 2022
@creative-dev-lab creative-dev-lab deleted the eli/updateCompanyNameFromBackend branch August 2, 2022 20:58
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.

3 participants