Skip to content

Commit 8c43e90

Browse files
KasinhouMatus Kasak
andauthored
TUL/Fix duplicate id (#1242)
* Disable static page playwright test for customer/tul * Changed id to class --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
1 parent 9eb8fdd commit 8c43e90

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

cypress/integration/header.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ describe('Header', () => {
1212
// testA11y({
1313
// include: ['ds-header'],
1414
// exclude: [
15-
// ['#search-navbar-container'], // search in navbar has duplicative ID. Will be fixed in #1174
1615
// ['.dropdownLogin'] // "Log in" link has color contrast issues. Will be fixed in #1149
1716
// ],
1817
// });

src/app/search-navbar/search-navbar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div id="search-navbar-container" [title]="'nav.search' | translate" (dsClickOutside)="collapse()">
1+
<div class="search-navbar-container" [title]="'nav.search' | translate" (dsClickOutside)="collapse()">
22
<div class="d-inline-block position-relative">
33
<form [formGroup]="searchForm" (ngSubmit)="onSubmit(searchForm.value)" autocomplete="on">
44
<input #searchInput [@toggleAnimation]="isExpanded" [attr.aria-label]="('nav.search' | translate)" name="query"

src/app/search-navbar/search-navbar.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe('SearchNavbarComponent', () => {
7272
spyOn(component, 'expand').and.callThrough();
7373
spyOn(component, 'onSubmit').and.callThrough();
7474
spyOn(router, 'navigate');
75-
const searchIcon = fixture.debugElement.query(By.css('#search-navbar-container form .submit-icon'));
75+
const searchIcon = fixture.debugElement.query(By.css('.search-navbar-container form .submit-icon'));
7676
searchIcon.triggerEventHandler('click', {
7777
preventDefault: () => {/**/
7878
}
@@ -88,7 +88,7 @@ describe('SearchNavbarComponent', () => {
8888
describe('empty query', () => {
8989
describe('press submit button', () => {
9090
beforeEach(fakeAsync(() => {
91-
const searchIcon = fixture.debugElement.query(By.css('#search-navbar-container form .submit-icon'));
91+
const searchIcon = fixture.debugElement.query(By.css('.search-navbar-container form .submit-icon'));
9292
searchIcon.triggerEventHandler('click', {
9393
preventDefault: () => {/**/
9494
}
@@ -109,14 +109,14 @@ describe('SearchNavbarComponent', () => {
109109
beforeEach(async () => {
110110
await fixture.whenStable();
111111
fixture.detectChanges();
112-
searchInput = fixture.debugElement.query(By.css('#search-navbar-container form input'));
112+
searchInput = fixture.debugElement.query(By.css('.search-navbar-container form input'));
113113
searchInput.nativeElement.value = 'test';
114114
searchInput.nativeElement.dispatchEvent(new Event('input'));
115115
fixture.detectChanges();
116116
});
117117
describe('press submit button', () => {
118118
beforeEach(fakeAsync(() => {
119-
const searchIcon = fixture.debugElement.query(By.css('#search-navbar-container form .submit-icon'));
119+
const searchIcon = fixture.debugElement.query(By.css('.search-navbar-container form .submit-icon'));
120120
searchIcon.triggerEventHandler('click', null);
121121
tick();
122122
fixture.detectChanges();

0 commit comments

Comments
 (0)