mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2024-11-10 05:34:44 +00:00
update e2e test layout
This commit is contained in:
parent
6c00246e2d
commit
5f84e700d1
@ -13,11 +13,11 @@
|
||||
"devDependencies": {
|
||||
"eslint": "^8.27.0",
|
||||
"htmlhint": "1.1.4",
|
||||
"http-server": "",
|
||||
"mocha": "10",
|
||||
"mock-local-storage": "^1.1.23",
|
||||
"puppeteer": "^18.2.1",
|
||||
"stylelint": "14.14.1",
|
||||
"stylelint-config-standard": "^29.0.0",
|
||||
"puppeteer": "18",
|
||||
"http-server": ""
|
||||
"stylelint-config-standard": "^29.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -20,27 +20,43 @@ describe("test App end to end", async () => {
|
||||
}
|
||||
});
|
||||
|
||||
describe("test simple properties", async () => {
|
||||
it("page should have correct title", async () => {
|
||||
assert.strictEqual(await page.title(), "Food Journal");
|
||||
});
|
||||
});
|
||||
|
||||
it("test create review functionality on details page", async () => {
|
||||
describe("test create 1 new review", async () => {
|
||||
it("create 1 new review", async () => {
|
||||
|
||||
});
|
||||
|
||||
it("test create review functionality on home page", async () => {
|
||||
it("check details page", async () => {
|
||||
|
||||
});
|
||||
|
||||
it("test read review functionality on details page", async () => {
|
||||
it("check home page", async () => {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
describe("test read 1 review after refresh", async () => {
|
||||
it("refresh page", async () => {
|
||||
|
||||
});
|
||||
|
||||
it("test read review functionality on home page", async () => {
|
||||
it("check details page", async () => {
|
||||
|
||||
});
|
||||
|
||||
it("test update review functionality on details page", async () => {
|
||||
it("check home page", async () => {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
describe("test update 1 review", async () => {
|
||||
|
||||
it("update 1 review", async () => {
|
||||
// Get the only review card and click it
|
||||
let review_card = await page.$("review-card");
|
||||
await review_card.click();
|
||||
@ -76,7 +92,9 @@ describe("test App end to end", async () => {
|
||||
// Click the save button to save updates
|
||||
let save_btn = await page.$("#save-btn");
|
||||
save_btn.click();
|
||||
});
|
||||
|
||||
it("check details page", async () => {
|
||||
// Get the review image and check src and alt
|
||||
let img = await page.$("#d-mealImg");
|
||||
let imgSrc = await img.getProperty("src");
|
||||
@ -110,7 +128,7 @@ describe("test App end to end", async () => {
|
||||
assert.strictEqual(await stars_src.jsonValue(), "./assets/images/icons/1-star.svg");
|
||||
});
|
||||
|
||||
it("test update review funcionality on home page", async () => {
|
||||
it("check home page", async () => {
|
||||
// Click the button to return to the home page
|
||||
let home_btn = await page.$("#home-btn");
|
||||
home_btn.click();
|
||||
@ -152,7 +170,10 @@ describe("test App end to end", async () => {
|
||||
assert.strictEqual(await stars_src.jsonValue(), "./assets/images/icons/1-star.svg");
|
||||
});
|
||||
|
||||
it("test delete review functionality", async () => {
|
||||
});
|
||||
|
||||
describe("test delete 1 review", () => {
|
||||
it("delete 1 review", async () => {
|
||||
// Get the only review card and click it
|
||||
let review_card = await page.$("review-card");
|
||||
await review_card.click();
|
||||
@ -165,6 +186,7 @@ describe("test App end to end", async () => {
|
||||
review_card = await page.$("#review-card");
|
||||
assert.strictEqual(review_card, null);
|
||||
});
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await page.close();
|
||||
|
Loading…
Reference in New Issue
Block a user