Add API models, mock backend, more tests
This commit is contained in:
@@ -34,4 +34,14 @@ test("Increment button functions correctly", async t => {
|
||||
await t.expect(button.textContent).contains("0");
|
||||
await t.click(button);
|
||||
await t.expect(button.textContent).contains("1");
|
||||
});
|
||||
});
|
||||
|
||||
fixture`Posts from API`.page("http://localhost:3000");
|
||||
|
||||
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.exists).ok();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user