Skip to content

Commit b628243

Browse files
committed
getting tests from red to green
1 parent 20a2d29 commit b628243

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

frontend/src/components/footer/tests/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe('Footer', () => {
119119
screen.getByRole('link', {
120120
name: messages.learn.defaultMessage,
121121
}),
122-
).toHaveAttribute('href', 'https://osm.org/about');
122+
).toHaveAttribute('href', 'https://www.openhistoricalmap.org/about');
123123
});
124124

125125
it('should not display foooter for specified URLs', () => {

frontend/src/components/header/tests/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('Header', () => {
3636
if (ORG_LOGO) {
3737
expect(orgLogo).toHaveAttribute('src', ORG_LOGO);
3838
} else {
39-
expect(orgLogo).toHaveAttribute('src', 'main-logo.svg');
39+
expect(orgLogo).toHaveAttribute('src', 'main-logo-ohm.svg');
4040
}
4141
expect(screen.getByText(/Tasking Manager/i)).toBeInTheDocument();
4242
['Explore projects', 'Learn', 'About'].forEach((menuItem) =>

frontend/src/components/userDetail/tests/headerProfile.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
} from '../../../utils/testWithIntl';
1111
import { userQueryDetails } from '../../../network/tests/mockData/userList';
1212
import { store } from '../../../store';
13+
import * as config from "../../../config";
1314

1415
let mockData = {
1516
id: 10291369,
@@ -46,7 +47,7 @@ describe('Social Media component', () => {
4647
).toHaveLength(3);
4748
expect(screen.queryAllByRole('link', { name: 'johndoe' })[0]).toHaveAttribute(
4849
'href',
49-
'https://www.openhistoricalmap.org/user/johndoe',
50+
`${config.OSM_SERVER_URL}/user/johndoe`,
5051
);
5152
expect(screen.queryAllByRole('link', { name: 'johndoe' })[1]).toHaveAttribute(
5253
'href',

frontend/src/utils/tests/htmlFromMarkdown.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { htmlFromMarkdown, formatUserNamesToLink } from '../htmlFromMarkdown';
22

33
test('htmlFromMarkdown returns correct content', () => {
44
expect(htmlFromMarkdown('![test](https://a.co/img.jpg)').__html).toContain(
5-
'<p><img alt="test" src="https://a.co/img.jpg"></p>',
5+
'<p><img src="https://a.co/img.jpg" alt="test"></p>',
66
);
77
expect(htmlFromMarkdown('[test](https://a.co/)').__html).toContain(
88
'<p><a href="https://a.co/" target="_blank">test</a></p>',

0 commit comments

Comments
 (0)