Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My solution on MyDayApp - Angular #44

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@
"src/**/*.html"
]
}
},
"deploy": {
"builder": "angular-cli-ghpages:deploy"
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions e2e/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ test.describe('Routing', () => {
await page.locator('.todo-list li .toggle').nth(1).check();
await checkNumberOfCompletedTodosInLocalStorage(page, 1);
await page.locator('.filters >> text=Pending').click();
await expect(page.locator('.todo-list li')).toHaveCount(2);
await expect(page.locator('.todo-list li')).toHaveText([
await expect(page.locator('.todo-list-uncompleted li div')).toHaveCount(2);
await expect(page.locator('.todo-list-uncompleted li div')).toHaveText([
TODO_ITEMS[0],
TODO_ITEMS[2],
]);
Expand All @@ -260,7 +260,7 @@ test.describe('Routing', () => {

await test.step('Showing all items', async () => {
await page.locator('.filters >> text=All').click();
await expect(page.locator('.todo-list li')).toHaveCount(3);
await expect(page.locator('.todo-list li div')).toHaveCount(3);
});

await test.step('Showing pending items', async () => {
Expand All @@ -271,18 +271,18 @@ test.describe('Routing', () => {
await page.locator('.filters >> text=Completed').click();
});

await expect(page.locator('.todo-list li')).toHaveCount(1);
await expect(page.locator('.todo-list li div')).toHaveCount(1);
await page.goBack();
await expect(page.locator('.todo-list li')).toHaveCount(2);
await expect(page.locator('.todo-list li div')).toHaveCount(2);
await page.goBack();
await expect(page.locator('.todo-list li')).toHaveCount(3);
await expect(page.locator('.todo-list li div')).toHaveCount(3);
});

test('should allow me to display completed items', async ({ page }) => {
await page.locator('.todo-list li .toggle').nth(1).check();
await checkNumberOfCompletedTodosInLocalStorage(page, 1);
await page.locator('.filters >> text=Completed').click();
await expect(page.locator('.todo-list li')).toHaveCount(1);
await expect(page.locator('.todo-list-completed li div')).toHaveCount(1);
});

test('should allow me to display all items', async ({ page }) => {
Expand Down
Loading