Closed Bug 1219632 Opened 10 years ago Closed 10 years ago

Implement *test_browser_navigation.py* as an integration test in JavaScript

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(feature-b2g:2.6+)

RESOLVED FIXED
feature-b2g 2.6+

People

(Reporter: whsu, Assigned: apastor)

References

Details

(Whiteboard: [gip-to-gij])

Attachments

(1 file)

Component: Gaia::UI Tests → Gaia::Browser
feature-b2g: --- → 2.6+
Assignee: nobody → apastor
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Thanks for pointing this test out. I'm not sure this test is at parity with the Python one, though. If I understand browser_chrome_back_forward_btn_test.js, we just verify the back button is here, but we don't use it. Do we have another test that taps on the back button, Alberto? Regarding the forward one, I don't see where we check the presence of it. Could you point where we verify that? Also, I'm not familiar of the code, does the forward button share all its on-pressed code with the back button? If not, I'd recommend to add a test which taps on it. What do you think?
Flags: needinfo?(apastor)
Hey Jayme! Thanks for checking this. We have several places where we click on the back button ([1] for example), but is true that none of those is checking the content after clicking. I'll try to replicate the same use case that the Gip test in browser_chrome_back_forward_btn_test.js. Thanks! [1] https://github.com/mozilla-b2g/gaia/blob/master/apps/system/test/marionette/browser_fullscreen_navigation_chrome_test.js#L75
Status: RESOLVED → REOPENED
Flags: needinfo?(apastor)
Resolution: WORKSFORME → ---
Comment on attachment 8696289 [details] [review] [gaia] albertopq:1219632-navigation-test > mozilla-b2g:master Could you please take a look? Thanks!
Attachment #8696289 - Flags: review?(jmercado)
Comment on attachment 8696289 [details] [review] [gaia] albertopq:1219632-navigation-test > mozilla-b2g:master Alberto I think you meant to send this one to Johan based on the comments. I'm not familiar enough with the ui-tests or js to review this.
Attachment #8696289 - Flags: review?(jmercado) → review?(jlorenzo)
Comment on attachment 8696289 [details] [review] [gaia] albertopq:1219632-navigation-test > mozilla-b2g:master The test looks okay to me, based on the current style of the file. One way to enhance the readability could be to have something like: > test('navigation back and forward', function() { > var url = server.url('sample.html'); > var browser = rocketbar.gotoBrowser(url); > assert.equal(browser.title, 'Sample page'); > > browser.navigateToFirstLinkAvailable(); > assert.equal(browser.title, 'Dark page'); > > browser.goBack(); > assert.equal(browser.title, 'Sample page'); > > browser.goForward(); > assert.equal(browser.title, 'Dark page'); > }); Every detail about waits and frame switches would be included in test/marionette/lib/*.js. For example: > function goBack() { > this.client.switchToFrame(); > this.appChromeBack.tap(); > this.gotoBrowser(); > }
Attachment #8696289 - Flags: review?(jlorenzo) → review+
Ok, fixed the readability and pushed to master. Thanks for the review! master: https://github.com/mozilla-b2g/gaia/commit/2428acaa800cee7f80a7aea895f83f976ab4b156
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: