nation3 / mobile-passport

Take your Nation3 passport everywhere
mobile-passport.vercel.app
GNU General Public License v3.0
5 stars 7 forks source link

Apple Wallet: Implement support for the lastUpdated tag (#75) #86

Closed aahna-ashina closed 2 years ago

aahna-ashina commented 2 years ago

Updates code to match the Response Codes at https://developer.apple.com/documentation/walletpasses/get_the_list_of_updatable_passes

200 Return Matching Passes
204 No Matching Passes

This prevents unnecessary downloads of unchanged data.

Dework Task

https://app.dework.xyz/nation3/passport-services-p?taskId=b479bb3a-cf2b-4322-b3fe-0eb720da8ad7

Related GitHub Issue

closes #75

How Has This Been Tested?

Integration Tests

npm run cy:headless
====================================================================================================

  (Run Finished)

       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  index.cy.ts                              00:01        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  downloadPass.cy.ts                       00:09        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  pushLastUpdate.cy.ts                     515ms        4        4        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  [passTypeIdentifier].cy.ts               00:01        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  [serialNumber].cy.ts                     00:01        6        6        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  log.cy.ts                                499ms        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  [serialNumber].cy.ts                     00:01        5        5        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✔  All specs passed!                        00:16       28       28        -        -        -  

Are There Admin Tasks?

vercel[bot] commented 2 years ago

@aahna-ashina is attempting to deploy a commit to the Nation3 Team on Vercel.

A member of the Team first needs to authorize it.

codecov-commenter commented 2 years ago

Codecov Report

Merging #86 (3435901) into main (7fa1eff) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #86   +/-   ##
=======================================
  Coverage   80.69%   80.69%           
=======================================
  Files           5        5           
  Lines         202      202           
  Branches       22       22           
=======================================
  Hits          163      163           
  Misses         38       38           
  Partials        1        1           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.