-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sprint-5' into refactor(RSS-ECOMM-5_23)/removeUnusedEle…
…ments
- Loading branch information
Showing
56 changed files
with
1,685 additions
and
277 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
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,4 +1,4 @@ | ||
module.exports = { | ||
export default { | ||
plugins: { | ||
autoprefixer: {}, | ||
}, | ||
|
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,30 @@ | ||
import type { CartCoupon } from '@/shared/types/cart.ts'; | ||
|
||
import sinon from 'sinon'; | ||
|
||
import CouponModel from '../model/CouponModel.ts'; | ||
|
||
/** | ||
* @vitest-environment jsdom | ||
*/ | ||
const coupon: CartCoupon = { | ||
coupon: { | ||
cartDiscount: '', | ||
discountCode: '', | ||
id: '', | ||
}, | ||
value: 10, | ||
}; | ||
|
||
const deleteCallback = sinon.fake(); | ||
const couponModel = new CouponModel(coupon, deleteCallback); | ||
|
||
describe('Checking CustomerApi', () => { | ||
it('should check if root is defined', () => { | ||
expect(couponModel).toBeDefined(); | ||
}); | ||
|
||
it('should check if CustomerApi is an instance of CustomerApi', () => { | ||
expect(couponModel).toBeInstanceOf(CouponModel); | ||
}); | ||
}); |
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,22 @@ | ||
import postsData from '@/shared/Posts/posts.ts'; | ||
import sinon from 'sinon'; | ||
|
||
import PostView from '../view/PostView.ts'; | ||
|
||
/** | ||
* @vitest-environment jsdom | ||
*/ | ||
|
||
const deleteCallback = sinon.fake(); | ||
const posts = postsData; | ||
const post = new PostView(posts[0], deleteCallback); | ||
|
||
describe('Checking post', () => { | ||
it('should check if post is defined', () => { | ||
expect(post).toBeDefined(); | ||
}); | ||
|
||
it('should check if post is an instance of PostView', () => { | ||
expect(post).toBeInstanceOf(PostView); | ||
}); | ||
}); |
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,20 @@ | ||
import sinon from 'sinon'; | ||
|
||
import SummaryModel from '../model/SummaryModel.ts'; | ||
|
||
/** | ||
* @vitest-environment jsdom | ||
*/ | ||
|
||
const deleteCallback = sinon.fake(); | ||
const summaryModel = new SummaryModel({ en: '', ru: '' }, deleteCallback); | ||
|
||
describe('Checking summaryModel', () => { | ||
it('should check if summaryModel is defined', () => { | ||
expect(summaryModel).toBeDefined(); | ||
}); | ||
|
||
it('should check if summaryModel is an instance of SummaryModel', () => { | ||
expect(summaryModel).toBeInstanceOf(SummaryModel); | ||
}); | ||
}); |
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
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,22 @@ | ||
import createBaseElement from '@/shared/utils/createBaseElement.ts'; | ||
|
||
import BlogPageModel from '../model/BlogPageModel.ts'; | ||
|
||
/** | ||
* @vitest-environment jsdom | ||
*/ | ||
|
||
const parent = createBaseElement({ | ||
tag: 'div', | ||
}); | ||
const blog = new BlogPageModel(parent); | ||
|
||
describe('Checking blog', () => { | ||
it('should check if post is defined', () => { | ||
expect(blog).toBeDefined(); | ||
}); | ||
|
||
it('should check if blog is an instance of BlogPageModel', () => { | ||
expect(blog).toBeInstanceOf(BlogPageModel); | ||
}); | ||
}); |
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,22 @@ | ||
import createBaseElement from '@/shared/utils/createBaseElement.ts'; | ||
|
||
import CartPageModel from '../model/CartPageModel.ts'; | ||
|
||
/** | ||
* @vitest-environment jsdom | ||
*/ | ||
|
||
const parent = createBaseElement({ | ||
tag: 'div', | ||
}); | ||
const cart = new CartPageModel(parent); | ||
|
||
describe('Checking cart', () => { | ||
it('should check if post is defined', () => { | ||
expect(cart).toBeDefined(); | ||
}); | ||
|
||
it('should check if cart is an instance of CartPageModel', () => { | ||
expect(cart).toBeInstanceOf(CartPageModel); | ||
}); | ||
}); |
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.