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

Dev/test acceptance #1023

Closed
wants to merge 19 commits into from
Closed

Dev/test acceptance #1023

wants to merge 19 commits into from

Conversation

oshi97
Copy link
Contributor

@oshi97 oshi97 commented Dec 14, 2021

No description provided.

yen-tt and others added 19 commits November 4, 2021 12:52
- move directanswers markup and script to common-partials folder
- update vertical standard templates to include direct answer
- update direct answer base card component to include the correct searcher (Universal or Vertical)
- add and comment out directanswer config for vertical standard page

NOTE: this requires [changes in SDK](yext/answers-search-ui#1596) to work

J=SLAP-1674
T=manual

change people vertical page to vertical-standard with directanswer configs/templates uncommented. serve test-site, and perform 'bryan phone number' on universal page and people page. See that direct answers appear for both page. When click thumbs up, see that the appropriate analytics payload is send in the request.
- add commented out `environment` in global_config.json

J=SLAP-1663
TEST=manual

see the environment is change based on value in global_config.json
This allows users to call window.AnswersExperience.init() from within the on-document-load partial.
I added an error message if you try to call window.AnswersExperience.init() before ManualInitializer.setup()
has been called.

While testing, I noticed a bug with our script/* partials that get inserted into inline js.
If the last line of one of these partials is a single line js comment, then the line immediately following
the partial in the template would also be commented out

i.e., the below template
```hbs
{{#*inline 'script-partial'}}// I will comment out the line after me too{{/inline}}
function () {
  {{> script-partial }}
}
```

gets the output
```js
function () {
  // I will comment out the line after me too}
```
You can easily test this out in the handlebars playground or in a local node script.
To fix this I added new lines to the end of script/* partials that would be affected by this.

J=SLAP-1673
TEST=manual

tested calling window.AnswersExperience.init inside on-document-load with initializeManually set to true/false, and doing an end-to-end with consumer auth
The API is allowed to send an undefined cta linkType. Setting
the default to URL effectively grabs the link with no extra
formatting.

J=SLAP-1655
TEST=auto
Change the image formatter to use dynamic thumbnailer instead of expecting an array of thumbnails. A thumbnail array will no longer be provided after the streams migration. Dynamic thumbnailer uses the host `dynl` for images at least as large as the specified size (the smallest image with at least one dimension greater than or equal to the specified values). The host `dynm` gives the largest image that is smaller than the specified values in both dimensions.

Note: for `dynl`, desired size values of 1 or smaller are a special case which indicates that dimension should be ignored and the returned thumbnail should be larger than the other dimension.

J=SLAP-1670
TEST=auto, manual

Check that the current profile images still appear as before and those in the streams test account now appear as well.
Update testing infrastructure to CaC approach for percy and wcag tests.

- added `PageOperator` which is responsible fo automating browser navigation using the given test locations
- test locations provide information on what page to navigate to and what action/query to perform on that page
- update wcag and percy index.js file to use PageOperator
- added some snapshots for es/ar pages that wasn't there before
- remove photographer, multilangphotographer, and wcagreporter class as they are no longer needed with pageOperator in use

J=1657
TEST=auto

see that wcag tests run successfully on local machine
see that percy snapshots are taken properly in this pr
Merge master (v1.26.0) into develop
Change the default universalLimit for all vertical page-configs to 4.

J=SLAP-1681
TEST=manual

Smoke test in test-site and see that faq universal results are limited to 4 when uncommented.
J=SLAP-1678
TEST=manual

built vertical-grid and vertical-standard page in english
checked spellcheck looks as expected for mispelled searches
- perform full HTML escape on the constructed highlighted text (will transform ", ', &, <, and >)
- `substr` is deprecated, replaced with `substring`

J=SLAP-1703
TEST=manual & auto

update bryan's entity description to include script tags, search for 'where is joe exotic' and see that the script tags appear. (without the replacement, they do not appear)
see added jest tests passed
- Add github action to create a pr with version update commit to a release/hotfix branch on create.

J=SLAP-1356
- update escape-html to be devDependency in top level package
- add escape-html as depeendency in static package
Change styling of `yxt-FilterOptions-options` to remove scrollbars that were appearing on filters even when all options were displayed for some cases with custom font sizes. Add a `--yxt-filters-and-sorts-line-height` variable so that customers can change the line-height of the `optionLabel` easily if the scrollbar appears with even larger custom font sizes.

J=SLAP-1727
TEST=visual

See that filter scrollbar was removed on a site where it was previously appearing.
- The create event does not support branch filter and tag filter so this would run on any branch creation. Update to trigger on push from release or hotfix branch. Then check if version is updated before making a new branch for pr

J=none
TEST=manual

test in dummy repo, see version update on hotfix/release branch, but not in dev branches
J=SLAP-1678
TEST=manual

rebuilt test site, looks as expected
…ight`. (#1019)

The variable name was changed from `--yxt-filters-option-label-line-height` to
`--yxt-filter-options-option-label-line-height`.

TEST=none

Simply did a find/replace all.
Fix font preloads on multilang sites and no longer generate a hash for fonts

When webpack was processing the preload tags to update them to use the hash, it was dropping the relative path which jambo was adding which caused the preloads to point to invalid links on multilang sites. I couldn't find an option to adjust the path names after webpack processed it, so the simpler solution is to remove the hashes from the fonts. That way webpack will no longer need to update the font preloads and we can instead rely on the relative path provided by Jambo.
 
There was an additional bug where we had an extra dot in the font names. (e.g. source-sans..woff), and this change fixes that as well.

Because we are removing the hash, that makes it more difficult to cache bust it. If someone uses a new font file and names it exactly the same as one of the previous fonts, they cache will return the old asset. The current font names are so specific that I find this unlikely to be a problem (e.g. source-sans-pro-v14-latin-300.woff). 

J=SLAP-1724
TEST=manual

Check the network tab for font loads on english experiences and on multilang pages. Check both universal and vertical pages and observe that the error in the console about invalid font preloads is gone for multilang sites. See that the loaded font no longer has an extra dot before the extension.
Bump version to v1.27.0

J=none
TEST=none
Previously, if a `universalLimit` were specified for a vertical, we would perform client-side filtering. Instead, we should be creating a `search.universalLimit` object and passing that to `ANSWERS.init`. Not only does this remove responsibility from the front-end, but it allows the HH to display more than 10 results per vertical on the Universal page.

This PR adds a `getDefaultUniversalLimit` helper that iterates through the vertical page configs and uses the `verticalsToConfig.universalLimits` to build a `search.universalLimit`. 

J=SLAP-1749
TEST=manual

Tested the following scenarios and verified correct behavior in each:

- No `universalLimit` values are set and there is no limit specified in the `global_config` or `pageSettings`.
- Some `universalLimit` values are set, but not others. There is no universal limit in the `global_config` or `pageSettings`.
- Some `universalLimit` values are set, but a universal limit is also present in the `global_config`.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 8.842% when pulling e958b68 on dev/test-acceptance into 06642fb on master.

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.

6 participants