Closed Bug 1023807 Opened 5 years ago Closed 5 years ago

[B2G][Calendar] Month view: Dot does not appears when event cross couple of days

Categories

(Firefox OS Graveyard :: Gaia::Calendar, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.0+, b2g-v2.0 verified, b2g-v2.1 verified)

VERIFIED FIXED
2.0 S6 (18july)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- verified
b2g-v2.1 --- verified

People

(Reporter: edchen, Assigned: evanxd)

References

Details

(Whiteboard: [priority][p=3])

Attachments

(4 files, 2 obsolete files)

Attached image Screenshot
When user add an event during 4 days, ex: 6/2 - 6/5, the dot does not appear on 6/3 - 6/5.

[Environment]
Gaia      8d865839d932bfbd5e157f376f74d8cb12bfdd51
Gecko     https://hg.mozilla.org/releases/mozilla-aurora/rev/1d4046a8cb6c
BuildID   20140610000223
Version   32.0a2
ro.build.version.incremental=94
ro.build.date=Tue May 20 09:29:20 CST 2014

[STR]
1. Launch calendar app
2. Set up an event
3. The period set 6/2 - 6/5 (5am - 12pm)
4. Tap save

[Actual result]
1. The dot only shows on 6/2

[Expected result]
1. The dot should be appear on 6/3 to 6/5
2. 6/3 and 6/4 should be indicated all day event

[Attachment]
Screenshot
blocking-b2g: --- → 2.0?
blocking-b2g: 2.0? → 2.0+
Assignee: nobody → evanxd
blocking-b2g: 2.0+ → 2.0?
blocking -- bug in 2.0 feature
blocking-b2g: 2.0? → 2.0+
Attached file pointer to github PR (obsolete) —
Attachment #8442024 - Flags: review?(jlal)
Hi Mishra,
I added comments for your patch.
Flags: needinfo?(deepak.k.mishra)
Comment on attachment 8442024 [details] [review]
pointer to github PR

James Lal is busy with other stuff, so I'm going to review it together with Evan.

I agree with Evan's comments on the PR and we should add some Marionette tests to avoid regressions and ensure it is working as expected. Thanks a lot.
Attachment #8442024 - Flags: review?(mmedeiros)
Attachment #8442024 - Flags: review?(jlal)
Attachment #8442024 - Flags: review?(evanxd)
Whiteboard: [priority][p=3]
Target Milestone: --- → 2.0 S5 (4july)
Hi Mishra,

You could try to update the patch for the comments on the GitHub page[1] first.

Do you have any problem of writing marionette tests?
If you could not understand how to write the test, I could help to write the test.

Thanks.

[1] https://github.com/mozilla-b2g/gaia/pull/20679/files#diff-fa69b42c7066e08948996ef0e2f0e977R89
Assignee: evanxd → deepak.k.mishra
Flags: needinfo?(deepak.k.mishra)
Flags: needinfo?(deepak.k.mishra)
Attached file pointer to github PR (obsolete) —
Created the PR after fixing the review comments.
Tests not implemented.
Attachment #8442024 - Attachment is obsolete: true
Attachment #8442024 - Flags: review?(mmedeiros)
Attachment #8442024 - Flags: review?(evanxd)
Attachment #8445713 - Flags: review?(mmedeiros)
Attachment #8445713 - Flags: review?(evanxd)
Flags: needinfo?(deepak.k.mishra)
Hi Mishra,

Nice work.
So you will not write the test code for this time, right?
Or you're working on that?
Flags: needinfo?(deepak.k.mishra)
Hi Evan, 
I am facing some issue in setting up the test environment.
I tried to setup the Marionette from the following link.
https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/Setting_up_Marionette

But got the following error while running 

$ $MARIONETTE_ENV/bin/python setup.py develop
Installed /home/deepak.k.mishra/work/b2g/tests_download2/vir1/gecko/testing/marionette/client
Processing dependencies for marionette-client==0.7.9
Searching for mozrunner>=6.0
Reading http://pypi.python.org/simple/mozrunner/
No local packages or download links found for mozrunner>=6.0
error: Could not find suitable distribution for Requirement.parse('mozrunner>=6.0')

So I am not able to progress.
Any suggestion?
Flags: needinfo?(deepak.k.mishra)
Mishra, I know this is really confusing but we are using the JavaScript tests, not the Python ones.. try this: `APP=calendar make test-integration` (this should download all the dependencies and build the app). if it doesn't work try to run `make clean && make really-clean` and run `APP=calendar make test-integration` again.

The command `make test-integration` creates a new *profile* ("profile-test") each time it's executed, so it's slow(ish). You only need to rebuild the app and generate a new test profile when you make changes to the app code; when you are only updating the test files, you can simply execute `APP=calendar make test-integration-test`, which is way faster since it skips the build step and only execute the tests.

The JavaScript tests are inside each app folder (eg. `apps/calendar/test/marionette/month_view_test.js`), the existing month_view_test.js file should give you some guidance on how to implement it.

To run a single test file you can do `APP=calendar TEST_FILES=apps/calendar/test/marionette/month_view_test.js make test-integration-test`.

to run the unit tests you can do `./bin/gaia-test` and click the "Calendar" header to select all tests and click "execute". While the browser & prompt are open it should be listening to file changes on the whole project, so if for instance you make changes to the `month_child.js` file it should automatically execute the tests for that file and display the results on the prompt.

PS: when the commands doesn't work, try to run `make clean` and execute command again, if it still doesn't work try `make clean && make really-clean`.

more info about integration tests: https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/Gaia_integration_tests
Flags: needinfo?(deepak.k.mishra)
Attached file pointer to github PR
Implemented the review comments of mmedeiros.
Facing some issues related to environment setup for marionette-js-runner.
Can I submit the tests as a separate submission after my test environment is up?
Attachment #8445713 - Attachment is obsolete: true
Attachment #8445713 - Flags: review?(mmedeiros)
Attachment #8445713 - Flags: review?(evanxd)
Attachment #8447932 - Flags: review?(mmedeiros)
Attachment #8447932 - Flags: review?(evanxd)
Flags: needinfo?(deepak.k.mishra)
Hi Mishra,

After you have node and npm installed, we could just run test with following [1].

What are error messages for the test environment setup?
Could you post here? Then we could help you.

Let's setup the test environment first,
and write tests for this bug.

Thanks.

[1] https://github.com/mozilla-b2g/gaia#integration-tests
Hi Evan, 
I have Ubuntu 14.04 LTS,
I tried the steps and I am getting some error..

mishradk@tupsi-iv:~/work/ffos/download2/B2G/gaia$ APP=calendar make test-integration

when I execute the above command I get the following error....

..
..
..
..


/home/mishradk/work/ffos/download2/B2G/gaia/build_stage/geoloc/shared/locales/date/date.qps-plocm.properties could not be found.
Finished: test ui config file: ./dev_apps/test-agent/config.json
Finished: Generating extensions
# create a clean folder to store data for B2G, this folder will copy to b2g output folder.
rm -rf profile-test/defaults
mkdir -p profile-test/defaults/pref
# rename user_pref() to pref() in user.js
sed s/user_pref\(/pref\(/ profile-test/user.js > profile-test/defaults/pref/user.js
cp profile-test/settings.json profile-test/defaults/settings.json
Profile Ready: please run [b2g|firefox] -profile /home/mishradk/work/ffos/download2/B2G/gaia/profile-test
./bin/gaia-marionette \
		--host marionette-b2gdesktop-host \
		--manifest ./shared/test/integration/local-manifest.json \
		--reporter spec
The Radicale CalDAV server is not installed in the virtualenv, we will skip the CalDAV tests.
If you want to run the CalDAV tests, please run |make caldav-server-install| first.
make[1]: Entering directory `/home/mishradk/work/ffos/download2/B2G/gaia'
make[1]: `node_modules' is up to date.
make[1]: Leaving directory `/home/mishradk/work/ffos/download2/B2G/gaia'
make[1]: Entering directory `/home/mishradk/work/ffos/download2/B2G/gaia'
./node_modules/.bin/mozilla-download  \
		--verbose \
		--product b2g \
		--channel tinderbox \
		--branch mozilla-central b2g
/usr/bin/env: node: No such file or directory
make[1]: *** [b2g] Error 127
make[1]: Leaving directory `/home/mishradk/work/ffos/download2/B2G/gaia'
/usr/bin/env: node: No such file or directory
make: *** [test-integration-test] Error 127
mishradk@tupsi-iv:~/work/ffos/download2/B2G/gaia$
Flags: needinfo?(evanxd)
Hi Mishra,

Look like somehow the b2g-desktop client was not downloaded or unziped successfully. You could just check that do you have a `b2g` folder in your gaia folder, the patch will b2 `path/to/gaia/b2g`.

If you do not have the folder, my assumption is correct. But sorry, I could not know the reason of the issue with above messages.

I think we could just download the b2g-desktop client[1] manually, and unzip it in the `path/to/gaia/b2g`. Then you could see the `b2g`, `b2g-bin`, and other files in the `path/to/gaia/b2g` folder.

After that, run the tests with `APP=calendar make test-integration` again. I think it will work.

BTW, I'm wondering that what are the versions of node and npm you used?
Thanks.

[1] http://ftp.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-central-linux64_gecko/1404347089/b2g-33.0a1.multi.linux-x86_64.tar.bz2
Flags: needinfo?(evanxd)
Flags: needinfo?(deepak.k.mishra)
Hi Evan, 
the test setup still has some issue. I tried multiple no of times, reinstalled ubuntu, and all such things.. 
Let me explain you what environment I have..
1. I have a laptop with Ubuntu 14.04
2. I have downloaded the complete B2G code for Nexus 4 which if I build works
3. I installed nps using apt-get
4. then I installed  npm install --save-dev marionette-client marionette-js-runner
5. Now in /<path to my dir>/B2G/gaia i gave the command APP=calendar make test-integration 
---- it failed 
6. As per your suggestion I downloaded the b2g zip file which you had shared.. extracted inside /<path to my dir>/B2G/gaia 
---- it failed again at same place.. 
Do you think I am doing anything worong or any basic step is missing or any other tool I need to download?

if you want I can share the complete log too
Flags: needinfo?(deepak.k.mishra) → needinfo?(evanxd)
above at step 3 it is "npm" not "nps"
Target Milestone: 2.0 S5 (4july) → 2.0 S6 (18july)
Hi Mishra,

For the step 4, we should run `npm install` in the gaia folder to install all dependency modules[1].

Yes, please provide the log file.
Thanks.

And because it is a blocker bug, it means that the bug is supported to be fixed before the 2.0 release cycle is ended. So I think I could help to write the tests.

At the same time, we could continue to figure out your environment setup.
Thanks.

[1] https://github.com/mozilla-b2g/gaia/blob/master/package.json
Flags: needinfo?(evanxd)
Hi Mishra,

I will cherry-pick your patch and write (unit/marionette) tests to fix this bug.
And thanks for your help. :)
Attachment #8447932 - Flags: review?(mmedeiros)
Attachment #8447932 - Flags: review?(evanxd)
Assignee: deepak.k.mishra → evanxd
Hi Evan,
thank you for your help too. 
Once this issue is resolved I think I can be more productive for this project.

Related to error if I do npm install I get the following. After that also the tests does not run. Where should I attach the complete error log?

deepak.k.mishra@bdc7-l-c9mnwq1:~/work/b2g/download2/B2G/gaia$ npm install
npm WARN package.json marionette-client@1.1.7 No repository field.
npm WARN package.json marionette-content-script@0.0.4 No repository field.
npm WARN package.json marionette-device-host@0.0.2 No repository field.
npm WARN package.json marionette-file-manager@0.0.2 No repository field.
npm WARN package.json marionette-profile-builder@0.0.3 No repository field.
npm WARN package.json mocha-json-proxy@0.0.7 No repository field.
npm WARN package.json mocha-parallel@0.1.0 No repository field.
deepak.k.mishra@bdc7-l-c9mnwq1:~/work/b2g/download2/B2G/gaia$
Hi Mishra,

You could just use above `Add an attachment`(bugzilla function) to add the attachment, just like how you add a patch here.
Comment on attachment 8442027 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/20682

Hi Miller,

Could you help to review the patch?
I cherry-pick Mishra's patch, fix the unit test, and add marionette tests in it.

Thanks.
Attachment #8442027 - Flags: review?(mmedeiros)
Hi Miller,
Do you have time to review the patch?
Thanks.
Flags: needinfo?(mmedeiros)
Comment on attachment 8442027 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/20682

LGTM! just one line with trailing whitespace that should be removed. sorry for the delay, this bug was on my "to-review" list for so long that I didn't realized it had updates. Thanks.
Attachment #8442027 - Flags: review?(mmedeiros) → review+
Flags: needinfo?(mmedeiros)
Hi Miller,
Thanks for the review.
master: e997d627597a7f79cdc86b73f941492360f34665
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
[Environment]
Gaia      db0358b53488a941ced352d890802342d7ced00e
Gecko     https://hg.mozilla.org/releases/mozilla-aurora/rev/0874ec920408
BuildID   20140715160201
Version   32.0a2
ro.build.version.incremental=94
ro.build.date=Tue May 20 09:29:20 CST 2014

[Result]
Pass
Status: RESOLVED → VERIFIED
This issue has been verified successfully on Flame 2.1.
See attachment: Verify_Video_Flame2.1.MP4
Reproducing rate: 0/10

Flame v2.1 version:
Gaia-Rev        5372b675e018b6aac97d95ff5db8d4bd16addb9b
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/f34377ae402b
Build-ID        20141127001201
Version         34.0
You need to log in before you can comment on or make changes to this bug.