-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Changes - Added compatibility with PagesJS v1 (#400, #402, #404) ### Fixes - Upgraded `@babel/traverse` version to address a vulnerability in the package (#409)
- Loading branch information
Showing
344 changed files
with
23,675 additions
and
38,433 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Update Snapshots | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
update_snapshots: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.BOT_REPO_SCOPED_TOKEN }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm run build | ||
- run: ./tests/scripts/start-storybook.sh | ||
env: | ||
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }} | ||
- run: npm run update-snapshots | ||
- name: Push changes | ||
id: push-changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: "Update snapshots" | ||
add: ".storybook/snapshots/__snapshots__" | ||
push: true | ||
pull: --rebase --autostash | ||
default_author: github_actions | ||
- name: Fail job if push changes | ||
if: steps.push-changes.outputs.pushed == 'true' | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('Snapshot updates were made. A new commit with new snapshots was pushed.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ node_modules/ | |
|
||
# production | ||
lib/ | ||
dist/ | ||
|
||
# testing | ||
/coverage | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import type { StorybookConfig } from '@storybook/react-webpack5'; | ||
|
||
const config: StorybookConfig = { | ||
stories: [ | ||
'../tests/**/*.stories.tsx' | ||
], | ||
features: { | ||
storyStoreV7: false, | ||
}, | ||
addons: [ | ||
'@etchteam/storybook-addon-status', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
'@storybook/addon-a11y', | ||
{ | ||
name: '@storybook/addon-coverage', | ||
options: { | ||
istanbul: { | ||
include: ['src/components/**'] | ||
} | ||
} | ||
}, | ||
], | ||
|
||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {} | ||
}, | ||
|
||
staticDirs: ['./public'], | ||
|
||
webpackFinal: async (config) => ({ | ||
...config, | ||
resolve: { | ||
...config.resolve, | ||
alias: { | ||
...config.resolve?.alias, | ||
'./SearchCore': require.resolve('../tests/__fixtures__/core/SearchCore.ts'), | ||
'../utils/location-operations': require.resolve('../tests/__fixtures__/utils/location-operations.ts') | ||
}, | ||
} | ||
}), | ||
|
||
env: (config) => { | ||
const mapboxApiKey = process.env.MAPBOX_API_KEY || process.env.REACT_APP_MAPBOX_API_KEY; | ||
return { | ||
...config, | ||
...(mapboxApiKey && { REACT_APP_MAPBOX_API_KEY: mapboxApiKey }) | ||
}; | ||
}, | ||
|
||
docs: { | ||
autodocs: true | ||
} | ||
}; | ||
|
||
export default config; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { addons } from '@storybook/addons'; | ||
|
||
addons.setConfig({ | ||
theme: require('./yextTheme.ts') | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+23.5 KB
...ook/snapshots/__snapshots__/alternativeverticals--display-all-on-no-results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.9 KB
.storybook/snapshots/__snapshots__/directanswer--address-field-value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.5 KB
.storybook/snapshots/__snapshots__/directanswer--complex-url-field-value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27.1 KB
.storybook/snapshots/__snapshots__/directanswer--list-field-value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.3 KB
.storybook/snapshots/__snapshots__/directanswer--number-field-value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.9 KB
.storybook/snapshots/__snapshots__/directanswer--plain-text-featured-snippet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.7 KB
.storybook/snapshots/__snapshots__/directanswer--string-field-value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.68 KB
.storybook/snapshots/__snapshots__/dropdown--always-select-expanded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.6 KB
.storybook/snapshots/__snapshots__/filtersearch--dropdown-sectioned.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.7 KB
.storybook/snapshots/__snapshots__/filtersearch--dropdown-unsectioned.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+7.65 KB
.storybook/snapshots/__snapshots__/pagination--on-mid-page-with-ellipses.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+7.41 KB
.storybook/snapshots/__snapshots__/pagination--paginate-all-on-no-results.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+11.9 KB
.storybook/snapshots/__snapshots__/rangeinput--disabled-force-display-tooltip.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+8.54 KB
.storybook/snapshots/__snapshots__/resultscount--pagination-range.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+30.2 KB
.storybook/snapshots/__snapshots__/searchbar--dropdown-expanded-vertical-links.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+17.4 KB
.storybook/snapshots/__snapshots__/standardfacets--no-option-counts.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+19.7 KB
.storybook/snapshots/__snapshots__/standardfacets--show-more-limit-clicked.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import baseConfig from '../main'; | ||
import type { StorybookConfig } from '@storybook/react-webpack5'; | ||
|
||
const config: StorybookConfig = { | ||
...baseConfig, | ||
stories: baseConfig.stories.map((glob) => `../${glob}`), | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Page } from 'playwright-core'; | ||
import { TestRunnerConfig, TestContext } from '@storybook/test-runner'; | ||
import { toMatchImageSnapshot } from 'jest-image-snapshot'; | ||
|
||
const customSnapshotsDir = `${process.cwd()}/.storybook/snapshots/__snapshots__`; | ||
|
||
/** | ||
* See https://storybook.js.org/docs/react/writing-tests/test-runner#test-hook-api-experimental | ||
* to learn more about the test-runner hooks API. | ||
*/ | ||
const renderFunctions: TestRunnerConfig = { | ||
setup() { | ||
expect.extend({ toMatchImageSnapshot }); | ||
}, | ||
async postVisit(page: Page, context: TestContext) { | ||
if (context.id === 'locationbias--loading') { | ||
return; | ||
} | ||
|
||
const isMapboxMapStory = context.id.startsWith('mapboxmap--'); | ||
if (isMapboxMapStory) { | ||
await page.waitForTimeout(7500); | ||
} | ||
|
||
const image = await page.screenshot(); | ||
expect(image).toMatchImageSnapshot({ | ||
customSnapshotsDir, | ||
customSnapshotIdentifier: context.id, | ||
failureThreshold: context.id === 'geolocation--loading' || isMapboxMapStory | ||
? 0.005 | ||
: 0, | ||
failureThresholdType: 'percent' | ||
}); | ||
}, | ||
}; | ||
|
||
export default renderFunctions; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import baseConfig from '../main'; | ||
import type { StorybookConfig } from '@storybook/react-webpack5'; | ||
|
||
const config: StorybookConfig = { | ||
...baseConfig, | ||
stories: baseConfig.stories.map((glob) => `../${glob}`), | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { axeOptionsConfig } from 'axe-playwright'; | ||
import { RunOnly } from 'axe-core'; | ||
|
||
export const runOnly: axeOptionsConfig['axeOptions']['runOnly'] = { | ||
export const runOnly: RunOnly = { | ||
type: 'tag', | ||
values: ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.