forked from tomalaforge/angular-challenges
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(challenge29): add challenge 29 to the list
- Loading branch information
ThomasL
committed
Jul 5, 2023
1 parent
22430f9
commit 5ca1268
Showing
3 changed files
with
33 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 23 additions & 19 deletions
42
apps/testing-todos-list/src/app/list/ticket.store.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
describe('TicketStore', () => { | ||
describe('When adding a new Ticket', () => { | ||
const NEW_TICKET = { | ||
id: 1, | ||
description: 'test 2', | ||
assigneeId: 888, | ||
completed: false, | ||
}; | ||
const tickets = [ | ||
{ | ||
id: 0, | ||
description: 'test', | ||
assigneeId: 888, | ||
completed: false, | ||
}, | ||
]; | ||
describe('Given a success answer from API', () => { | ||
it('Then array of tickets is of lenght 2', () => {}); | ||
describe('When init', () => { | ||
it('Then calls backend.users', async () => { | ||
// | ||
}); | ||
|
||
describe('Given a failure answer from API', () => { | ||
it('Then array of tickets still of lenght 1 and error is set', () => {}); | ||
it('Then calls backend.tickets', async () => { | ||
// | ||
}); | ||
|
||
describe('Given all api returns success response', () => { | ||
it('Then tickets and users should be merged ', async () => { | ||
// | ||
}); | ||
}); | ||
|
||
describe('Given users api returns failure response', () => { | ||
it('Then tickets should not have any assignee', () => { | ||
// | ||
}); | ||
}); | ||
|
||
describe('When adding a new ticket with success', () => { | ||
it('Then ticket is added to the list', async () => { | ||
// | ||
}); | ||
}); | ||
}); | ||
}); |