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

Create unit tests for new fields #40

Closed
8 tasks done
icebob opened this issue Aug 21, 2016 · 34 comments
Closed
8 tasks done

Create unit tests for new fields #40

icebob opened this issue Aug 21, 2016 · 34 comments

Comments

@icebob
Copy link
Member

icebob commented Aug 21, 2016

  • fieldCleave
  • fieldMasked
  • fieldNoUiSlider
  • fieldPikaday
  • fieldSlider
  • fieldSpektrum
  • fieldVueMultiSelect
  • fieldGoogleAddress
@lionel-bijaoui
Copy link
Member

I'm going to try after I read a bit more about Karma

@icebob
Copy link
Member Author

icebob commented Aug 22, 2016

OK, but firstly I have to solve the external lib loading problem.

@icebob
Copy link
Member Author

icebob commented Aug 22, 2016

I added external libs to karma. So now can be improve new fields unit tests. 776f6c4

@lionel-bijaoui
Copy link
Member

(I was about to suggest that 😄 )


Passing arrow functions (“lambdas”) to Mocha is discouraged

From the doc
Should we change that ?

@icebob
Copy link
Member Author

icebob commented Aug 22, 2016

Oooo.... what?!?!

@lionel-bijaoui
Copy link
Member

basically, don't do this:

describe('my suite', () => {
  it('my test', () => {
    // should set the timeout of this test to 1000 ms; instead will fail
    this.timeout(1000);
    assert.ok(true);
  });
});

but this:

describe('my suite', function() {
  it('my test', function() {
    this.timeout(1000);
    assert.ok(true);
  });
});

@icebob
Copy link
Member Author

icebob commented Aug 22, 2016

You can use arrows because we use webpack as preprocessor and webpack use babel

@lionel-bijaoui
Copy link
Member

Unit test are going through Webpack ? Wow ok, I didn't know... Webpack does everything 😲

@icebob
Copy link
Member Author

icebob commented Aug 22, 2016

@lionel-bijaoui
Copy link
Member

Sorry, I missed that totally

@icebob
Copy link
Member Author

icebob commented Aug 22, 2016

Nop, so you can use any ES6 feature

@lionel-bijaoui
Copy link
Member

Sweet!

@icebob
Copy link
Member Author

icebob commented Aug 22, 2016

what field test are you make? Because I plan to make an other field tests

@lionel-bijaoui
Copy link
Member

I'm starting with #36

@icebob
Copy link
Member Author

icebob commented Aug 23, 2016

What we need to test in this external fields:

@icebob
Copy link
Member Author

icebob commented Aug 23, 2016

I make fieldMasked and fieldSpektrum

@lionel-bijaoui
Copy link
Member

lionel-bijaoui commented Aug 23, 2016

I'm going to try fieldVueMultiSelect even if fieldNoUiSlider is not finished

@icebob
Copy link
Member Author

icebob commented Aug 23, 2016

Ok, for multiselect I recommend you to use fieldSelectEx.spec.js as a base

@lionel-bijaoui
Copy link
Member

Roger that ! :)

Le 23 août 2016 16:46, "Icebob" [email protected] a écrit :

Ok, for multiselect I recommend you to use fieldSelect.spec.js as a base


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#40 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADT81G25O1xKPQyHtgIWx081dxjo6zNEks5qiwfcgaJpZM4JpX4g
.

@lionel-bijaoui
Copy link
Member

#46 I did something wrong with the branch (a bad rebase), so this one contain a lot a commit from #44.
I hope it's ok.

@icebob
Copy link
Member Author

icebob commented Aug 24, 2016

Ok, #46 & #44 merged

@lionel-bijaoui
Copy link
Member

It was too early for #44, I made several mistakes that I'm fixing

@icebob
Copy link
Member Author

icebob commented Aug 24, 2016

Ok, just #46 contains #44 because both was in the same branch, so I can only merge both

@lionel-bijaoui
Copy link
Member

My bad sorry about that

@icebob
Copy link
Member Author

icebob commented Aug 24, 2016

Nop :)

@icebob
Copy link
Member Author

icebob commented Aug 24, 2016

fieldMasked done.

@icebob
Copy link
Member Author

icebob commented Aug 26, 2016

fieldPikaday, fieldSlider done.

@icebob
Copy link
Member Author

icebob commented Aug 26, 2016

fieldSpectrum done.

@icebob
Copy link
Member Author

icebob commented Aug 26, 2016

fieldGoogleAddress "done"

@lionel-bijaoui
Copy link
Member

Wow cool, you are on 🔥

@icebob
Copy link
Member Author

icebob commented Aug 26, 2016

Now I start the last fieldCleave too.

@icebob
Copy link
Member Author

icebob commented Aug 26, 2016

All test done. 🎉

I made some changes, so if you open the karma debug page ( http://localhost:9877/debug.html ) for test debugging, you will see a similar page instead of empty white blank page 😄
image

@lionel-bijaoui
Copy link
Member

That's so cool ! I need your help with the doc:

  • visible & disabled, values schema functions description
  • fieldSubmit
  • customizable styles

I hope we can finish everything early next week.

icebob added a commit that referenced this issue Aug 26, 2016
@icebob
Copy link
Member Author

icebob commented Aug 26, 2016

Merged #51

@icebob icebob closed this as completed Aug 26, 2016
@icebob icebob mentioned this issue Aug 26, 2016
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants