Skip to content

Commit

Permalink
chore(ui): Main redirect to incidents (#2002)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matvey-Kuk authored Sep 25, 2024
1 parent ffff2c1 commit 4689b42
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions keep-ui/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const nextConfig = {
: [
{
source: "/",
destination: "/providers",
permanent: true,
destination: "/incidents",
permanent: process.env.ENV === "production",
},
];
},
Expand Down
20 changes: 17 additions & 3 deletions tests/e2e_tests/test_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,23 @@


def test_sanity(browser):
browser.goto("http://localhost:3000/providers")
browser.wait_for_url("http://localhost:3000/providers")
assert "Keep" in browser.title()
try:
browser.goto("http://localhost:3000/")
browser.wait_for_url("http://localhost:3000/incidents")
assert "Keep" in browser.title()
except Exception:
# Current file + test name for unique html and png dump.
current_test_name = (
"playwright_dump_"
+ os.path.basename(__file__)[:-3]
+ "_"
+ sys._getframe().f_code.co_name
)

browser.screenshot(path=current_test_name + ".png")
with open(current_test_name + ".html", "w") as f:
f.write(browser.content())
raise


def test_insert_new_alert(browser):
Expand Down

0 comments on commit 4689b42

Please sign in to comment.