From 7786c14dd8e5cf1c3930f0cd9346f5613a5d9726 Mon Sep 17 00:00:00 2001
From: Dave <43282177+helloitsdave@users.noreply.github.com>
Date: Sat, 15 Jun 2024 14:17:19 +0100
Subject: [PATCH] [frontend] feat: Adding github info (#54)
---
frontend/public/github-mark.svg | 1 +
frontend/src/App.css | 28 ++++++++++++++----
frontend/src/App.test.tsx | 5 ++--
.../src/components/RegistrationForm.test.tsx | 10 +++----
.../src/components/RegistrationLink.test.tsx | 14 +++++++--
frontend/src/components/RegistrationLink.tsx | 29 +++++++++++++++----
6 files changed, 66 insertions(+), 21 deletions(-)
create mode 100644 frontend/public/github-mark.svg
diff --git a/frontend/public/github-mark.svg b/frontend/public/github-mark.svg
new file mode 100644
index 00000000..37fa923d
--- /dev/null
+++ b/frontend/public/github-mark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/frontend/src/App.css b/frontend/src/App.css
index 2165c093..d57d2476 100644
--- a/frontend/src/App.css
+++ b/frontend/src/App.css
@@ -78,7 +78,7 @@ body::before {
width: 260px;
height: 350px;
padding: 10px;
- backdrop-filter: blur(5px);
+ backdrop-filter: blur(50px);
}
@@ -207,14 +207,32 @@ textarea {
flex-direction: column;
align-items: center;
justify-content: center;
- margin: 0px 20px 20px 20px;
padding: 10px;
width: 300px;
- height: 200px;
+ height: 320px;
border-radius: 20px;
border: 2px solid white;
margin: 10px;
- backdrop-filter: blur(10px);
+ backdrop-filter: blur(80px);
+ text-align: center;
+}
+
+.registration-container {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.github-info-container {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin: 20px;
+}
+
+.github-image {
+ width: 40px;
}
.registration-link {
@@ -273,7 +291,7 @@ textarea {
border-radius: 20px;
border: 2px solid white;
padding: 30px;
- backdrop-filter: blur(10px);
+ backdrop-filter: blur(80px);
}
.edit-buttons {
diff --git a/frontend/src/App.test.tsx b/frontend/src/App.test.tsx
index cdb56678..39f04971 100644
--- a/frontend/src/App.test.tsx
+++ b/frontend/src/App.test.tsx
@@ -53,10 +53,9 @@ describe('App', () => {
expect(localStorage.getItem('token')).toBeNull();
- waitFor(() => {
+ await waitFor(() => {
expect(screen.queryByTestId('note-app')).not.toBeInTheDocument();
- }
- );
+ });
expect(await screen.findByText('Login')).toBeInTheDocument();
});
});
diff --git a/frontend/src/components/RegistrationForm.test.tsx b/frontend/src/components/RegistrationForm.test.tsx
index 8cf87758..233177f1 100644
--- a/frontend/src/components/RegistrationForm.test.tsx
+++ b/frontend/src/components/RegistrationForm.test.tsx
@@ -21,7 +21,7 @@ describe('RegistrationForm', () => {
userEvent.type(screen.getByPlaceholderText('Confirm Password'), 'passwor');
userEvent.click(screen.getByText('Register'));
expect(
- await screen.findByText('Error: Passwords do not match')
+ await screen.findByText('Error: Passwords do not match'),
).toBeInTheDocument();
});
it('should throw error message on failed registration', async () => {
@@ -34,7 +34,7 @@ describe('RegistrationForm', () => {
await waitFor(() => {
expect(
- screen.getByText('Error: An error occurred. Please retry')
+ screen.getByText('Error: An error occurred. Please retry'),
).toBeInTheDocument();
});
});
@@ -42,18 +42,18 @@ describe('RegistrationForm', () => {
render(