Skip to content

Commit

Permalink
update assets/publishers.json (#41)
Browse files Browse the repository at this point in the history
* update assets/publishers.json

* update cypress tests

* add test for org link

* Add blue gradient prop back to hero

* Fix block classes on home page

* Fix publishers path

* Upgrade component version to fix publisher

Co-authored-by: dgading <dgading@gmail.com>
  • Loading branch information
janette and dgading authored Sep 29, 2020
1 parent 44c7e07 commit adef734
Show file tree
Hide file tree
Showing 6 changed files with 1,726 additions and 1,477 deletions.
4 changes: 2 additions & 2 deletions cypress/integration/dataset-stubbed.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ context('Dataset stubbed', () => {
it('I can select the number of rows per page in each table.', () => {
cy.get(`#resource_1234abcd .-pageInfo`).should('contain', 'Page 1 of 10')
cy.get(`#resource_1234abcd .page-size-select`).select('50')
cy.get(`#resource_1234abcd .-pageInfo`).should('contain', 'Page 1 of 4')
cy.get(`#resource_1234abcd .-pageInfo`, { timeout: 40000 }).should('contain', 'Page 1 of 4')
cy.get(`#resource_1234abcd .page-size-select`).select('100')
cy.get(`#resource_1234abcd .-pageInfo`).should('contain', 'Page 1 of 2')
cy.get(`#resource_1234abcd .-pageInfo`, { timeout: 40000 }).should('contain', 'Page 1 of 2')
})

it('I can change the density of the data table rows', () => {
Expand Down
9 changes: 7 additions & 2 deletions cypress/integration/publishers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ context('Publishers', () => {
cy.findByRole('heading', { name: 'Dataset Publishers' });
cy.findByAltText('State Economic Council');
cy.findByRole('heading', { name: 'State Economic Council' });
cy.findByAltText('Advisory Council for Infectious Disease');
cy.findByRole('heading', { name: 'Advisory Council for Infectious Disease' });
cy.findByAltText('National Health Council');
cy.findByRole('heading', { name: 'National Health Council' });
cy.findByAltText('Committee on International Affairs');
cy.findByRole('heading', { name: 'Committee on International Affairs' });
})
// Enable when components are updated.
it.skip('Links should take me to the search page', () => {
cy.findByRole('link', { name: 'Publishers' }).click({ force: true });
cy.get('.dc-publisher-list > :nth-child(1) > a').should('have.attr', 'href').and('eq', '../search?publisher__name=State Economic Council');
})

});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": false,
"homepage": "frontend/build",
"dependencies": {
"@civicactions/data-catalog-components": "^1.1.0",
"@civicactions/data-catalog-components": "^1.4.1",
"@fortawesome/fontawesome-svg-core": "^1.2.25",
"@fortawesome/free-brands-svg-icons": "^5.11.2",
"@fortawesome/free-solid-svg-icons": "^5.11.2",
Expand Down
11 changes: 7 additions & 4 deletions src/assets/publishers.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
[
{
"name": "State Economic Council",
"description": "The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc."
"description": "The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc.",
"searchUrl":"/search/?publisher__name=State Economic Council"
},
{
"name": "Advisory Council for Infectious Disease",
"name": "National Health Council",
"imageUrl": "https://dkan-default-content-files.s3.amazonaws.com/files/publishers/clipboard.png",
"description": "Advisory Council for Infectious Disease is a working group that performs research and prepares reports to inform treatment and prevention programs nationally."
"description": "National Health Council is a working group that performs research and prepares reports to inform treatment and prevention programs nationally.",
"searchUrl":"/search/?publisher__name=National Health Council"
},
{
"name": "Committee on International Affairs",
"imageUrl": "https://dkan-default-content-files.s3.amazonaws.com/files/publishers/map.png",
"description": "The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe."
"description": "The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe.",
"searchUrl":"/search/?publisher__name=Committee on International Affairs"
}
]
5 changes: 3 additions & 2 deletions src/templates/home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Home = () => {
return (
<Layout title="Home">
<div className="home-page">
<Hero title={copy.hero[0].title} intro={copy.hero[0].intro} />
<Hero title={copy.hero[0].title} intro={copy.hero[0].intro} gradient={'rgb(22, 46, 81), rgb(9, 120, 188)'} />
<div className="container">
<IconList
items={items}
Expand All @@ -67,7 +67,8 @@ const Home = () => {
<Blocks
items={copy.stats}
component={StatBlock}
className="StatBlock"
containerClass=""
blockClass="StatBlock"
/>
<FeaturedDatasets datasets={fDatasets} />
</div>
Expand Down
Loading

0 comments on commit adef734

Please sign in to comment.