-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #530 from PrestaShopCorp/add-chromatic
Add chromatic
- Loading branch information
Showing
7 changed files
with
86 additions
and
17 deletions.
There are no files selected for viewing
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,50 @@ | ||
# based on .github/workflows/chromatic.yml | ||
|
||
# Workflow name | ||
name: 'Chromatic' | ||
# Event for the workflow | ||
on: | ||
pull_request: | ||
types: [opened,edited,reopened,synchronize,labeled] | ||
paths: | ||
- '_dev/**' | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
NODE_VERSION: 20 | ||
|
||
# List of jobs | ||
jobs: | ||
chromatic-deployment: | ||
# Operating System | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' || (contains(github.event.pull_request.labels.*.name, 'waiting for UX') && github.event.pull_request.head.repo.full_name == 'PrestaShopCorp/ps_facebook') | ||
# Job steps | ||
steps: | ||
# 👇 Version 2 of the action | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # 👈 Required to retrieve git history | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: npm | ||
cache-dependency-path: '_dev/package-lock.json' | ||
|
||
- name: Install dependencies | ||
working-directory: ./_dev | ||
run: npm install | ||
|
||
# 👇 Adds Chromatic as a step in the workflow | ||
- name: Publish to Chromatic | ||
uses: chromaui/action@v10 | ||
# Chromatic GitHub Action options | ||
with: | ||
workingDir: ./_dev | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
# 👇 Chromatic projectToken | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
|
@@ -9,13 +9,13 @@ const contextPsFacebook = { | |
facebookBusinessManager: { | ||
name: 'La Fanchonette', | ||
email: '[email protected]', | ||
createdAt: Date.now(), | ||
createdAt: '2024-01-10T14:29:09+0100', | ||
id: '12345689', | ||
}, | ||
pixel: { | ||
name: 'La Fanchonette Test Pixel', | ||
id: '1234567890', | ||
lastActive: Date.now(), | ||
lastActive: '2024-01-10T14:29:09+0100', | ||
isActive: true, | ||
}, | ||
page: { | ||
|
@@ -25,7 +25,7 @@ const contextPsFacebook = { | |
}, | ||
ads: { | ||
name: 'La Fanchonette', | ||
createdAt: Date.now(), | ||
createdAt: '2024-01-10T14:29:09+0100', | ||
}, | ||
}; | ||
|
||
|
@@ -36,12 +36,12 @@ const contextPsFacebookOverflows = { | |
facebookBusinessManager: { | ||
name: 'La Fanchonette qui s\'étend sur la longueur', | ||
email: 'fanchonette.a.very.long.email.should.not.be.a.problem.even.if.its.too.long@ps.com', | ||
createdAt: Date.now(), | ||
createdAt: '2024-01-10T14:29:09+0100', | ||
}, | ||
pixel: { | ||
name: 'La Fanchonette qui s\'étend sur la longueur Test Pixel', | ||
id: '123456789012345678901234567890', | ||
lastActive: Date.now(), | ||
lastActive: '2024-01-10T14:29:09+0100', | ||
isActive: true, | ||
}, | ||
page: { | ||
|
@@ -51,7 +51,7 @@ const contextPsFacebookOverflows = { | |
}, | ||
ads: { | ||
name: 'La Fanchonette qui s\'étend sur la longueur', | ||
createdAt: Date.now(), | ||
createdAt: '2024-01-10T14:29:09+0100', | ||
}, | ||
}; | ||
|
||
|
@@ -62,13 +62,13 @@ const contextPsFacebookMissingPermissions = { | |
facebookBusinessManager: { | ||
name: 'La Fanchonette', | ||
email: '[email protected]', | ||
createdAt: Date.now(), | ||
createdAt: '2024-01-10T14:29:09+0100', | ||
id: '12345689', | ||
}, | ||
pixel: { | ||
name: 'La Fanchonette Test Pixel', | ||
id: '1234567890', | ||
lastActive: Date.now(), | ||
lastActive: '2024-01-10T14:29:09+0100', | ||
isActive: true, | ||
}, | ||
page: { | ||
|
@@ -78,7 +78,7 @@ const contextPsFacebookMissingPermissions = { | |
}, | ||
ads: { | ||
name: 'La Fanchonette', | ||
createdAt: Date.now(), | ||
createdAt: '2024-01-10T14:29:09+0100', | ||
}, | ||
}; | ||
|
||
|
@@ -90,7 +90,7 @@ export default { | |
const Template = (args: any, {argTypes}: any) => ({ | ||
props: Object.keys(argTypes), | ||
components: {FacebookConnected}, | ||
template: '<facebook-connected :contextPsFacebook="contextPsFacebook" :psFacebookAppId="psFacebookAppId" :externalBusinessId="externalBusinessId" @onEditClick="onEditClick" @onUninstallClick="onUninstallClick" @onPixelActivation="onPixelActivation" />', | ||
template: '<facebook-connected :contextPsFacebook="contextPsFacebook" :psFacebookAppId="psFacebookAppId" :externalBusinessId="externalBusinessId" @onEditClick="onEditClick" @onPixelActivation="onPixelActivation" />', | ||
}); | ||
export const Default:any = Template.bind({}); | ||
Default.args = { | ||
|
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