Skip to content

Commit e4ab34e

Browse files
feat: Release 7 - 28 December 2022 (#111)
* chore(workflow): add github workflow pipeline * chore(workflow): update git workflow deployment config * chores: add release notes for release 3 * feat: update forget password validation (#110) * [REFACTOR] update error password validation on forget password * [CHORES] add tech docs and youtube link * chores: add release notes 7
1 parent 70e8fd8 commit e4ab34e

5 files changed

Lines changed: 55 additions & 12 deletions

File tree

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,10 @@ For detailed explanation on how things work, checkout the [CLI Readme](https://g
6767
- [Docker Container](https://github.com/MonAPI-xyz/MonAPI-Frontend/blob/staging/docs/docker.md)
6868

6969
## Latest Release Notes
70-
Version: v1.0.0<br>
71-
Date: 12th December 2022
72-
1. Status Page Integration
73-
2. Email register verification
74-
3. Create new category directly when create API Monitor
75-
4. Partial Assertions Text
76-
5. Release 1st version of MonAPI
70+
Version: v1.0.1<br>
71+
Date: 28th December 2022
72+
1. Fix bug password validation on forget password
73+
2. Update pagerduty email configuration title
7774

7875
Full release notes can be found in [Release Notes](https://github.com/MonAPI-xyz/MonAPI-Frontend/blob/staging/docs/release_notes.md)
7976

@@ -84,6 +81,10 @@ Full release notes can be found in [Release Notes](https://github.com/MonAPI-xyz
8481

8582
📝 [User Manual - https://docs.monapi.xyz](https://docs.monapi.xyz)
8683

84+
📝 [Technical Documentation - https://docs.monapi.xyz/monapi-tech-documentation/](https://docs.monapi.xyz/monapi-tech-documentation/)
85+
86+
📺 [Youtube - https://www.youtube.com/@monapi](https://www.youtube.com/@monapi)
87+
8788
## Our Teams
8889
- Lucky Susanto
8990
- Ferdi Fadillah

docs/release_notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@ Date: 12th December 2022
4848
3. Create new category directly when create API Monitor
4949
4. Partial Assertions Text
5050
5. Release 1st version of MonAPI
51+
52+
### Release 7
53+
Version: v1.0.1<br>
54+
Date: 28th December 2022
55+
1. Fix bug password validation on forget password
56+
2. Update pagerduty email configuration title

src/routes/configuration/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ const Configuration = () => {
308308
<Box w='40vw'>
309309
<TextInput
310310
id='pagerduty_default_from_email'
311-
title='Default From Email'
311+
title='Pagerduty Account Email Address'
312312
placeholder='Insert bot pagerduty email'
313313
errors={errors}
314314
register={register}

src/routes/forgetPasswordToken/index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ const ForgetPasswordToken = ()=>{
3535
setIsLoading(false)
3636
})
3737
.catch((error) => {
38-
setErrl(error.response.data.error)
38+
if (error.response.data['password']) {
39+
setErrl(error.response.data.password)
40+
} else if (error.response.data['error']) {
41+
setErrl([error.response.data.error])
42+
}
3943
setIsLoading(false)
4044
});
4145

@@ -72,8 +76,12 @@ const ForgetPasswordToken = ()=>{
7276

7377
{errl.length != 0 && (
7478
<div>
75-
<Box mb='20px' />
76-
<Text color='red'>Error: {errl}</Text>
79+
<Text color='red'>Error:</Text>
80+
<ul data-testid='errl'>
81+
{errl.map((e,i) => (
82+
<li key={i}>{e}</li>
83+
))}
84+
</ul>
7785
</div>
7886
)}
7987
<Box mb='20px' />

tests/routes/forgetPasswordToken/forgetPasswordToken.test.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,35 @@ describe('Test Change Password', () => {
5959
userEvent.click(submit)
6060

6161
await waitFor(() => {
62-
expect(screen.getByText('Error: Please choose password that different from your current password')).toBeDefined()
62+
expect(screen.getByText('Please choose password that different from your current password')).toBeDefined()
63+
})
64+
})
65+
66+
test('try to change password invalid password failed', async () => {
67+
deleteUserToken()
68+
axios.post.mockImplementation(() => Promise.reject({
69+
response: {
70+
data: {
71+
password : ["The password must contain at least 1 uppercase letter, A-Z."]
72+
}
73+
}
74+
}))
75+
render(<App />);
76+
route('/forget_password?key=abcdef')
77+
78+
await waitFor(() => {
79+
expect(screen.getByText('Forget Password')).toBeDefined()
80+
})
81+
82+
const emailField = await screen.findByPlaceholderText('New Password');
83+
const submit = screen.getByText('Change Password');
84+
85+
86+
userEvent.type(emailField, 'tes4@gmail.com')
87+
userEvent.click(submit)
88+
89+
await waitFor(() => {
90+
expect(screen.getByText('The password must contain at least 1 uppercase letter, A-Z.')).toBeDefined()
6391
})
6492
})
6593

0 commit comments

Comments
 (0)