Add all kinds of placeholder content
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user