simorgh icon indicating copy to clipboard operation
simorgh copied to clipboard

WSTEAMA-1041 - Update Integration Tests to Reflect New Radio Schedule Response

Open pvaliani opened this issue 1 year ago • 2 comments

Resolves JIRA 1041

Overall changes

  • Updates the integration test arabic fixture to one from the bff which includes a radio schedule
  • Fixes breaking tests/updates snapshots to correspond to the new test fixture
  • Adds a new canonical Radio Schedule test specifically for arabic

pvaliani avatar Feb 21 '24 14:02 pvaliani

Updating the arabic.json fixture and running just the amp tests doesn't result in any snapshot failures but 128 skips? The canonical tests however, had 2 fails. One for the curations (which is expected because we've added RS) and one for the date diff in the copyright of the footer because our fixture is from 2024 replacing 2023

https://github.com/bbc/simorgh/blob/953d2851892fa5324bd2bdd41e1b588649cdbe4b/src/integration/pages/homePage/arabic/amp.test.js

pvaliani avatar Feb 22 '24 10:02 pvaliani

We have added a new test to canonicalTest.js for the homePage. We purposely let this fail by changing the if hasRadioSchedule condition to false.

We can see in the console output when running the test that we have a span based on getElementById for the Radio Schedule being returned and our curations expectation is out by 1 which we know this is becasue a Radio Schedule has been added to this test

Screenshot 2024-02-22 at 15 52 37 Screenshot 2024-02-22 at 15 53 00

holchris avatar Feb 22 '24 16:02 holchris