diff --git a/cypress/e2e/login.cy.js b/cypress/e2e/login.cy.js
index c2fbb3a..f384c35 100644
--- a/cypress/e2e/login.cy.js
+++ b/cypress/e2e/login.cy.js
@@ -1,2 +1,16 @@
describe('Login Component', () => {
+ //changed this from "Logs in Succesfully" to add some light hearted humor hehe.
+ it("I'm getting the job lesgoo",() => {
+ cy.visit('http://localhost:3000/login')
+ cy.get('input[name="name"]')//get the name input field
+ cy.get('input[name="password"]')//get the password input field
+ cy.get('input[name="name"]').type('testuser')
+ cy.get('input[name="password"]').type('testpassword')// fill both up with user and pass
+ cy.get('button[type="submit"]').click()//click the login button
+ cy.get('.welcome-container').should('exist')//welcome page should be rendered, since this is the class of the main container
+ //didn't really go for getting the url since after doing heavy editting, I figured the URL doesn't change
+ //and that there's no explicit paths set for each of the pages
+
+ //this should be enough for the entire flow.
+ })
})
\ No newline at end of file
diff --git "a/public/Screenshot 2025-05-19 at 4.44.46\342\200\257PM.png" "b/public/Screenshot 2025-05-19 at 4.44.46\342\200\257PM.png"
new file mode 100644
index 0000000..73aff6f
Binary files /dev/null and "b/public/Screenshot 2025-05-19 at 4.44.46\342\200\257PM.png" differ
diff --git a/src/App.js b/src/App.js
index c383c91..f58529d 100644
--- a/src/App.js
+++ b/src/App.js
@@ -10,15 +10,34 @@ function App() {
const handleLogin = (formData) => {
// In a real app, you would validate credentials here
setIsLoggedIn(true);
- setUserName(formData.name);
+ setUserName(formData.name);//this wont be called since onLogin is never called in the first place
};
const handleLogout = () => {
setIsLoggedIn(false);
- setUserName('');
+ setUserName(''); //nothing to change or worry about here
};
+ /*
+ The issue with this app was that the Login page, and the main page (