Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue 210 - Implementing search functionality #216

Merged
merged 20 commits into from
Nov 1, 2023

Conversation

meejain
Copy link

@meejain meejain commented Oct 25, 2023

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):

Fixes #210

Test URLs:

@meejain meejain self-assigned this Oct 25, 2023
@aem-code-sync
Copy link

aem-code-sync bot commented Oct 25, 2023

Hello, I'm the AEM Code Sync Bot and I will run some test suites that validate the page speed.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-run PSI Checks

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 25, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

1 similar comment
@aem-code-sync
Copy link

aem-code-sync bot commented Oct 25, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 25, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 25, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 25, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@meejain meejain marked this pull request as draft October 25, 2023 21:28
const res = document.createElement('div');
res.classList.add('search-result');
const header = document.createElement('h3');
const link = document.createElement('a');
const searchTitle = line.pagename || line.breadcrumbtitle || line.title;
if (line.pagename === 'Newsroom') searchTitle = line.breadcrumbtitle;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a type field which you can use to know whether its a "Newsroom" or "Health Thinking" page.

@@ -85,7 +87,7 @@ async function searchPages(placeholders, term, page) {
let childSpan;

if (parentPath) {
if (line.path.indexOf('/news/') !== -1) {
if (line.path.indexOf('/newsroom/') !== -1) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as prior comment to determine the type.

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 26, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@jindaliiita
Copy link

Screenshot 2023-10-26 at 2 28 58 PM

Text is not correct

@@ -72,11 +72,14 @@ async function searchPages(placeholders, term, page) {
const curPage = result.slice(startResult, startResult + resultsPerPage);

curPage.forEach((line) => {
console.log(line);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console statement

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -72,11 +72,14 @@ async function searchPages(placeholders, term, page) {
const curPage = result.slice(startResult, startResult + resultsPerPage);

curPage.forEach((line) => {
console.log(line);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console statement

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -85,7 +88,7 @@ async function searchPages(placeholders, term, page) {
let childSpan;

if (parentPath) {
Copy link

@jindaliiita jindaliiita Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic was mainly for the sunstar engineering search results.
is the same applicable on sunstar also and if not we can remove this

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, looking at the search results, its applicable here as well.

const res = document.createElement('div');
res.classList.add('search-result');
const header = document.createElement('h3');
const link = document.createElement('a');
const searchTitle = line.pagename || line.breadcrumbtitle || line.title;
if (line.type === 'Newsroom') searchTitle = line.breadcrumbtitle || line.title || line.type;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't get this change, why we need to make this special check

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jindaliiita - we need this since for newsroom type, there are certain things that needs to be populated in the search. That's why. There were couple of instances where line.breadcrumbtitle was empty and hence there was nothing coming up to click. That's why we put line.breadcrumbtitle || line.title || line.type.

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 26, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 26, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 27, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 27, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@meejain meejain marked this pull request as ready for review October 27, 2023 11:37
@aem-code-sync
Copy link

aem-code-sync bot commented Oct 29, 2023

Page Scores Audits Google
/search?s=sunstar&pg=4 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 29, 2023

Page Scores Audits Google
/search?s=sunstar&pg=4 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 29, 2023

Page Scores Audits Google
/search?s=sunstar&pg=4 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 29, 2023

Page Scores Audits Google
/search?s=sunstar&pg=4 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 29, 2023

Page Scores Audits Google
/search?s=sunstar&pg=4 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 29, 2023

Page Scores Audits Google
/search?s=sunstar&pg=4 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@meejain meejain marked this pull request as draft October 29, 2023 11:03
@aem-code-sync
Copy link

aem-code-sync bot commented Oct 29, 2023

Page Scores Audits Google
/search?s=sunstar&pg=4 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 29, 2023

Page Scores Audits Google
/search?s=sunstar&pg=4 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@github-actions
Copy link

🔸 26 visual differences detected

  • /healthy-thinking/6-things-you-didnt-know-about-your-oral-health (main vs branch)
    Expected an image 1280px by 3603px, received 1280px by 3759px. 681977 pixels (ratio 0.15 of all image pixels) are different.
  • /career/yuya-yoshisue (main vs branch)
    Expected an image 1312px by 4717px, received 1312px by 4795px. 452841 pixels (ratio 0.08 of all image pixels) are different.
  • /brands/consumer-health-beauty (main vs branch)
    Expected an image 1280px by 4036px, received 1280px by 4159px. 554499 pixels (ratio 0.11 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /about/business-performance (main vs branch)
    Expected an image 1280px by 3129px, received 1280px by 3297px. 641681 pixels (ratio 0.16 of all image pixels) are different.
  • /brands (main vs branch)
    Expected an image 1280px by 3128px, received 1280px by 3097px. 550599 pixels (ratio 0.14 of all image pixels) are different.
  • /about/history (main vs branch)
    Expected an image 1280px by 14081px, received 1280px by 13967px. 995991 pixels (ratio 0.06 of all image pixels) are different.
  • /about/structure (main vs branch)
    Expected an image 1280px by 2704px, received 1280px by 2768px. 214064 pixels (ratio 0.07 of all image pixels) are different.
  • /sustainability (main vs branch)
    Expected an image 1280px by 1188px, received 1280px by 1303px. 277976 pixels (ratio 0.17 of all image pixels) are different.
  • /careers (main vs branch)
    Expected an image 1312px by 5711px, received 1312px by 5876px. 1687803 pixels (ratio 0.22 of all image pixels) are different.
  • /careers/career-opportunities (main vs branch)
    Expected an image 1280px by 2665px, received 1280px by 2838px. 437985 pixels (ratio 0.13 of all image pixels) are different.
  • /about/global-network (main vs branch)
    Expected an image 1280px by 4547px, received 1280px by 4906px. 1476181 pixels (ratio 0.24 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /sidekick/blocks/hero (main vs branch)
    Expected an image 1280px by 5223px, received 1280px by 5247px. 296918 pixels (ratio 0.05 of all image pixels) are different.
  • /sidekick/blocks/collage (main vs branch)
    Expected an image 1280px by 5778px, received 1280px by 5825px. 557967 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/columns (main vs branch)
    Expected an image 1280px by 9400px, received 1280px by 9601px. 777019 pixels (ratio 0.07 of all image pixels) are different.
  • /sidekick/blocks/cards (main vs branch)
    Expected an image 1280px by 1838px, received 1280px by 1910px. 254220 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/tables (main vs branch)
    Expected an image 1280px by 2073px, received 1280px by 2481px. 235278 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/text-image (main vs branch)
    Expected an image 1280px by 4172px, received 1280px by 4709px. 1007562 pixels (ratio 0.17 of all image pixels) are different.
  • /sidekick/blocks/sections (main vs branch)
    Expected an image 1312px by 8454px, received 1312px by 9051px. 1201582 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/career-apply (main vs branch)
    Expected an image 1280px by 720px, received 1280px by 739px. 89710 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/network-item (main vs branch)
    Expected an image 1280px by 1829px, received 1280px by 2013px. 238566 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/tags (main vs branch)
    112773 pixels (ratio 0.13 of all image pixels) are different.
  • /sidekick/blocks/autoblock (main vs branch)
    Expected an image 1280px by 1263px, received 1280px by 1359px. 440060 pixels (ratio 0.26 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
    �[31mTest timeout of 30000ms exceeded.�[39m

The diff images are attached in the artifact

@github-actions
Copy link

🔸 26 visual differences detected

  • /healthy-thinking/6-things-you-didnt-know-about-your-oral-health (main vs branch)
    Expected an image 1280px by 3603px, received 1280px by 3759px. 681977 pixels (ratio 0.15 of all image pixels) are different.
  • /career/yuya-yoshisue (main vs branch)
    Expected an image 1312px by 4717px, received 1312px by 4795px. 452841 pixels (ratio 0.08 of all image pixels) are different.
  • /brands/consumer-health-beauty (main vs branch)
    Expected an image 1280px by 4036px, received 1280px by 4159px. 554499 pixels (ratio 0.11 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /brands (main vs branch)
    Expected an image 1280px by 3128px, received 1280px by 3097px. 550599 pixels (ratio 0.14 of all image pixels) are different.
  • /about/business-performance (main vs branch)
    Expected an image 1280px by 3129px, received 1280px by 3297px. 641681 pixels (ratio 0.16 of all image pixels) are different.
  • /about/history (main vs branch)
    Expected an image 1280px by 14081px, received 1280px by 13967px. 995991 pixels (ratio 0.06 of all image pixels) are different.
  • /sustainability (main vs branch)
    Expected an image 1280px by 1188px, received 1280px by 1303px. 277976 pixels (ratio 0.17 of all image pixels) are different.
  • /about/structure (main vs branch)
    Expected an image 1280px by 2704px, received 1280px by 2768px. 214064 pixels (ratio 0.07 of all image pixels) are different.
  • /careers (main vs branch)
    Expected an image 1312px by 5711px, received 1312px by 5876px. 1438169 pixels (ratio 0.19 of all image pixels) are different.
  • /careers/career-opportunities (main vs branch)
    Expected an image 1280px by 2665px, received 1280px by 2838px. 437985 pixels (ratio 0.13 of all image pixels) are different.
  • /about/global-network (main vs branch)
    Expected an image 1280px by 4547px, received 1280px by 4906px. 1476181 pixels (ratio 0.24 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /sidekick/blocks/hero (main vs branch)
    Expected an image 1280px by 5223px, received 1280px by 5247px. 296918 pixels (ratio 0.05 of all image pixels) are different.
  • /sidekick/blocks/collage (main vs branch)
    Expected an image 1280px by 5778px, received 1280px by 5825px. 557967 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/columns (main vs branch)
    Expected an image 1280px by 9400px, received 1280px by 9601px. 777019 pixels (ratio 0.07 of all image pixels) are different.
  • /sidekick/blocks/cards (main vs branch)
    Expected an image 1280px by 1838px, received 1280px by 1910px. 254220 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/tables (main vs branch)
    Expected an image 1280px by 2073px, received 1280px by 2481px. 235278 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/text-image (main vs branch)
    Expected an image 1280px by 4172px, received 1280px by 4709px. 1007562 pixels (ratio 0.17 of all image pixels) are different.
  • /sidekick/blocks/sections (main vs branch)
    Expected an image 1312px by 8454px, received 1312px by 9051px. 1201582 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/network-item (main vs branch)
    Expected an image 1280px by 1829px, received 1280px by 2013px. 238566 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/career-apply (main vs branch)
    Expected an image 1280px by 720px, received 1280px by 739px. 89710 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/tags (main vs branch)
    112773 pixels (ratio 0.13 of all image pixels) are different.
  • /sidekick/blocks/autoblock (main vs branch)
    Expected an image 1280px by 1263px, received 1280px by 1359px. 440060 pixels (ratio 0.26 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
    �[31mTest timeout of 30000ms exceeded.�[39m

The diff images are attached in the artifact

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 29, 2023

Page Scores Audits Google
/search?s=sunstar&pg=4 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@github-actions
Copy link

🔸 26 visual differences detected

  • /healthy-thinking/6-things-you-didnt-know-about-your-oral-health (main vs branch)
    Expected an image 1280px by 3603px, received 1280px by 3759px. 681977 pixels (ratio 0.15 of all image pixels) are different.
  • /brands/consumer-health-beauty (main vs branch)
    Expected an image 1280px by 4036px, received 1280px by 4159px. 554499 pixels (ratio 0.11 of all image pixels) are different.
  • /career/yuya-yoshisue (main vs branch)
    Expected an image 1312px by 4717px, received 1312px by 4795px. 452841 pixels (ratio 0.08 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /brands (main vs branch)
    Expected an image 1280px by 3128px, received 1280px by 3097px. 550599 pixels (ratio 0.14 of all image pixels) are different.
  • /about/business-performance (main vs branch)
    Expected an image 1280px by 3129px, received 1280px by 3297px. 641681 pixels (ratio 0.16 of all image pixels) are different.
  • /about/history (main vs branch)
    Expected an image 1280px by 14081px, received 1280px by 13967px. 995991 pixels (ratio 0.06 of all image pixels) are different.
  • /about/structure (main vs branch)
    Expected an image 1280px by 2704px, received 1280px by 2768px. 214064 pixels (ratio 0.07 of all image pixels) are different.
  • /sustainability (main vs branch)
    Expected an image 1280px by 1188px, received 1280px by 1303px. 277976 pixels (ratio 0.17 of all image pixels) are different.
  • /careers (main vs branch)
    Expected an image 1312px by 5711px, received 1312px by 5876px. 1438169 pixels (ratio 0.19 of all image pixels) are different.
  • /careers/career-opportunities (main vs branch)
    Expected an image 1280px by 2665px, received 1280px by 2838px. 437985 pixels (ratio 0.13 of all image pixels) are different.
  • /about/global-network (main vs branch)
    Expected an image 1280px by 4547px, received 1280px by 4906px. 1476181 pixels (ratio 0.24 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /sidekick/blocks/hero (main vs branch)
    Expected an image 1280px by 5223px, received 1280px by 5247px. 296918 pixels (ratio 0.05 of all image pixels) are different.
  • /sidekick/blocks/collage (main vs branch)
    Expected an image 1280px by 5778px, received 1280px by 5825px. 557967 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/columns (main vs branch)
    Expected an image 1280px by 9400px, received 1280px by 9601px. 777019 pixels (ratio 0.07 of all image pixels) are different.
  • /sidekick/blocks/cards (main vs branch)
    Expected an image 1280px by 1838px, received 1280px by 1910px. 254220 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/text-image (main vs branch)
    Expected an image 1280px by 4172px, received 1280px by 4709px. 1007562 pixels (ratio 0.17 of all image pixels) are different.
  • /sidekick/blocks/tables (main vs branch)
    Expected an image 1280px by 2073px, received 1280px by 2481px. 235278 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/sections (main vs branch)
    Expected an image 1312px by 8454px, received 1312px by 9051px. 1201582 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/network-item (main vs branch)
    Expected an image 1280px by 1829px, received 1280px by 2013px. 238566 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/career-apply (main vs branch)
    Expected an image 1280px by 720px, received 1280px by 739px. 89710 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/tags (main vs branch)
    112773 pixels (ratio 0.13 of all image pixels) are different.
  • /sidekick/blocks/autoblock (main vs branch)
    Expected an image 1280px by 1263px, received 1280px by 1359px. 440060 pixels (ratio 0.26 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
    �[31mTest timeout of 30000ms exceeded.�[39m

The diff images are attached in the artifact

@meejain meejain requested a review from bosschaert October 29, 2023 11:19
@meejain meejain marked this pull request as ready for review October 29, 2023 11:21
Copy link

aem-code-sync bot commented Oct 31, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Copy link

aem-code-sync bot commented Oct 31, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Copy link

🔸 27 visual differences detected

  • /healthy-thinking/6-things-you-didnt-know-about-your-oral-health (main vs branch)
    Expected an image 1280px by 3603px, received 1280px by 3759px. 681977 pixels (ratio 0.15 of all image pixels) are different.
  • /brands/consumer-health-beauty (main vs branch)
    Expected an image 1280px by 4036px, received 1280px by 4159px. 554499 pixels (ratio 0.11 of all image pixels) are different.
  • /career/yuya-yoshisue (main vs branch)
    Expected an image 1312px by 4717px, received 1280px by 4803px. 528235 pixels (ratio 0.09 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /brands (main vs branch)
    Expected an image 1280px by 3320px, received 1280px by 3657px. 1501494 pixels (ratio 0.33 of all image pixels) are different.
  • /about/business-performance (main vs branch)
    Expected an image 1280px by 3129px, received 1280px by 3297px. 642118 pixels (ratio 0.16 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /about/structure (main vs branch)
    Expected an image 1280px by 2704px, received 1280px by 2768px. 214241 pixels (ratio 0.07 of all image pixels) are different.
  • /sustainability (main vs branch)
    Expected an image 1280px by 1188px, received 1280px by 1303px. 277976 pixels (ratio 0.17 of all image pixels) are different.
  • /careers (main vs branch)
    Expected an image 1312px by 5711px, received 1280px by 5972px. 1607854 pixels (ratio 0.21 of all image pixels) are different.
  • /careers/career-opportunities (main vs branch)
    Expected an image 1280px by 2665px, received 1280px by 2806px. 362666 pixels (ratio 0.11 of all image pixels) are different.
  • /about/global-network (main vs branch)
    Expected an image 1280px by 4547px, received 1280px by 4866px. 1289845 pixels (ratio 0.21 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /sidekick/blocks/hero (main vs branch)
    Expected an image 1280px by 5223px, received 1280px by 5087px. 876157 pixels (ratio 0.14 of all image pixels) are different.
  • /sidekick/blocks/collage (main vs branch)
    Expected an image 1280px by 5778px, received 1280px by 5825px. 557967 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/columns (main vs branch)
    Expected an image 1280px by 9400px, received 1280px by 10923px. 1070210 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/cards (main vs branch)
    Expected an image 1280px by 1838px, received 1280px by 1910px. 254220 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/tables (main vs branch)
    Expected an image 1280px by 2073px, received 1280px by 2268px. 228056 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/text-image (main vs branch)
    Expected an image 1280px by 4172px, received 1280px by 4709px. 1007562 pixels (ratio 0.17 of all image pixels) are different.
  • /sidekick/blocks/carousel (main vs branch)
    Expected an image 1312px by 1421px, received 1280px by 1429px. 61595 pixels (ratio 0.04 of all image pixels) are different.
  • /sidekick/blocks/sections (main vs branch)
    Expected an image 1312px by 8454px, received 1312px by 9139px. 1314439 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/network-item (main vs branch)
    Expected an image 1280px by 1829px, received 1280px by 2013px. 238566 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/career-apply (main vs branch)
    Expected an image 1280px by 720px, received 1280px by 739px. 89710 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/tags (main vs branch)
    112773 pixels (ratio 0.13 of all image pixels) are different.
  • /sidekick/blocks/autoblock (main vs branch)
    Expected an image 1280px by 1263px, received 1280px by 1359px. 440060 pixels (ratio 0.26 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
    �[31mTest timeout of 30000ms exceeded.�[39m

The diff images are attached in the artifact

blocks/search-results/search-results.css Show resolved Hide resolved
const res1h3a = res1h3.children[0];
expect(res1h3a.nodeName).to.equal('A');
expect(res1h3a.href.endsWith('/news/a/')).to.be.true;
expect(res1h3.nodeName).to.equal('P');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the tests prior to the change tested the result content and ordering as well which we are not doing now. Would it help if the test fixtures are updated and we retain these checks?

Copy link
Author

@meejain meejain Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, Will check with David on that - how these tests are working.

blocks/search-results/search-results.js Outdated Show resolved Hide resolved
// elementForward = currentElement.nextElementSibling.nextElementSibling;
// }
// eslint-disable-next-line max-len
elementForward = (page === 0) ? currentElement.nextElementSibling.nextElementSibling.nextElementSibling : currentElement.nextElementSibling.nextElementSibling;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be problematic if there are lesser number of siblings than this code expects?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nopes, it will not be, since these are under the condition if if (totalPages > paginationLimit) . Here Pagination Limit is 5. If totalPages is more than 5 then only, rest of the logic will apply. Please advise.

if (elementForward.innerText === '...') break;
}
// eslint-disable-next-line max-len
let elementBefore = currentElement.previousElementSibling.previousElementSibling.previousElementSibling;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be problematic if there are lesser number of siblings than this code expects?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nopes, it will not be, since these are under the condition if if (totalPages > paginationLimit) . Here Pagination Limit is 5. If totalPages is more than 5 then only, rest of the logic will apply. Please advise.

Copy link

aem-code-sync bot commented Oct 31, 2023

Page Scores Audits Google
/search?s=san+francisco PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Copy link

🔸 27 visual differences detected

  • /healthy-thinking/6-things-you-didnt-know-about-your-oral-health (main vs branch)
    Expected an image 1280px by 3534px, received 1280px by 3717px. 768032 pixels (ratio 0.17 of all image pixels) are different.
  • /career/yuya-yoshisue (main vs branch)
    Expected an image 1312px by 4717px, received 1280px by 4803px. 528235 pixels (ratio 0.09 of all image pixels) are different.
  • /brands/consumer-health-beauty (main vs branch)
    Expected an image 1280px by 4036px, received 1280px by 4159px. 554499 pixels (ratio 0.11 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /brands (main vs branch)
    Expected an image 1280px by 3320px, received 1280px by 3657px. 1501494 pixels (ratio 0.33 of all image pixels) are different.
  • /about/business-performance (main vs branch)
    Expected an image 1280px by 3129px, received 1280px by 3297px. 642118 pixels (ratio 0.16 of all image pixels) are different.
  • /about/history (main vs branch)
    Expected an image 1280px by 14081px, received 1280px by 14727px. 2137355 pixels (ratio 0.12 of all image pixels) are different.
  • /about/structure (main vs branch)
    Expected an image 1280px by 2704px, received 1280px by 2768px. 214241 pixels (ratio 0.07 of all image pixels) are different.
  • /sustainability (main vs branch)
    Expected an image 1280px by 1188px, received 1280px by 1303px. 277976 pixels (ratio 0.17 of all image pixels) are different.
  • /careers (main vs branch)
    Expected an image 1312px by 5711px, received 1280px by 5972px. 1782879 pixels (ratio 0.23 of all image pixels) are different.
  • /careers/career-opportunities (main vs branch)
    Expected an image 1280px by 2665px, received 1280px by 2806px. 362666 pixels (ratio 0.11 of all image pixels) are different.
  • /about/global-network (main vs branch)
    Expected an image 1280px by 4547px, received 1280px by 4866px. 1289845 pixels (ratio 0.21 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
  • /sidekick/blocks/collage (main vs branch)
    Expected an image 1280px by 5778px, received 1280px by 5825px. 557967 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/hero (main vs branch)
    Expected an image 1280px by 5223px, received 1280px by 5087px. 876157 pixels (ratio 0.14 of all image pixels) are different.
  • /sidekick/blocks/columns (main vs branch)
    Expected an image 1280px by 9400px, received 1280px by 10923px. 1070210 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/cards (main vs branch)
    Expected an image 1280px by 1838px, received 1280px by 1910px. 254220 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/text-image (main vs branch)
    Expected an image 1280px by 4172px, received 1280px by 4709px. 1007562 pixels (ratio 0.17 of all image pixels) are different.
  • /sidekick/blocks/tables (main vs branch)
    Expected an image 1280px by 2073px, received 1280px by 2268px. 228056 pixels (ratio 0.08 of all image pixels) are different.
  • /sidekick/blocks/sections (main vs branch)
    Expected an image 1312px by 8454px, received 1312px by 9139px. 1314439 pixels (ratio 0.11 of all image pixels) are different.
  • /sidekick/blocks/carousel (main vs branch)
    Expected an image 1312px by 1421px, received 1280px by 1429px. 61595 pixels (ratio 0.04 of all image pixels) are different.
  • /sidekick/blocks/career-apply (main vs branch)
    Expected an image 1280px by 720px, received 1280px by 739px. 89710 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/network-item (main vs branch)
    Expected an image 1280px by 1829px, received 1280px by 2013px. 238566 pixels (ratio 0.10 of all image pixels) are different.
  • /sidekick/blocks/tags (main vs branch)
    112773 pixels (ratio 0.13 of all image pixels) are different.
  • /sidekick/blocks/autoblock (main vs branch)
    Expected an image 1280px by 1263px, received 1280px by 1359px. 440060 pixels (ratio 0.26 of all image pixels) are different.
    �[31mTest timeout of 30000ms exceeded.�[39m
    �[31mTest timeout of 30000ms exceeded.�[39m

The diff images are attached in the artifact

@meejain meejain merged commit 450340f into main Nov 1, 2023
3 of 4 checks passed
@meejain meejain deleted the issue210-search-functionality branch November 1, 2023 13:13
@sdmcraft sdmcraft added this to the Milestone-7 milestone Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Search functionality
3 participants