-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing files with python end to end tests
- Loading branch information
Showing
4 changed files
with
32 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pytest-playwright~=0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from pytest import fixture | ||
from graylog import Graylog | ||
|
||
from playwright.sync_api import Page, expect | ||
|
||
|
||
@fixture(scope="function", autouse=True) | ||
def before_each_after_each(page: Page): | ||
graylog = Graylog('../../runtime') | ||
graylog.start() | ||
graylog.configure_telemetry() | ||
|
||
page.goto('http://127.0.0.1:9000/') | ||
# note: could also be: getByRole('textbox', { name: 'Username' }) | ||
page.get_by_label('Username').fill('admin') | ||
page.get_by_label('Password').fill('admin') | ||
page.get_by_role('button', name='Sign in').click() | ||
|
||
yield | ||
graylog.stop() | ||
|
||
def test_plugin_logging_alert_should_be_registered_issue_50(page: Page): | ||
page.get_by_role('button', name='System').click() | ||
page.get_by_role('menuitem', name='Configurations').click() | ||
page.get_by_role('button', name='Plugins').click() | ||
|
||
# note: could also be: await expect(page.getByText('Logging Alert')).toBeVisible(); | ||
expect(page.get_by_role('button', name='Logging')).to_have_text('Logging Alert') | ||
|
This file was deleted.
Oops, something went wrong.