Skip to content

Commit

Permalink
Merge pull request #11317 from qmonmert/fixnested42
Browse files Browse the repository at this point in the history
Sonar: Fix - refactor this code to not nest functions more than 4 levels deep
  • Loading branch information
murdos authored Nov 9, 2024
2 parents 8cd523e + 15c30a2 commit de3ae98
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1246,14 +1246,14 @@ describe('Landscape', () => {
await performSearch(searchInput, 'not-found');

const landscape = defaultLandscape();
landscape.standaloneLevels().forEach(level => {
level.elements.forEach(element => {
element.allModules().forEach(module => {
const moduleClasses = wrapper.find(wrappedElement(`${module.slugString()}-module`)).classes();
expect(moduleClasses).not.toContain('-search-highlighted');
});
landscape
.standaloneLevels()
.flatMap(level => level.elements)
.flatMap(element => element.allModules())
.forEach(module => {
const moduleClasses = wrapper.find(wrappedElement(`${module.slugString()}-module`)).classes();
expect(moduleClasses).not.toContain('-search-highlighted');
});
});
});

it('should scroll vertically and horizontally to the highlighted module if it is not visible within the current viewport', async () => {
Expand Down

0 comments on commit de3ae98

Please sign in to comment.