QtWebEngine: Fix session tests
This commit is contained in:
parent
85b3d08c66
commit
7b9b08a167
@ -20,7 +20,8 @@ Feature: Saving and loading sessions
|
|||||||
url: http://localhost:*/data/title.html
|
url: http://localhost:*/data/title.html
|
||||||
title: Test title
|
title: Test title
|
||||||
|
|
||||||
Scenario: Zooming
|
@qtwebengine_skip
|
||||||
|
Scenario: Zooming (qtwebkit)
|
||||||
When I open data/hello.txt
|
When I open data/hello.txt
|
||||||
And I run :zoom 50
|
And I run :zoom 50
|
||||||
Then the session should look like:
|
Then the session should look like:
|
||||||
@ -32,7 +33,21 @@ Feature: Saving and loading sessions
|
|||||||
- url: http://localhost:*/data/hello.txt
|
- url: http://localhost:*/data/hello.txt
|
||||||
zoom: 0.5
|
zoom: 0.5
|
||||||
|
|
||||||
Scenario: Scrolling
|
# The zoom level is only stored for the newest element for QtWebEngine.
|
||||||
|
@qtwebkit_skip
|
||||||
|
Scenario: Zooming (qtwebengine)
|
||||||
|
When I open data/hello.txt
|
||||||
|
And I run :zoom 50
|
||||||
|
Then the session should look like:
|
||||||
|
windows:
|
||||||
|
- tabs:
|
||||||
|
- history:
|
||||||
|
- url: about:blank
|
||||||
|
- url: http://localhost:*/data/hello.txt
|
||||||
|
zoom: 0.5
|
||||||
|
|
||||||
|
@qtwebengine_skip
|
||||||
|
Scenario: Scrolling (qtwebkit)
|
||||||
When I open data/scroll/simple.html
|
When I open data/scroll/simple.html
|
||||||
And I run :scroll-px 10 20
|
And I run :scroll-px 10 20
|
||||||
Then the session should look like:
|
Then the session should look like:
|
||||||
@ -48,6 +63,21 @@ Feature: Saving and loading sessions
|
|||||||
x: 10
|
x: 10
|
||||||
y: 20
|
y: 20
|
||||||
|
|
||||||
|
# The scroll position is only stored for the newest element for QtWebEngine.
|
||||||
|
@qtwebkit_skip
|
||||||
|
Scenario: Scrolling (qtwebengine)
|
||||||
|
When I open data/scroll/simple.html
|
||||||
|
And I run :scroll-px 10 20
|
||||||
|
And I wait for "Scroll position changed to PyQt5.QtCore.QPoint(10, 20)" in the log
|
||||||
|
Then the session should look like:
|
||||||
|
windows:
|
||||||
|
- tabs:
|
||||||
|
- history:
|
||||||
|
- url: about:blank
|
||||||
|
- url: http://localhost:*/data/scroll/simple.html
|
||||||
|
scroll-pos:
|
||||||
|
x: 10
|
||||||
|
y: 20
|
||||||
Scenario: Redirect
|
Scenario: Redirect
|
||||||
When I open redirect-to?url=data/title.html without waiting
|
When I open redirect-to?url=data/title.html without waiting
|
||||||
And I wait until data/title.html is loaded
|
And I wait until data/title.html is loaded
|
||||||
@ -71,7 +101,8 @@ Feature: Saving and loading sessions
|
|||||||
- url: http://localhost:*/data/sessions/snowman.html
|
- url: http://localhost:*/data/sessions/snowman.html
|
||||||
title: snow☃man
|
title: snow☃man
|
||||||
|
|
||||||
Scenario: Long output comparison
|
@qtwebengine_skip
|
||||||
|
Scenario: Long output comparison (qtwebkit)
|
||||||
When I open data/numbers/1.txt
|
When I open data/numbers/1.txt
|
||||||
And I open data/title.html
|
And I open data/title.html
|
||||||
And I open data/numbers/2.txt in a new tab
|
And I open data/numbers/2.txt in a new tab
|
||||||
@ -121,10 +152,54 @@ Feature: Saving and loading sessions
|
|||||||
url: http://localhost:*/data/numbers/3.txt
|
url: http://localhost:*/data/numbers/3.txt
|
||||||
zoom: 1.0
|
zoom: 1.0
|
||||||
|
|
||||||
|
# FIXME:qtwebengine what's up with the titles there?
|
||||||
|
@qtwebkit_skip
|
||||||
|
Scenario: Long output comparison (qtwebengine)
|
||||||
|
When I open data/numbers/1.txt
|
||||||
|
And I open data/title.html
|
||||||
|
And I open data/numbers/2.txt in a new tab
|
||||||
|
And I open data/numbers/3.txt in a new window
|
||||||
|
# Full output apart from "geometry:"
|
||||||
|
Then the session should look like:
|
||||||
|
windows:
|
||||||
|
- active: true
|
||||||
|
tabs:
|
||||||
|
- history:
|
||||||
|
- title: about:blank
|
||||||
|
url: about:blank
|
||||||
|
- title: http://localhost:*/data/numbers/1.txt
|
||||||
|
url: http://localhost:*/data/numbers/1.txt
|
||||||
|
- active: true
|
||||||
|
scroll-pos:
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
title: Test title
|
||||||
|
url: http://localhost:*/data/title.html
|
||||||
|
zoom: 1.0
|
||||||
|
- active: true
|
||||||
|
history:
|
||||||
|
- active: true
|
||||||
|
scroll-pos:
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
title: localhost:*/data/numbers/2.txt
|
||||||
|
url: http://localhost:*/data/numbers/2.txt
|
||||||
|
zoom: 1.0
|
||||||
|
- tabs:
|
||||||
|
- active: true
|
||||||
|
history:
|
||||||
|
- active: true
|
||||||
|
scroll-pos:
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
title: localhost:*/data/numbers/3.txt
|
||||||
|
url: http://localhost:*/data/numbers/3.txt
|
||||||
|
zoom: 1.0
|
||||||
|
|
||||||
# https://github.com/The-Compiler/qutebrowser/issues/879
|
# https://github.com/The-Compiler/qutebrowser/issues/879
|
||||||
|
|
||||||
Scenario: Saving a session with a page using history.replaceState()
|
Scenario: Saving a session with a page using history.replaceState()
|
||||||
When I open data/sessions/history_replace_state.html
|
When I open data/sessions/history_replace_state.html without waiting
|
||||||
Then the javascript message "Calling history.replaceState" should be logged
|
Then the javascript message "Calling history.replaceState" should be logged
|
||||||
And the session should look like:
|
And the session should look like:
|
||||||
windows:
|
windows:
|
||||||
@ -135,7 +210,8 @@ Feature: Saving and loading sessions
|
|||||||
url: http://localhost:*/data/sessions/history_replace_state.html?state=2
|
url: http://localhost:*/data/sessions/history_replace_state.html?state=2
|
||||||
title: Test title
|
title: Test title
|
||||||
|
|
||||||
Scenario: Saving a session with a page using history.replaceState() and navigating away
|
@qtwebengine_skip
|
||||||
|
Scenario: Saving a session with a page using history.replaceState() and navigating away (qtwebkit)
|
||||||
When I open data/sessions/history_replace_state.html
|
When I open data/sessions/history_replace_state.html
|
||||||
And I open data/hello.txt
|
And I open data/hello.txt
|
||||||
Then the javascript message "Calling history.replaceState" should be logged
|
Then the javascript message "Calling history.replaceState" should be logged
|
||||||
@ -151,6 +227,22 @@ Feature: Saving and loading sessions
|
|||||||
- active: true
|
- active: true
|
||||||
url: http://localhost:*/data/hello.txt
|
url: http://localhost:*/data/hello.txt
|
||||||
|
|
||||||
|
# Seems like that bug is fixed upstream in QtWebEngine
|
||||||
|
@qtwebkit_skip
|
||||||
|
Scenario: Saving a session with a page using history.replaceState() and navigating away
|
||||||
|
When I open data/sessions/history_replace_state.html without waiting
|
||||||
|
And I wait for "* Calling history.replaceState" in the log
|
||||||
|
And I open data/hello.txt
|
||||||
|
Then the session should look like:
|
||||||
|
windows:
|
||||||
|
- tabs:
|
||||||
|
- history:
|
||||||
|
- url: about:blank
|
||||||
|
- url: http://localhost:*/data/sessions/history_replace_state.html?state=2
|
||||||
|
title: Test title
|
||||||
|
- active: true
|
||||||
|
url: http://localhost:*/data/hello.txt
|
||||||
|
|
||||||
# :session-save
|
# :session-save
|
||||||
|
|
||||||
Scenario: Saving to a directory
|
Scenario: Saving to a directory
|
||||||
|
Loading…
Reference in New Issue
Block a user