Skip to content

Commit

Permalink
fix: solve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bedon committed Oct 1, 2024
2 parents d1f80c2 + 1e3f891 commit 1fa0046
Show file tree
Hide file tree
Showing 53 changed files with 841 additions and 658 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lighthouse-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
- name: Run Lighthouse CI
run: |
npm install -g @lhci/cli@0.9.x
lhci autorun --config=./lighthouserc-prod.js
lhci autorun --config=./lighthouserc-prod.cjs
lhci upload --target=filesystem --outputDir=./lhci
node format-lh-for-s3.js
node format-lh-for-s3.cjs
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
Expand Down
3 changes: 3 additions & 0 deletions .storybook/mock-data/loan-data-mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default [
"status": "fundraising",
"name": "Alan",
"borrowerCount": 1,
"gender": "female",
"geocode": {
"city": "Kochkor district, Naryn region",
"state": "Naryn Region",
Expand Down Expand Up @@ -77,6 +78,7 @@ export default [
"status": "fundraising",
"name": "Alan",
"borrowerCount": 1,
"gender": "female",
"geocode": {
"city": "Lyantonde",
"state": "Central Region",
Expand Down Expand Up @@ -143,6 +145,7 @@ export default [
"status": "fundraising",
"name": "Alan",
"borrowerCount": 1,
"gender": "female",
"geocode": {
"city": "Elbasan",
"state": "Elbasan County",
Expand Down
1 change: 1 addition & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ setup((app) => {
// Mock the analytics Vue plugin
app.directive('kv-track-event', () => { });
app.config.globalProperties.$kvTrackEvent = () => { };
app.config.globalProperties.$kvTrackSelfDescribingEvent = () => { };

// provide global application config
app.config.globalProperties.$appConfig = config.app;
Expand Down
41 changes: 39 additions & 2 deletions .storybook/stories/BorrowerProfile.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,41 @@ const queryResult = {
data: {
lend: {
loan: mockLoans[0]
},
fundraisingLoans: {
values: [
{
id: 2413188
},
{
id: 2411288
},
{
id: 2406410
},
{
id: 2406459
},
{
id: 2406956
},
{
id: 2408858
}
]
},
ml: {
relatedLoansByTopics: [
{
values: [
mockLoans[0],
mockLoans[0],
mockLoans[0],
mockLoans[0],
mockLoans[0]
]
}
]
}
}
};
Expand Down Expand Up @@ -48,13 +83,15 @@ export const Default = () => ({
template: `<borrower-profile />`,
});

export const Funded = () => ({
export const Funded = (_, { argTypes }) => ({
props: Object.keys(argTypes),
components: { FundedBorrowerProfile },
parameters: {
layout: 'fullscreen',
},
mixins: [apolloStoryMixin({ queryResult }), cookieStoreStoryMixin(), kvAuth0StoryMixin],
template: `<funded-borrower-profile />`,
setup() { return { loan: mockLoans[0], hash: mockLoans[0].image.hash }; },
template: `<funded-borrower-profile :loan="loan" :hash="hash" />`,
});

export const PrivateFundraisingPeriod = () => ({
Expand Down
5 changes: 5 additions & 0 deletions .storybook/stories/BorrowerStatusCard.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ const story = (args = {}) => {
components: { BorrowerStatusCard },
mixins: [apolloStoryMixin({ queryResult }), cookieStoreStoryMixin()],
setup() { return { args }; },
provide: {
$kvTrackEvent: () => Promise.resolve({
fn: () => ({}),
}),
},
template: `
<borrower-status-card v-bind="args" />
`,
Expand Down
60 changes: 31 additions & 29 deletions .storybook/stories/KivaClassicSingleCategoryCarousel.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,40 @@ import apolloStoryMixin from '../mixins/apollo-story-mixin';
import cookieStoreStoryMixin from '../mixins/cookie-store-story-mixin';
import KvGrid from '@kiva/kv-components/vue/KvGrid';
import KvPageContainer from '@kiva/kv-components/vue/KvPageContainer';
import loanData from '../mock-data/loan-data-mock';

const queryResult = {
"data": {
"lend": {
"loanChannelsById": [
data: {
lend: {
loanChannelsById: [
{
"id": 108,
"name": "Recommended by lenders",
"url": "https://www.dev.kiva.org/lend/recommended-by-lenders",
"description": "Although nothing is guaranteed, loans such as these are favored by experienced lenders because they are the most likely to yield a repayment in one month and to be entirely repaid within a year.",
"loans": {
"values": [
{
"id": 2413188
},
{
"id": 2411288
},
{
"id": 2406410
},
{
"id": 2406459
},
{
"id": 2406956
},
{
"id": 2408858
}
]
}
id: 108,
name: "Recommended by lenders",
url: "https://www.dev.kiva.org/lend/recommended-by-lenders",
description: "Although nothing is guaranteed, loans such as these are favored by experienced lenders because they are the most likely to yield a repayment in one month and to be entirely repaid within a year.",
}
],
loan: loanData[0],
},
fundraisingLoans: {
values: [
{
id: 2413188
},
{
id: 2411288
},
{
id: 2406410
},
{
id: 2406459
},
{
id: 2406956
},
{
id: 2408858
}
]
}
Expand Down
11 changes: 10 additions & 1 deletion .storybook/stories/KivaMultiCategoryGrid.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ import apolloStoryMixin from '../mixins/apollo-story-mixin';
import cookieStoreStoryMixin from '../mixins/cookie-store-story-mixin';
import LoanCategorySelectorHomeExp from '#src/components/LoanCollections/HomeExp/LoanCategorySelectorHomeExp';
import KvGrid from '@kiva/kv-components/vue/KvGrid';
import loanData from '../mock-data/loan-data-mock';

const queryResult = {
data: {
lend: {
loan: loanData[0],
},
}
};

const args = {
showAllButton: true,
Expand Down Expand Up @@ -49,7 +58,7 @@ export default {
export const DefaultGrid = (_, { argTypes }) => ({
props: Object.keys(argTypes),
components: { LoanCategorySelectorHomeExp, KivaLoanCardCategory, KvGrid },
mixins: [apolloStoryMixin(), cookieStoreStoryMixin()],
mixins: [apolloStoryMixin({ queryResult }), cookieStoreStoryMixin()],
methods: {
handleCategoryClick(payload) {
this.selectedChannel = this.combinedLoanChannelData.find(
Expand Down
Loading

0 comments on commit 1fa0046

Please sign in to comment.