bcgov / nr-spar

SPAR app from FDS (Forestry Digital Services)
https://www2.gov.bc.ca/gov/content/industry/forestry/managing-our-forest-resources/tree-seed/seed-planning-use/spar
Apache License 2.0
1 stars 0 forks source link

Orchard Step Cypress Test #1142

Open craigyu opened 1 month ago

craigyu commented 1 month ago

Test Step 4 - Orchard with Cypress Add a new spec: ../a-class-seedlot-reg-form-orchard.cy.ts

Information

An orchard has a set of parent trees, e.g.

A user can select up to 2 orchards

If one chard is selected in Orchard step, for example orchard 109, step 5 should display parent tree [1, 3, 5, 7, 9].

If two orchards are selected, the union of the two orchards parent trees should be displayed in step 5

For example, a user selects orchard 109 and orchard 110 On step 5, the displayed parents are [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Test parent tree union

select ORCHARD_A only 37 69 101 129 192

select ORCHARD_B only 37 38   53 54 60

UNION ORCHARD_A AND ORCHARD B Get a set of parent tree numbers SET X = [37, 38, 53, 54, 60, 69, 129, 192]

Select ORCHARD_A and ORCHARD_B find the first X.length() number of rows' parent numbers

Compare if the two sets are the same

Other testing

Test the remaining inputs

ngunner15 commented 3 weeks ago

Completed

ngunner15 commented 3 weeks ago

Added validation test

SLDonnelly commented 2 weeks ago

Draft pull request in place so that debugging can occur. There is an issue with linkage between Step 4 and Step 5. I think the code is not saving and that might be causing the test to fail. @craigyu @ngunner15

ngunner15 commented 2 weeks ago

Fixed the issue on dev collab, thanks @craigyu

ngunner15 commented 1 week ago

Tests passing on local environment, but failing in GitHub Actions