Skip to content

Fix test that is inconsistent across daylight saving time changes#7977

Merged
mitchellhenke merged 0 commit intomainfrom
mitchellhenke/fix-daylight-saving-time-bug-in-usps-job-spec
Mar 13, 2023
Merged

Fix test that is inconsistent across daylight saving time changes#7977
mitchellhenke merged 0 commit intomainfrom
mitchellhenke/fix-daylight-saving-time-bug-in-usps-job-spec

Conversation

@mitchellhenke
Copy link
Contributor

@mitchellhenke mitchellhenke commented Mar 13, 2023

🛠 Summary of changes

Looks like a hard-coded time frame was causing these tests to fail relatively consistently since the DST change.

@mitchellhenke mitchellhenke requested review from a team and racingspider March 13, 2023 16:19
Comment on lines 431 to 432
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me to get the tests passing but I don't understand why it started failing. And I think this version will start failing once we go back to daylight savings in Fall

Copy link
Contributor Author

@mitchellhenke mitchellhenke Mar 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, yeah, good point. I dug a bit and it seems like it's due to places where the tests use ActiveSupport::TimeZone['Central Time (US & Canada)'], which will change offsets across DST, instead of ActiveSupport::TimeZone[-6], which is what the job itself uses here.

I added a900e42 which should be more robust in that regard. I ran the tests for both Standard time and Daylight Saving time, and it passes in both cases, so I'm hopeful this addresses it.

@mitchellhenke mitchellhenke merged this pull request into main Mar 13, 2023
@mitchellhenke mitchellhenke deleted the mitchellhenke/fix-daylight-saving-time-bug-in-usps-job-spec branch March 13, 2023 17:55
mitchellhenke pushed a commit that referenced this pull request Mar 14, 2023
)

* Fix test that is inconsistent across daylight saving time changes

changelog: Internal, Testing, Fix test that is inconsistent across daylight saving time changes

* refactor to work consistently across DST
mitchellhenke pushed a commit that referenced this pull request Mar 14, 2023
)

* Fix test that is inconsistent across daylight saving time changes

changelog: Internal, Testing, Fix test that is inconsistent across daylight saving time changes

* refactor to work consistently across DST
eileen-nava added a commit that referenced this pull request Mar 15, 2023
* Fix test that is inconsistent across daylight saving time changes (#7977)

* Fix test that is inconsistent across daylight saving time changes

changelog: Internal, Testing, Fix test that is inconsistent across daylight saving time changes

* refactor to work consistently across DST

* update state id page to include address fields

* capture secondary address info on state id page

* update translations

* neaten up code

* update translations

* state id displays new fields but doesn't save to correct attributes

* save to updated attributes

* changelog: Upcoming Features, In-person proofing, collect state id address

* fix html & yaml formatting

* fix failing tests

* add path expectation to spec

* Fix bordered radio button styling

* clean up build

* respond to feedback

---------

Co-authored-by: Mitchell Henke <mitchell.henke@gsa.gov>
Co-authored-by: Sheldon Bachstein <sheldon.bachstein@gsa.gov>
svalexander pushed a commit that referenced this pull request Mar 16, 2023
* Fix test that is inconsistent across daylight saving time changes (#7977)

* Fix test that is inconsistent across daylight saving time changes

changelog: Internal, Testing, Fix test that is inconsistent across daylight saving time changes

* refactor to work consistently across DST

* update state id page to include address fields

* capture secondary address info on state id page

* update translations

* neaten up code

* update translations

* state id displays new fields but doesn't save to correct attributes

* save to updated attributes

* changelog: Upcoming Features, In-person proofing, collect state id address

* fix html & yaml formatting

* fix failing tests

* add path expectation to spec

* Fix bordered radio button styling

* clean up build

* respond to feedback

---------

Co-authored-by: Mitchell Henke <mitchell.henke@gsa.gov>
Co-authored-by: Sheldon Bachstein <sheldon.bachstein@gsa.gov>
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