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

Add deeplinks for checking/validation #11

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Conversation

gclssvglx
Copy link
Collaborator

@gclssvglx gclssvglx commented Jun 13, 2024

Add deeplinks for checking/validation

Add deep links to top level destinations and a feature sub screen and check that the navigation and back stack behave as expected.

Why

We need to test the built in deep link behaviour of the nav controller is suitable for our use case.

Example use cases:

  • Push notifications (e.g. click and it takes you to a page in the app)
  • IDV journey (e.g. start IDV on web and go to app)
  • Wallet journey (e.g. on web click to add this document to your wallet)
  • What's new (e.g. we launch a feature and promote it in the app)

The ability to send data from a web URL deeplink has been proved here - see video below. This accounts for the IDV and Wallet journeys.

Data (single element, multiple elements, or serialised objects) can be sent by adding it in the NavHost routes, like this...

composable("about",
    deepLinks = listOf( /* create deeplink */ ),
    arguments = listOf(
        navArgument("id") {
            type = NavType.IntType
            defaultValue = -1
        }
    )
) { entry ->
    AboutScreen(navController, entry.arguments?.getInt("id")) // dig out the data and pass as param(s)
}

Jira GOVUKAPP-482

Videos

This PR...

Screen_recording_20240613_100017.webm

Original deeplink test which shows data being passed into the app via a deeplink...

Screen_recording_20240614_082431.webm

@gclssvglx gclssvglx force-pushed the GOVUKAPP-482_deeplinks branch from dcf2a47 to 8eceb6b Compare June 13, 2024 10:54
@gclssvglx gclssvglx marked this pull request as ready for review June 13, 2024 12:08
@gclssvglx gclssvglx requested a review from a team as a code owner June 13, 2024 12:08
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@gclssvglx gclssvglx merged commit f932d39 into develop Jun 14, 2024
7 checks passed
@gclssvglx gclssvglx deleted the GOVUKAPP-482_deeplinks branch June 14, 2024 08:37
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