Rufus Pollock 337d4a8186 [refactor,#59][s]: move packages/portal => examples/catalog as per plan in #59.
What is currently packages/portal is example of a running portal and should move to examples (it will get replaced by an actual portal lib soon).
2021-03-06 17:55:32 +01:00

33 lines
847 B
JavaScript

describe('Test Home Page', () => {
beforeEach(() => {
cy.visit('/');
});
it('renders the hero title', () => {
cy.contains('Find, Share and Publish Quality Data with Datahub');
});
it('checks that a search form exists', () => {
cy.get('form').contains('Search');
});
// it('submits the search form', () => {
// cy.get('form').find('[type="text"]').type('gdp');
// cy.get('form').submit();
// cy.url().should('include', '/search?q=gdp&sort=');
// cy.get('.text-3xl').and('contain.text', '1 results found');
// });
it('shows the recent datasets', () => {
cy.contains('Recent Datasets');
});
it('returns the expected number of recent datasets', () => {
cy.get('.recent')
.find('div')
.should(($div) => {
expect($div).to.have.length.of.at.least(2);
});
});
});