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

Add timezones selectors and tests #11131

Merged
merged 8 commits into from
Feb 8, 2017
Merged

Conversation

retrofox
Copy link
Contributor

@retrofox retrofox commented Feb 2, 2017

This PR depends on #10934.

This PR add timezones selectors and also add tests for all of them.

Testing

Run client tests

state selectors

> npm run test-client client/state/selectors/test/

@matticbot
Copy link
Contributor

@retrofox retrofox changed the title Update/timezones state selectors Add timezones selectors and tests Feb 2, 2017
@retrofox retrofox mentioned this pull request Feb 2, 2017
5 tasks
@retrofox retrofox force-pushed the update/timezones-state-selectors branch from 6bf1cfa to 8e6442f Compare February 3, 2017 18:55
@retrofox retrofox force-pushed the update/timezones-state-selectors branch from 8e6442f to 3b3e1e3 Compare February 8, 2017 00:12
@retrofox retrofox requested a review from gwwar February 8, 2017 00:12
@retrofox retrofox added State [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 8, 2017
Copy link
Contributor

@gwwar gwwar left a comment

Choose a reason for hiding this comment

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

I left a few minor notes, but this should be good to 🚢 after those have been tidied.

/**
* Internal dependencies
*/
import { isRequestingTimezones } from '../';
Copy link
Contributor

Choose a reason for hiding this comment

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

We can go ahead and delete this file, since we're using the data/http layer and don't store this state explicitly

it( 'should return null if `timezones` aren\'t synced', () => {
const state = {
timezones: {
rawOffsets: [],
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this should be an object

timezones: {
rawOffsets: [],
byContinent: {},
requesting: null
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove any requesting props from mock data

@gwwar gwwar added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 8, 2017
@retrofox retrofox force-pushed the update/timezones-state-selectors branch from 3b3e1e3 to 11adead Compare February 8, 2017 11:38
@retrofox retrofox force-pushed the update/timezones-state-selectors branch from 11adead to b483bc3 Compare February 8, 2017 11:39
@retrofox retrofox force-pushed the update/timezones-state-selectors branch from b483bc3 to b691847 Compare February 8, 2017 11:43
@retrofox retrofox merged commit 340b844 into master Feb 8, 2017
@retrofox retrofox deleted the update/timezones-state-selectors branch February 8, 2017 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants