Closed Bug 981549 Opened 10 years ago Closed 6 years ago

[marionette-tests] Check the date items of week view after do left swipe.

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: evanxd, Assigned: promise82114, Mentored)

Details

Please make sure the all date items of week view are correct after do left swipe.

We could just do left swipe with the swipe function at https://github.com/mozilla-b2g/gaia/blob/master/apps/calendar/test/marionette/calendar.js#L440-L465.
Fox example, https://github.com/mozilla-b2g/gaia/blob/master/apps/calendar/test/marionette/week_view_test.js#L24.
Assignee: nobody → promise82114
Hi Jing-Kai,

Do you have any problem about this bug.
We should work this for this week.

Thanks.
Flags: needinfo?(promise82114)
Hi  Evan

I started to read about Marionette.
(set the environment and watch the video)

I want to make sure the target.
I think to write a test like "first_marionette_test.js".
Probably "weekview_marionette_test.js" ?

I have traced the function swipe().
If I don't have to modify it,I think I know how to use it .
But I want to make sure that.
How is "make sure the all date items of week view are correct" ?
I don't understand it.

Finally,when I write the test.js .
Do I use the review request to upload the js ?
It seems that I don't have to change a data what exists in the git,
but I write a new data for this time.


Sorry for many questions and so late.

Thanks .
Flags: needinfo?(promise82114)
Hi Even

I want to try to catch the target.

I think the step of test:
1.  open the Calendar app.
2.  select the weekButton and click to week view.
3.  swipe on week view.
I maybe be able to do the above after tracing the code.

I want to know what should I do at next.
[ Check the date items of week view ]
What are the date items ?
Is the date at the top ?   (EX SUN16 MON17 TUE18 WED 19
Check the date items means:
Have the date changed after left swipe?


Thanks
Hi Jing.Kai,

Yes, that is where we go.
We should make sure the date items are correct after we do swipe.

Thanks.
Do you have other technical problems currently?
Hi Evan

Sorry that I'm not good at JS.
I try to trace the code of "week_view_test.js"

(line 21) What is the value "/\d{4}.+\d{4}$/" ?  
(line 31) What is the function "assert.operator()" ?
Is the test writen by node.js ?
In fact,I don't see many function,so I don't understand the "week_view_test.js".

Finally,I have no idea about checking the date items of week view.
I think it mean that they change and are correct after swipe.
I can see they changed after swipe.
But I don't know how to check they are correct.
How to get value and how to check correct ?

I'm sorry that I still not solve the bug now.
Thanks.
Uh, I have  questions with the test.js from the gaia and Evan's teaching .

Question 1:

In the "first_marionette_test.js"
(line 10)  client.apps.launch(calendarAppUrl);
(line 11)  client.apps.switchToApp(calendarAppUrl); 

and in the "week_view_test.js"
(line 11)  app = new Calendar(client);
(line 12)  app.launch({ hideSwipeHint: true });

I think they have same target.

(line 15) in the "week_view_test.js" 
    app.findElement('weekButton').click();

I try to like  "first_marionette_test.js"
     use  client.apps.findElement('weekButton').click(),but be error
then how I use findElement() with  [client.apps] ?



Question 2:

In the "week_view_test.js"
(line 15) app.findElement('weekButton').click();

and in the "day_view_test.js"
(line 14) app.waitForElement('dayButton').click();

I also think they do same thing.
But what is the difference between they?
findElement() and  waitForElement()


Many thing that I haven't seen,so I meet many problems.
I try to be my best.
Thanks.
Mentor: evanxd
Whiteboard: [mentor=:evanxd]
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.