mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Refactor to use "data-e2e" attributes in code to make selecting fields/buttons easier in e2e tests
This commit is contained in:
@@ -16,8 +16,8 @@ describe('Homepage', () => {
|
||||
|
||||
it('should have a working search box', () => {
|
||||
const queryString = 'test';
|
||||
cy.get('ds-search-form input[name="query"]').type(queryString);
|
||||
cy.get('ds-search-form button.search-button').click();
|
||||
cy.get('[data-e2e="search-box"]').type(queryString);
|
||||
cy.get('[data-e2e="search-button"]').click();
|
||||
cy.url().should('include', '/search');
|
||||
cy.url().should('include', 'query=' + encodeURI(queryString));
|
||||
});
|
||||
|
Reference in New Issue
Block a user