Creating a new format of tests.
This commit is contained in:
parent
e584b711c1
commit
6ceb34b8d3
6
api/chrome/features/chrome.feature
Normal file
6
api/chrome/features/chrome.feature
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Feature: The Chrome API client
|
||||||
|
|
||||||
|
Scenario: Using the Chrome.Start method
|
||||||
|
Given the Chrome client
|
||||||
|
When the Start method is called
|
||||||
|
Then Google Chrome should open
|
||||||
16
api/chrome/features/steps/steps.py
Normal file
16
api/chrome/features/steps/steps.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
from behave import *
|
||||||
|
from cli import Chrome
|
||||||
|
|
||||||
|
@given ("the Chrome client")
|
||||||
|
def step_impl (context):
|
||||||
|
context.client = Chrome()
|
||||||
|
|
||||||
|
@when ("the Start method is called")
|
||||||
|
def step_impl (context):
|
||||||
|
# context._return = None
|
||||||
|
context._return = context.client.start()
|
||||||
|
|
||||||
|
@then ("Google Chrome should open")
|
||||||
|
def step_impl (context):
|
||||||
|
print (f"\n-----------\n{context._return}\n------------\n")
|
||||||
|
assert context._return == "", "Google Chrome did not opened as expected."
|
||||||
Loading…
x
Reference in New Issue
Block a user