Skip to content

Commit

Permalink
Merge branch 'stage' into update_cdk_jbrowse
Browse files Browse the repository at this point in the history
  • Loading branch information
oblodgett authored May 1, 2024
2 parents f632691 + 45caf96 commit c543694
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 35 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/github-actions-PR-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ jobs:
run: npm install --legacy-peer-deps
- name: Make Dist Folder
run: mkdir dist
- name: Npm build
run: npm run build
- name: Run UI Tests and Build
run: |
npm run build
npm test -- --watchAll=false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ nvm is used to manage Node.js versions. [Follow these instructions](https://gith
Ensure the correct version of Node.js is **installed**, if using the particular version of Node.js for the first time:

```bash
nvm install
nvm install
```

_Note: the command uses **nvm**, not npm. Nvm deals with the version of Node.js itself._
Expand Down
3 changes: 2 additions & 1 deletion bin/build_sitemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ var sitemap = sm.createSitemap({
{ url: '/genome-features', changefreq: 'monthly', priority: 0.7, lastmodrealtime: true },
{ url: '/administrative-supplement', changefreq: 'monthly', priority: 0.7, lastmodrealtime: true },
{ url: '/phenotypes-and-disease-models', changefreq: 'monthly', priority: 0.7, lastmodrealtime: true },
{ url: '/submit-data', changefreq: 'monthly', priority: 0.7, lastmodrealtime: true }
{ url: '/submit-data', changefreq: 'monthly', priority: 0.7, lastmodrealtime: true },
{ url: '/textpresso', changefreq: 'monthly', priority: 0.7, lastmodrealtime: true }
]
});

Expand Down
24 changes: 14 additions & 10 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,31 @@ export const NAV_MENU = [
route: '/swagger-ui',
external: true,
},
{
label: 'AllianceMine',
route: '/bluegenes/alliancemine',
external: true,
},
{
label: 'JBrowse 2',
route: '/jbrowse2/',
external: true,
},
{
label: 'Submit Data',
route: '/submit-data',
},
{
label: 'Textpresso',
route: '/textpresso',
},
{
label: 'Tools and Prototypes',
route: '/prototypes',
},
{
label: 'COVID-19 Information',
route: '/coronavirus-resources',
},
{
label: 'AllianceMine',
route: '/bluegenes/alliancemine',
external: true,
},
{
label: 'JBrowse 2',
route: '/jbrowse2/',
external: true,
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions src/containers/modLanding/tests/Footer/fb_footer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ describe('FlyBase footer tests', () => {
for (let i=0; i<content.footer.length; i++){

let footer = screen.getByTestId("href_footer_" + i);
expect(footer).toHaveAttribute('href', content.footer[i][1]);
expect(footer).toHaveAttribute('href', content.footer[i][2]);

let label = screen.getByTestId('footer_label_' + i);
expect(label).toContainHTML(content.footer[i][0]);
expect(label).toContainHTML(content.footer[i][1]);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/containers/modLanding/tests/Footer/go_footer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ describe('GO footer tests.', () => {
for (let i=0; i<content.footer.length; i++){

let footer = screen.getByTestId("href_footer_" + i);
expect(footer).toHaveAttribute('href', content.footer[i][1]);
expect(footer).toHaveAttribute('href', content.footer[i][2]);

let label = screen.getByTestId('footer_label_' + i)
expect(label).toContainHTML(content.footer[i][0]);
expect(label).toContainHTML(content.footer[i][1]);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/containers/modLanding/tests/Footer/mgi_footer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ describe('Mouse footer tests.', () => {
for (let i=0; i<content.footer.length; i++){

let footer = screen.getByTestId("href_footer_" + i);
expect(footer).toHaveAttribute('href', content.footer[i][1]);
expect(footer).toHaveAttribute('href', content.footer[i][2]);

let label = screen.getByTestId('footer_label_' + i)
expect(label).toContainHTML(content.footer[i][0]);
expect(label).toContainHTML(content.footer[i][1]);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/containers/modLanding/tests/Footer/rgd_footer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ describe('Rat footer tests', () => {
for (let i=0; i<content.footer.length; i++){

let footer = screen.getByTestId("href_footer_" + i);
expect(footer).toHaveAttribute('href', content.footer[i][1]);
expect(footer).toHaveAttribute('href', content.footer[i][2]);

let label = screen.getByTestId('footer_label_' + i)
expect(label).toContainHTML(content.footer[i][0]);
expect(label).toContainHTML(content.footer[i][1]);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/containers/modLanding/tests/Footer/sgd_footer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ describe('Yeast Footer', () => {
for (let i=0; i<content.footer.length; i++){

let footer = screen.getByTestId("href_footer_" + i);
expect(footer).toHaveAttribute('href', content.footer[i][1]);
expect(footer).toHaveAttribute('href', content.footer[i][2]);

let label = screen.getByTestId('footer_label_' + i)
expect(label).toContainHTML(content.footer[i][0]);
expect(label).toContainHTML(content.footer[i][1]);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/containers/modLanding/tests/Footer/wb_footer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ describe('WormBase Footer', () => {
for (let i=0; i<content.footer.length; i++){

let footer = screen.getByTestId("href_footer_" + i);
expect(footer).toHaveAttribute('href', content.footer[i][1]);
expect(footer).toHaveAttribute('href', content.footer[i][2]);

let label = screen.getByTestId('footer_label_' + i)
expect(label).toContainHTML(content.footer[i][0]);
expect(label).toContainHTML(content.footer[i][1]);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/containers/modLanding/tests/Footer/zfin_footer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ describe('ZebraFish footer tests', () => {
for (let i=0; i<content.footer.length; i++){

let footer = screen.getByTestId("href_footer_" + i);
expect(footer).toHaveAttribute('href', content.footer[i][1]);
expect(footer).toHaveAttribute('href', content.footer[i][2]);

let label = screen.getByTestId('footer_label_' + i)
expect(label).toContainHTML(content.footer[i][0]);
expect(label).toContainHTML(content.footer[i][1]);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('wormbase static link to meetings', () => {
expect(div).toContainElement(header2);
expect(header2).toContainElement(link);
expect(link).toHaveAttribute('href', content.meetingsURL);
expect(link).toHaveTextContent('Click here for the latest meetings from ' + content.modShortName);
expect(link).toHaveTextContent(`Discover upcoming ${content.modShortName} related meetings`);

});
});
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('goc static link to news', () => {
expect(div).toContainElement(header2);
expect(header2).toContainElement(link);
expect(link).toHaveAttribute('href', content.newsURL);
expect(link).toHaveTextContent('Click here for the latest news from ' + content.modShortName);
expect(link).toHaveTextContent('Read the latest news from ' + content.modShortName);

});
});
11 changes: 6 additions & 5 deletions src/tests/application.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ global.scrollTo = jest.fn();

describe('ReactApp', () => {
it('should be able to render to an HTML string', () => {
global.window = {
location: {
hostname: 'www.alliancegenome.org'
}
};
Object.defineProperty(global.window, 'location', {
value: {
hostname: 'www.alliancegenome.org',
},
});

let htmlString = renderToString(
<ReactApp router={MemoryRouter} />
);
Expand Down

0 comments on commit c543694

Please sign in to comment.