-
-
-
-
diff --git a/src/app/shared/starts-with/text/starts-with-text.component.spec.ts b/src/app/shared/starts-with/text/starts-with-text.component.spec.ts
index 9f9d9d6d42..ca7e74f7f2 100644
--- a/src/app/shared/starts-with/text/starts-with-text.component.spec.ts
+++ b/src/app/shared/starts-with/text/starts-with-text.component.spec.ts
@@ -51,116 +51,6 @@ describe('StartsWithTextComponent', () => {
expect(comp.formData.value.startsWith).toBeDefined();
});
- describe('when selecting the first option in the dropdown', () => {
- let select;
-
- beforeEach(() => {
- select = fixture.debugElement.query(By.css('select')).nativeElement;
- select.value = select.options[0].value;
- select.dispatchEvent(new Event('change'));
- fixture.detectChanges();
- });
-
- it('should set startsWith to undefined', () => {
- expect(comp.startsWith).toBeUndefined();
- });
-
- it('should not add a startsWith query parameter', () => {
- route.queryParams.subscribe((params) => {
- expect(params.startsWith).toBeUndefined();
- });
- });
- });
-
- describe('when selecting "0-9" in the dropdown', () => {
- let select;
- let input;
- const expectedValue = '0';
- const extras: NavigationExtras = {
- queryParams: Object.assign({ startsWith: expectedValue }),
- queryParamsHandling: 'merge'
- };
-
- beforeEach(() => {
- select = fixture.debugElement.query(By.css('select')).nativeElement;
- input = fixture.debugElement.query(By.css('input')).nativeElement;
- select.value = select.options[1].value;
- select.dispatchEvent(new Event('change'));
- fixture.detectChanges();
- });
-
- it('should set startsWith to "0"', () => {
- expect(comp.startsWith).toEqual(expectedValue);
- });
-
- it('should add a startsWith query parameter', () => {
- expect(router.navigate).toHaveBeenCalledWith([], extras);
- });
-
- it('should automatically fill in the input field', () => {
- expect(input.value).toEqual(expectedValue);
- });
- });
-
- describe('when selecting an option in the dropdown', () => {
- let select;
- let input;
- const expectedValue = options[1];
- const extras: NavigationExtras = {
- queryParams: Object.assign({ startsWith: expectedValue }),
- queryParamsHandling: 'merge'
- };
-
- beforeEach(() => {
- select = fixture.debugElement.query(By.css('select')).nativeElement;
- input = fixture.debugElement.query(By.css('input')).nativeElement;
- select.value = select.options[2].value;
- select.dispatchEvent(new Event('change'));
- fixture.detectChanges();
- });
-
- it('should set startsWith to the expected value', () => {
- expect(comp.startsWith).toEqual(expectedValue);
- });
-
- it('should add a startsWith query parameter', () => {
- expect(router.navigate).toHaveBeenCalledWith([], extras);
- });
-
- it('should automatically fill in the input field', () => {
- expect(input.value).toEqual(expectedValue);
- });
- });
-
- describe('when clicking an option in the list', () => {
- let optionLink;
- let input;
- const expectedValue = options[1];
- const extras: NavigationExtras = {
- queryParams: Object.assign({ startsWith: expectedValue }),
- queryParamsHandling: 'merge'
- };
-
- beforeEach(() => {
- optionLink = fixture.debugElement.query(By.css('.list-inline-item:nth-child(2) > a')).nativeElement;
- input = fixture.debugElement.query(By.css('input')).nativeElement;
- optionLink.click();
- fixture.detectChanges();
- });
-
- it('should set startsWith to the expected value', () => {
- expect(comp.startsWith).toEqual(expectedValue);
- });
-
- it('should add a startsWith query parameter', () => {
- expect(router.navigate).toHaveBeenCalledWith([], extras);
- });
-
- it('should automatically fill in the input field', () => {
- expect(input.value).toEqual(expectedValue);
- });
- });
-
describe('when filling in the input form', () => {
let form;
const expectedValue = 'A';
diff --git a/src/app/shared/testing/route-service.stub.ts b/src/app/shared/testing/route-service.stub.ts
index 1962755bbc..3a5b5b16b5 100644
--- a/src/app/shared/testing/route-service.stub.ts
+++ b/src/app/shared/testing/route-service.stub.ts
@@ -1,14 +1,17 @@
-import { of as observableOf } from 'rxjs';
+import { EMPTY, of as observableOf } from 'rxjs';
export const routeServiceStub: any = {
/* tslint:disable:no-empty */
hasQueryParamWithValue: (param: string, value: string) => {
+ return EMPTY;
},
hasQueryParam: (param: string) => {
+ return EMPTY;
},
removeQueryParameterValue: (param: string, value: string) => {
+ return EMPTY;
},
- addQueryParameterValue: (param: string, value: string) => {
+ addQueryParameterValue: (param: string, value: string) => { return EMPTY;
},
getQueryParameterValues: (param: string) => {
return observableOf({});
diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5
index d9b833804e..ddd7c8f693 100644
--- a/src/assets/i18n/en.json5
+++ b/src/assets/i18n/en.json5
@@ -576,6 +576,8 @@
+ "browse.back.all-results": "All browse results",
+
"browse.comcol.by.author": "By Author",
"browse.comcol.by.dateissued": "By Issue Date",
@@ -606,6 +608,8 @@
"browse.next.button": "Next",
+ "browse.next.button.disabled.tooltip": "No more pages of results",
+
"browse.previous.button": "Previous",
"browse.startsWith.choose_start": "(Choose start)",
@@ -650,7 +654,7 @@
"browse.startsWith.type_date.label": "Or type in a date (year-month) and click on the Browse button",
- "browse.startsWith.type_text": "Type the first few letters and click on the Browse button",
+ "browse.startsWith.type_text": "Filter results by typing the first few letters",
"browse.title": "Browsing {{ collection }} by {{ field }} {{ value }}",