Skip to content

Commit

Permalink
Fix in example code
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-verma committed Feb 17, 2020
1 parent 1928a3e commit 8d6324e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
'''

from enum import Enum, auto
from .base import WPBasePage
from .base import WPFullPage

class Settings(WPBasePage):
class Settings(WPFullPage):

class labels(Enum):
role = auto()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@
from arjex_app_page_widget.lib.gom.app import WordPress

@for_test
def dashboard(request):
def settings(request):
# Setup
wordpress = WordPress()
home = wordpress.launch()
dashboard = home.login_with_default_creds()
yield dashboard
settings = dashboard.left_nav.settings
yield settings

# Teadown
dashboard.top_nav.logout()
settings.top_nav.logout()

@test
def test_with_wp_app_page_widget(my, request, dashboard):
dashboard.left_nav.settings.tweak_role_value("editor")
def test_with_wp_app_page_widget(my, request, settings):
settings.tweak_role_value("editor")

0 comments on commit 8d6324e

Please sign in to comment.