-
Notifications
You must be signed in to change notification settings - Fork 2
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 #280 from thinc-org/beta
Deploy to Production (14th Dec 2021)
- Loading branch information
Showing
141 changed files
with
5,461 additions
and
437 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 |
---|---|---|
@@ -1,2 +1 @@ | ||
.next | ||
src/lib/* | ||
.next |
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,13 @@ | ||
/* eslint-disable */ | ||
const Environment = require('jest-environment-jsdom') | ||
|
||
module.exports = class CustomTestEnvironment extends Environment { | ||
async setup() { | ||
await super.setup() | ||
if (typeof this.global.TextEncoder === 'undefined') { | ||
const { TextEncoder, TextDecoder } = require('util') | ||
this.global.TextEncoder = TextEncoder | ||
this.global.TextDecoder = TextDecoder | ||
} | ||
} | ||
} |
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,8 +1,8 @@ | ||
// DOM rendering | ||
import '@testing-library/jest-dom' | ||
|
||
// Shallow rendering | ||
import { configure } from 'enzyme'; | ||
import { configure } from 'enzyme' | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const Adapter = require('enzyme-adapter-react-16') | ||
configure({ adapter: new Adapter() }); | ||
const Adapter = require('@wojtekmaj/enzyme-adapter-react-17') | ||
configure({ adapter: new Adapter() }) |
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,112 @@ | ||
import { Review } from '@/common/types/reviews' | ||
|
||
export const mockReviews: Review[] = [ | ||
{ | ||
_id: '61ab376cea2d0aeded10dc2b', | ||
rating: 8, | ||
courseNo: '0201109', | ||
semester: '2', | ||
academicYear: '2564', | ||
studyProgram: 'S', | ||
content: 'เหนื่อยากเลยค่าแงงงงง', | ||
likeCount: 0, | ||
dislikeCount: 0, | ||
myInteraction: null, | ||
status: 'APPROVED' as Review['status'], | ||
isOwner: false, | ||
}, | ||
{ | ||
_id: '61ab389bea2d0aeded10dc6a', | ||
rating: 9, | ||
courseNo: '0201109', | ||
semester: '1', | ||
academicYear: '2563', | ||
studyProgram: 'S', | ||
content: 'อยากนอน', | ||
likeCount: 0, | ||
dislikeCount: 0, | ||
myInteraction: null, | ||
status: 'APPROVED' as Review['status'], | ||
isOwner: false, | ||
}, | ||
{ | ||
_id: '61ab39d457ff6cbfc0e4b809', | ||
rating: 7, | ||
courseNo: '0201109', | ||
semester: '3', | ||
academicYear: '2563', | ||
studyProgram: 'S', | ||
content: | ||
'วิชานี้เกี่ยวกับแนวคิดและพัฒนาการของการบูรณาการยุโรป ตั้งแต่ช่วงสงครามโลกครั้งที่ 2 จนถึงปัจจุบัน ปัญหาความขัดแย้งต่างๆ ที่ส่งผลต่อการบูรณาการ ความร่วมมือ ผลกระทบและกลยุทธ์ด้านวัฒนธรรม การเมือง เศรษฐกิจ สังคม วิทยาศาสตร์และเทคโนโลยี ภายในกลุ่มสหภาพยุโรป และระหว่างสหภาพยุโรปกับไทย ประเทศในกลุ่มอาเซียนและเอเชีย \nสนุกดีนะ', | ||
likeCount: 0, | ||
dislikeCount: 0, | ||
myInteraction: null, | ||
status: 'APPROVED' as Review['status'], | ||
isOwner: false, | ||
}, | ||
{ | ||
_id: '61ab5096811ca6c9769f5bed', | ||
rating: 10, | ||
courseNo: '0201109', | ||
semester: '2', | ||
academicYear: '2564', | ||
studyProgram: 'S', | ||
content: 'ดีครับ อาจารย์น่ารักมาก ๆ ', | ||
likeCount: 0, | ||
dislikeCount: 0, | ||
myInteraction: null, | ||
status: 'APPROVED' as Review['status'], | ||
isOwner: false, | ||
}, | ||
] | ||
|
||
export const mockMyReviews: Review[] = [ | ||
{ | ||
_id: '61ab376cea2d0aeded10dc2b', | ||
rating: 8, | ||
courseNo: '0201109', | ||
semester: '2', | ||
academicYear: '2564', | ||
studyProgram: 'S', | ||
content: 'เหนื่อยากเลยค่าแงงงงง', | ||
likeCount: 0, | ||
dislikeCount: 0, | ||
myInteraction: null, | ||
status: 'APPROVED' as Review['status'], | ||
isOwner: true, | ||
}, | ||
] | ||
|
||
export const mockMyPendingReviews: Review[] = [ | ||
{ | ||
_id: '61ab59632d5b971a45ca3238', | ||
rating: 3, | ||
courseNo: '0201109', | ||
semester: '2', | ||
academicYear: '2564', | ||
studyProgram: 'S', | ||
content: 'เขียนดี ๆ แล้ว อิอิ', | ||
likeCount: 1, | ||
dislikeCount: 0, | ||
myInteraction: 'L' as Review['myInteraction'], | ||
status: 'PENDING' as Review['status'], | ||
isOwner: true, | ||
}, | ||
] | ||
|
||
export const mockMyRejectedReviews: Review[] = [ | ||
{ | ||
_id: '61ab59632d5b971a45ca3238', | ||
rating: 3, | ||
courseNo: '0201109', | ||
semester: '2', | ||
academicYear: '2564', | ||
studyProgram: 'S', | ||
content: 'เขียนดี ๆ แล้ว อิอิ', | ||
likeCount: 1, | ||
dislikeCount: 0, | ||
myInteraction: 'L' as Review['myInteraction'], | ||
status: 'REJECTED' as Review['status'], | ||
isOwner: true, | ||
}, | ||
] |
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.