Add data-e2e selector

This commit is contained in:
Aarni Halinen
2020-11-24 22:58:08 +02:00
parent c937f1bfb1
commit ee69e1615d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import React from "react";
import { Helmet } from "react-helmet";
const AdminFrontView: React.FC = () => (
<main>
<main data-e2e="admin-front-page">
<Helmet>
<link rel="canonical" href="https://sik.ayy.fi/admin" />
</Helmet>
+1 -1
View File
@@ -26,7 +26,7 @@ test("User can log in with default credentials", async t => {
await t.typeText(Selector("#login-password"), PASSWORD);
await t.click(Selector("#login-submit"));
const frontPage = Selector(".admin-front-page");
const frontPage = Selector(`[data-e2e="admin-front-page"]`);
await t.expect(frontPage.exists).ok();
});