Add all kinds of placeholder content

This commit is contained in:
Jan Tuomi
2018-07-10 20:26:31 +03:00
parent 7c5fb96d43
commit f082cc4508
26 changed files with 583 additions and 105 deletions
+2 -28
View File
@@ -15,37 +15,11 @@ test("Favicon exists", async t => {
await t.expect(elem.exists).ok();
});
test("Paragraph exists and is visible", async t => {
/**
* Test if there is a paragraph on the page.
*/
const p = Selector("p");
await t.expect(p.exists).ok();
});
test("Header contains text \"Aalto-yliopiston sähköinsinöörikilta!\"", async t => {
test("Header contains text \"Aalto-yliopiston Sähköinsinöörikilta\"", async t => {
/**
* Test if the header contains the text.
*/
const header = Selector("h1");
await t.expect(header.textContent)
.contains("Aalto-yliopiston sähköinsinöörikilta!");
});
test("Increment button functions correctly", async t => {
/**
* Test if the increment button works and increments the number inside the button
*/
const button = Selector("button");
await t.expect(button.textContent).contains("0");
await t.click(button);
await t.expect(button.textContent).contains("1");
});
test("At least one post exists", async t => {
/**
* Test if the API responds with at least one post and it is rendered to the page
*/
const post = Selector(".post");
await t.expect(post.count).gte(1);
.contains("Aalto-yliopiston Sähköinsinöörikilta");
});