Closed basmasking closed 3 months ago
The lessons I have learned so far for these tests is about the application context and how to provide the identity for the tests. The quick draft I made is found below.
const identity: CreatorView =
{
id: '1',
fullName: 'My identity',
nickname: 'myidentity',
joinedAt: '2021-01-01T00:00:00Z',
postCount: 1,
followerCount: 0,
followingCount: 0
};
function setIdentity(identity?: CreatorView)
{
return identity;
}
const context = { identity, setIdentity };
describe('Timeline feature', async () =>
{
it('Should render the timeline for the user', async () =>
{
render(
<AppContext.Provider value={context}>
<MemoryRouter initialEntries={["/timeline"]}>
<Routes />
</MemoryRouter>
</AppContext.Provider>
);
});
});
Today we had a discussion about the added value of the UI tests. And the discussion let to the provisional conclusion; there is no need for UI tests at this point.
We came to this conclusion based on the following arguments.
We will look at the UI tests in a later stage of the project again to see if there is any benefit for them at that point. We will consider at least the 3 points above as input for the discussion. The most likely time to look at them is by the time that we are feature complete for our first MVP.
The implementation we added for the Home screen (#217) will be removed from main in this story.
Currently we only have a singe test UI test. Now we know how to write them, we need to start adding them.