bdd: Open geolocation/notification page in new tab

This hopefully fixes this flaky error in test_notifications_with_ask__true on
OS X:

    Failed: Logged unexpected errors:

    LogLine('22:40:06 DEBUG    js         webpage:javaScriptConsoleMessage:531 [http://localhost:57758/data/prompt/notifications.html:28] [FAIL] unknown initial value for Notification.permission: denied')
    [...]
    testprocess.WaitForTimeout: Timed out after 15000ms waiting for {'message': 'Entering mode KeyMode.* (reason: question asked)'}.
This commit is contained in:
Florian Bruhin 2016-01-15 06:44:01 +01:00
parent 5856b24d20
commit 6420cdaa26

View File

@ -104,19 +104,19 @@ Feature: Prompts
Scenario: Always rejecting geolocation
When I set content -> geolocation to false
And I open data/prompt/geolocation.html
And I open data/prompt/geolocation.html in a new tab
And I click the button
Then the javascript message "geolocation permission denied" should be logged
Scenario: Always accepting geolocation
When I set content -> geolocation to true
And I open data/prompt/geolocation.html
And I open data/prompt/geolocation.html in a new tab
And I click the button
Then the javascript message "geolocation permission denied" should not be logged
Scenario: geolocation with ask -> true
When I set content -> geolocation to ask
And I open data/prompt/geolocation.html
And I open data/prompt/geolocation.html in a new tab
And I click the button
And I wait for a prompt
And I run :prompt-yes
@ -124,7 +124,7 @@ Feature: Prompts
Scenario: geolocation with ask -> false
When I set content -> geolocation to ask
And I open data/prompt/geolocation.html
And I open data/prompt/geolocation.html in a new tab
And I click the button
And I wait for a prompt
And I run :prompt-no
@ -132,7 +132,7 @@ Feature: Prompts
Scenario: geolocation with ask -> abort
When I set content -> geolocation to ask
And I open data/prompt/geolocation.html
And I open data/prompt/geolocation.html in a new tab
And I click the button
And I wait for a prompt
And I run :leave-mode
@ -142,19 +142,19 @@ Feature: Prompts
Scenario: Always rejecting notifications
When I set content -> notifications to false
And I open data/prompt/notifications.html
And I open data/prompt/notifications.html in a new tab
And I click the button
Then the javascript message "notification permission denied" should be logged
Scenario: Always accepting notifications
When I set content -> notifications to true
And I open data/prompt/notifications.html
And I open data/prompt/notifications.html in a new tab
And I click the button
Then the javascript message "notification permission granted" should be logged
Scenario: notifications with ask -> false
When I set content -> notifications to ask
And I open data/prompt/notifications.html
And I open data/prompt/notifications.html in a new tab
And I click the button
And I wait for a prompt
And I run :prompt-no
@ -162,7 +162,7 @@ Feature: Prompts
Scenario: notifications with ask -> true
When I set content -> notifications to ask
And I open data/prompt/notifications.html
And I open data/prompt/notifications.html in a new tab
And I click the button
And I wait for a prompt
And I run :prompt-yes
@ -172,7 +172,7 @@ Feature: Prompts
@xfail_norun
Scenario: notifications with ask -> abort
When I set content -> notifications to ask
And I open data/prompt/notifications.html
And I open data/prompt/notifications.html in a new tab
And I click the button
And I wait for a prompt
And I run :leave-mode