pet-rescue icon indicating copy to clipboard operation
pet-rescue copied to clipboard

Add tests for DefaultPetTask refactor

Open kasugaijin opened this issue 1 year ago • 9 comments

@atbalaji if you want to take this on seeing as you worked on the PR, please assign yourself. Otherwise, let me know in a comment below and we can open it up to someone else.

PR

kasugaijin avatar Jul 21 '24 23:07 kasugaijin

Currently I'm not taking this @kasugaijin. I would like to revisit this incase no one else took this.

atbalaji avatar Jul 24 '24 08:07 atbalaji

@atbalaji all yours when you want it...just assign yourself.

kasugaijin avatar Jul 24 '24 15:07 kasugaijin

@kasugaijin can u please assign this

Aaryanpal avatar Sep 09 '24 19:09 Aaryanpal

@Aaryanpal no need to test front end that looks for DOM elements. Just backend model or controller level makes sense

kasugaijin avatar Sep 09 '24 19:09 kasugaijin

WIP

Aaryanpal avatar Sep 19 '24 14:09 Aaryanpal

WIP

Aaryanpal avatar Oct 08 '24 14:10 Aaryanpal

@kasugaijin I am not getting any clue for what use case i need to write the Test Cases. Any Help Will be Highly Appreciated.

Aaryanpal avatar Oct 09 '24 11:10 Aaryanpal

@Aaryanpal the original PR added species to the default pet task service, so it would be good to have some tests where we set task A on dogs and task B on cats and make sure they are assigned to cats and dogs when they are created

kasugaijin avatar Oct 09 '24 13:10 kasugaijin

Thanks for the Guidance @kasugaijin. Raised the PR

Aaryanpal avatar Oct 09 '24 18:10 Aaryanpal

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar Nov 09 '24 00:11 github-actions[bot]

@jmilljr24 is there still work to do here? Happy to write some specs if needed, just not sure if I've followed the conversation in here regarding what has or hasn't been done.

wiliajc87 avatar Nov 12 '24 16:11 wiliajc87

@wiliajc87 So PR #879 was merged but we do not have test coverage for it. It added the ability for default pet tasks to be assigned to a general category or by species, ie cat, dog. A new pr for tests was started but was closed before being merged so nothing for testing is done yet.

If you go to the staff dashboard you should see the default pet tasks with the categories. If you create a new pet, the default pet tasks will be added as tasks to this newly created pet.

We want to test that if a default pet task has the category "dog", the newly created dog gets that task. A cat should not get a dog task.

Let me know if that makes sense and if you would like to be assigned.

jmilljr24 avatar Nov 12 '24 17:11 jmilljr24

@jmilljr24 happy to take it!

wiliajc87 avatar Nov 12 '24 17:11 wiliajc87

@wiliajc87 Awesome! Thank you. #1053 is the closed PR that wasn't merge. I might provide more context if you want to take a look.

jmilljr24 avatar Nov 12 '24 17:11 jmilljr24

@jmilljr24 Sorry it took so long, but I've got a PR up here now: https://github.com/rubyforgood/homeward-tails/pull/1178/files

wiliajc87 avatar Nov 22 '24 20:11 wiliajc87