Skip to content

Commit

Permalink
v1.15.1 (#1792)
Browse files Browse the repository at this point in the history
### Changes
- Update GitHub workflows to address deprecation warnings (#1789)
- Stop testing on IE11 now that the Google Maps JS API has dropped support for IE11 (#1791, #1793)
  • Loading branch information
nmanu1 committed Dec 1, 2022
2 parents 9c9b83f + 4567c4f commit 530f4bd
Show file tree
Hide file tree
Showing 23 changed files with 56 additions and 156 deletions.
10 changes: 1 addition & 9 deletions .github/run_browserstack_acceptance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,4 @@ export BROWSERSTACK_BUILD_ID="${GITHUB_REF_NAME} - ${GITHUB_RUN_ID}"
COMMIT_MSG_TITLE=$(git log -n 1 --pretty=format:%s)
export BROWSERSTACK_TEST_RUN_NAME=$COMMIT_MSG_TITLE

if [[ $GITHUB_REF_NAME == release/*
|| $GITHUB_REF_NAME == hotfix/*
|| $GITHUB_REF_NAME == master
|| $GITHUB_REF_NAME == support/* ]]
then
npx testcafe "browserstack:ie@11.0,browserstack:safari" --config-file ./.github/testcafe.json -q
else
npx testcafe -c 2 "browserstack:ie@11.0" --config-file ./.github/testcafe.json -q
fi
npx testcafe "browserstack:safari" --config-file ./.github/testcafe.json -q successThreshold=1
12 changes: 6 additions & 6 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
name: Headless Acceptance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- name: Download build-output artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
Expand All @@ -31,15 +31,15 @@ jobs:
name: Browserstack Acceptance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- name: Download build-output artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/acceptance_search_bar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
name: Headless Acceptance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- name: Download build-output artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 16
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm run ${{ inputs.build_script }}
- name: Create build-output artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-output
path: dist/
path: dist/
14 changes: 7 additions & 7 deletions .github/workflows/build_i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- id: set-matrix
run: |
echo ::set-output name=matrix::$(node -e 'console.log(require("./conf/i18n/constants").ALL_LANGUAGES)')
echo matrix=$(node -e 'console.log(require("./conf/i18n/constants").ALL_LANGUAGES)') >> $GITHUB_OUTPUT
build:
needs: create_language_matrix
Expand All @@ -32,11 +32,11 @@ jobs:
matrix:
language: ${{ fromJson(needs.create_language_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 16
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
Expand All @@ -47,7 +47,7 @@ jobs:
npm run size
fi
- name: Create build-output artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-output
path: dist/
path: dist/
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
deploy-aws:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Download build-output artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -50,7 +50,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Download build-output artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy_hold.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:
runs-on: ubuntu-latest
environment: production # sets in github repo with reviewer requirement protection rule
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Download build-output artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -52,7 +52,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Download build-output artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
Expand All @@ -68,4 +68,4 @@ jobs:
parent: false
destination: assets-eu.sitescdn.net/${{ inputs.bucket }}/${{ inputs.directory }}
headers: |-
cache-control: ${{ inputs.cache-control }}
cache-control: ${{ inputs.cache-control }}
6 changes: 3 additions & 3 deletions .github/workflows/extract_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
run: |
MAJOR_VERSION="$(echo "${GITHUB_REF_NAME##${{ inputs.ignore_prefix }}}" | cut -d '.' -f 1)"
echo "Major version: $MAJOR_VERSION"
echo ::set-output name=major_version::${MAJOR_VERSION}
echo major_version=${MAJOR_VERSION} >> $GITHUB_OUTPUT
MINOR_VERSION="$(echo "${GITHUB_REF_NAME##${{ inputs.ignore_prefix }}}" | cut -d '.' -f 1,2)"
echo "Minor version: $MINOR_VERSION"
echo ::set-output name=minor_version::${MINOR_VERSION}
echo minor_version=${MINOR_VERSION} >> $GITHUB_OUTPUT
FULL_VERSION="${GITHUB_REF_NAME##${{ inputs.ignore_prefix }}}"
echo "Full version: $FULL_VERSION"
echo ::set-output name=full_version::${FULL_VERSION}
echo full_version=${FULL_VERSION} >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion .github/workflows/format_branch_name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
run: |
FORMATTED_BRANCH="$(echo ${GITHUB_REF_NAME} | sed "s/\//-/g")"
echo $FORMATTED_BRANCH
echo ::set-output name=formatted_branch::${FORMATTED_BRANCH}
echo formatted_branch=${FORMATTED_BRANCH} >> $GITHUB_OUTPUT
6 changes: 3 additions & 3 deletions .github/workflows/miscellaneous_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: sudo apt-get install -qq gettext
- run: ./.github/run_translation_verification.sh
- run: ./.github/run_translation_verification.sh
6 changes: 3 additions & 3 deletions .github/workflows/should_deploy_major_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
outputs:
should_deploy_major_version: ${{ steps.vars.outputs.should_deploy_major_version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: allow for major version deployment if the next minor version from current tag does not exist
Expand All @@ -30,7 +30,7 @@ jobs:
if [ -z "$TAGS_FOR_NEXT_MINOR" ]
then
echo 'Major version should be deployed.'
echo ::set-output name=should_deploy_major_version::true
echo should_deploy_major_version=true >> $GITHUB_OUTPUT
else
echo 'Major version should not be deployed.'
fi
fi
8 changes: 4 additions & 4 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- name: Download build-output artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
- run: npm run test
- run: npm run test
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/answers-search-ui",
"version": "1.15.0",
"version": "1.15.1",
"description": "Javascript Search Programming Interface",
"main": "dist/answers-umd.js",
"repository": {
Expand Down
4 changes: 1 addition & 3 deletions tests/acceptance/acceptancesuites/facetsonload.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { RequestLogger } from 'testcafe';
import {
browserBackButton,
browserRefreshPage,
browserForwardButton,
registerIE11NoCacheHook
browserForwardButton
} from '../utils';
import { getMostRecentQueryParamsFromLogger } from '../requestUtils';
import { MockedVerticalSearchRequest } from '../fixtures/responses/vertical/search';
Expand All @@ -23,7 +22,6 @@ test('Facets work with back/forward navigation and page refresh', async t => {
url: VERTICAL_SEARCH_URL_REGEX
});
await t.addRequestHooks(logger);
await registerIE11NoCacheHook(t, VERTICAL_SEARCH_URL_REGEX);

async function getFacetsFromRequest () {
const urlParams = await getMostRecentQueryParamsFromLogger(logger);
Expand Down
11 changes: 1 addition & 10 deletions tests/acceptance/acceptancesuites/facetssuite.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import {
FACETS_PAGE,
VERTICAL_SEARCH_URL_REGEX
} from '../constants';
import { FACETS_PAGE } from '../constants';
import FacetsPage from '../pageobjects/facetspage';
import { MockedVerticalSearchRequest } from '../fixtures/responses/vertical/search';
import {
registerIE11NoCacheHook
} from '../utils';
import SearchRequestLogger from '../searchrequestlogger';
import { MockedVerticalAutoCompleteRequest } from '../fixtures/responses/vertical/autocomplete';

Expand All @@ -16,9 +10,6 @@ fixture`Facets page`
MockedVerticalSearchRequest,
MockedVerticalAutoCompleteRequest
)
.beforeEach(async t => {
await registerIE11NoCacheHook(t, VERTICAL_SEARCH_URL_REGEX);
})
.page`${FACETS_PAGE}`;

test('can select and reset a single facet', async t => {
Expand Down
8 changes: 1 addition & 7 deletions tests/acceptance/acceptancesuites/filterboxsuite.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { Selector, RequestLogger } from 'testcafe';
import {
browserBackButton,
browserRefreshPage,
browserForwardButton,
registerIE11NoCacheHook
browserForwardButton
} from '../utils';
import {
getRequestFilters,
Expand All @@ -22,17 +21,13 @@ fixture`FilterBox page`
MockedVerticalSearchRequest,
MockedVerticalAutoCompleteRequest
)
.beforeEach(async t => {
await registerIE11NoCacheHook(t, VERTICAL_SEARCH_URL_REGEX);
})
.page`${FILTERBOX_PAGE}`;

test('single option filterbox works with back/forward navigation and page refresh', async t => {
const radiusFilterLogger = RequestLogger({
url: VERTICAL_SEARCH_URL_REGEX
});
await t.addRequestHooks(radiusFilterLogger);
await registerIE11NoCacheHook(t, VERTICAL_SEARCH_URL_REGEX);
const searchComponent = FacetsPage.getSearchComponent();
await searchComponent.enterQuery('all');
await searchComponent.submitQuery();
Expand Down Expand Up @@ -75,7 +70,6 @@ test('multioption filterbox works with back/forward navigation and page refresh'
url: VERTICAL_SEARCH_URL_REGEX
});
await t.addRequestHooks(filterBoxLogger);
await registerIE11NoCacheHook(t, VERTICAL_SEARCH_URL_REGEX);
const martyFilter = {
c_puppyPreference: {
$eq: 'Marty'
Expand Down

0 comments on commit 530f4bd

Please sign in to comment.