-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added new paste button, changed design of the links on the View…
… Paste page to align with the other buttons
- Loading branch information
Showing
5 changed files
with
101 additions
and
16 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
Binary file not shown.
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
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,32 @@ | ||
from test.e2e.conftest import create_paste_page | ||
from test.e2e.pageobjects.create_paste_page import CreatePastePage | ||
from test.e2e.pageobjects.view_paste_page import ViewPastePage | ||
|
||
import pytest | ||
from playwright.sync_api import Page, Playwright | ||
|
||
|
||
@pytest.mark.e2e | ||
def test_create_single_paste( | ||
page: Page, playwright: Playwright, create_paste_page: CreatePastePage | ||
): | ||
first_pasted_text = create_paste_page.paste_random_text() | ||
create_paste_page.click_submit() | ||
|
||
view_paste_page = ViewPastePage(page) | ||
view_paste_page.should_be_opened() | ||
first_paste_url = view_paste_page.current_url() | ||
|
||
view_paste_page.click_new_paste_button() | ||
create_paste_page.should_be_opened() | ||
|
||
second_pasted_text = create_paste_page.paste_random_text() | ||
create_paste_page.click_submit() | ||
second_paste_url = view_paste_page.current_url() | ||
assert first_paste_url != second_paste_url | ||
|
||
view_paste_page.open(first_paste_url) | ||
view_paste_page.should_have_pasted_text(first_pasted_text) | ||
|
||
view_paste_page.open(second_paste_url) | ||
view_paste_page.should_have_pasted_text(second_pasted_text) |