def test_request_to_join_group(async_server, browser): # noqa: F811 fe_url = url(async_server, "/groups/sad-team/join") browser.get(fe_url) page = GroupJoinPage(browser) page.set_reason("Testing") page.set_expiration("12/31/2999") page.submit() fe_url = url(async_server, "/groups/sad-team/requests") browser.get(fe_url) page = GroupRequestsPage(browser) request_row = page.find_request_row("User: [email protected]") assert request_row.requester == "*****@*****.**" assert request_row.status == "pending" assert request_row.expiration == "12/31/2999" assert request_row.role == "member" assert request_row.reason == "Testing"
def test_request_to_join_group(tmpdir: LocalPath, setup: SetupTest, browser: Chrome) -> None: with setup.transaction(): setup.add_user_to_group("*****@*****.**", "sad-team", role="owner") setup.create_user("*****@*****.**") with frontend_server(tmpdir, "*****@*****.**") as frontend_url: browser.get(url(frontend_url, "/groups/sad-team/join")) join_page = GroupJoinPage(browser) join_page.set_reason("Testing") join_page.set_expiration("12/31/2999") join_page.submit() browser.get(url(frontend_url, "/groups/sad-team/requests")) page = GroupRequestsPage(browser) request_row = page.find_request_row("User: [email protected]") assert request_row.requester == "*****@*****.**" assert request_row.status == "pending" assert request_row.expiration == "12/31/2999" assert request_row.role == "member" assert request_row.reason == "Testing"