Closed chiragDork closed 8 months ago
Hi @ecurrencyhodler I have fixed the isuse and raised PR
284
@chiragDork Please right a test for your change
@elraphty the test is already covered in the testing file
@elraphty the test is already covered in the testing file
Post a Bounty button should not be visible if the user is not logged in
it('renders the component correctly', async () => {
render(<OrgHeader {...MockProps} />);
waitFor(() => {
expect(screen.findByText(MockProps.organizationData.name ?? '')).toBeInTheDocument();
expect(screen.findByText(MockProps.organizationData.description ?? '')).toBeInTheDocument();
expect(screen.getByText('Post a Bounty')).toBeInTheDocument();
expect(screen.getByText('Status')).toBeInTheDocument();
expect(screen.getByText('Skill')).toBeInTheDocument();
expect(screen.getByPlaceholderText('Search')).toBeInTheDocument();
expect(screen.getByText(/Bounties/i)).toBeInTheDocument();
});
});
This test doesn't test for that.
@elraphty the test is already covered in the testing file
Post a Bounty button should not be visible if the user is not logged in
it('renders the component correctly', async () => { render(<OrgHeader {...MockProps} />); waitFor(() => { expect(screen.findByText(MockProps.organizationData.name ?? '')).toBeInTheDocument(); expect(screen.findByText(MockProps.organizationData.description ?? '')).toBeInTheDocument(); expect(screen.getByText('Post a Bounty')).toBeInTheDocument(); expect(screen.getByText('Status')).toBeInTheDocument(); expect(screen.getByText('Skill')).toBeInTheDocument(); expect(screen.getByPlaceholderText('Search')).toBeInTheDocument(); expect(screen.getByText(/Bounties/i)).toBeInTheDocument(); }); });
This test doesn't test for that.
It covers that the description is always visible, so add the test for the visibility for Post a Bounty
@elraphty I have added the test, Thanks
@elraphty I have added the test, Thanks
@chiragDork there is still only one file changed in this PR
I would take the same test @elraphty posted and then make meInfo
empty
The change looks good otherwise!
Hi @kevkevinpal sorry I missed to add the test file to the commit, I have made the commit again, can you please check and let me know if everything is okay now. Thanks.
@elraphty I have added the test, Thanks
@chiragDork there is still only one file changed in this PR
I would take the same test @elraphty posted and then make
meInfo
emptyThe change looks good otherwise!
@chiragDork do this, make the meInfo empty, then write a new test with a populated meInfo, and assert that the Post bounty button is visible.
Tested and paid! https://community.sphinx.chat/bounty/1564
Describe your changes
Fixed org description not visible for signed out user
Issue ticket number and link
issue: #284
Type of change
ui change
Please delete options that are not relevant.
Checklist before requesting a review