Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launchpad: Add task helper and checklist unit tests #67524

Merged
merged 7 commits into from
Sep 13, 2022

Conversation

jeyip
Copy link
Contributor

@jeyip jeyip commented Sep 7, 2022

Proposed Changes

  • Add unit testing to launchpad task helper methods

Testing Instructions

  • yarn test-client task-helper
  • Verify that unit tests pass
  • yarn test-client launchpad/test/checklist.tsx
  • Verify that unit tests pass

Pre-merge Checklist

Related to #

@jeyip jeyip added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature] Launchpad The onboarding Launchpad that guides users through setting up their site and getting it launched. labels Sep 7, 2022
@matticbot
Copy link
Contributor

matticbot commented Sep 7, 2022

} );
} );

describe( 'when a non-existing flow is provided', () => {
Copy link
Contributor Author

@jeyip jeyip Sep 7, 2022

Choose a reason for hiding this comment

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

It's strange that getArrayOfFilteredTasks returns null when no flow is provided and undefined when no tasks are found. Maybe we should rethink the return values?

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it should be an empty array in those cases? or other thoughts?

Copy link
Contributor Author

@jeyip jeyip Sep 13, 2022

Choose a reason for hiding this comment

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

I like empty arrays 👍. No need to type check for a false-y value anymore.

@jeyip jeyip changed the title Launchpad: Add task helper unit test Launchpad: Add task helper and checklist unit tests Sep 7, 2022
@agrullon95
Copy link
Contributor

agrullon95 commented Sep 12, 2022

Testing

  • Run yarn test-client task-helper and verify the test cases are passing.

  • Run yarn test-client launchpad/test/checklist.tsx and verify the test cases are passing.


The yarn test launchpad/test/checklist.tsx command is not working for me. When I run it in the terminal, nothing happens.

Working now using the correct command.

Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

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

Im experiencing the same issues as Anthony with the yarn test launchpad/test/checklist.tsx command. Was it supposed to be yarn test-client launchpad/test/checklist.tsx instead? that seems to work for me.

Assuming that is the correct command, both test files are passing on my end.
Screen Shot 2022-09-13 at 8 18 27 AM
Screen Shot 2022-09-13 at 8 18 58 AM

@jeyip
Copy link
Contributor Author

jeyip commented Sep 13, 2022

yarn test-client launchpad/test/checklist.tsx instead? that seems to work for me.

Assuming that is the correct command, both test files are passing on my end.

My mistake y'all! @agrullon95 + @Addison-Stavlo It is supposed to be yarn test-client in both instances. I updated the testing notes to reflect that.

@jeyip jeyip enabled auto-merge (squash) September 13, 2022 17:58
@jeyip jeyip merged commit 185ff49 into trunk Sep 13, 2022
@jeyip jeyip deleted the add/launchpad-task-helper-unit-tests branch September 13, 2022 18:08
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 13, 2022
@a8ci18n
Copy link

a8ci18n commented Sep 13, 2022

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7526401

Hi @jeyip, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include this string: Task enabled

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Sep 21, 2022

Translation for this Pull Request has now been finished.

villanovachile pushed a commit that referenced this pull request Sep 27, 2022
* Add task helper unit test

* Add checklist unit test

* Add checklist item unit test (#67530)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Launchpad The onboarding Launchpad that guides users through setting up their site and getting it launched.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants