diff --git a/README.md b/README.md index f8e6e70..3f720bf 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,9 @@ To build the frontend application, run the following command from the `frontend` cd backend npm run test:e2e ``` -- Ensure the backend endpoints are functional using tools like Postman or curl. -- Test the frontend by accessing the deployed Amplify URL and interacting with the interface. +- Test the frontend by running these commands: +```sh + cd frontend + npm test +``` diff --git a/frontend/app/upload/page.tsx b/frontend/app/upload/page.tsx index 3579d11..06d348f 100644 --- a/frontend/app/upload/page.tsx +++ b/frontend/app/upload/page.tsx @@ -191,7 +191,7 @@ export default function UploadFile() { type="submit" style={{ padding: '10px 20px', - backgroundColor: '#007bff', + backgroundColor: '#006ee5', color: 'white', border: 'none', borderRadius: '4px', diff --git a/frontend/tests/selenium/website.test.ts b/frontend/tests/selenium/website.test.ts index 6cea77e..6ad1af1 100644 --- a/frontend/tests/selenium/website.test.ts +++ b/frontend/tests/selenium/website.test.ts @@ -35,21 +35,17 @@ describe('Team Five Packages Website', function () { expect(currentUrl).to.include('/packages'); }); - it('should search for a package and display results', async function () { + it('should navigate to the Upload page', async function () { await driver.get('https://www.teamfivepackages.com'); - // Wait for the search box to be visible - const searchBox = await driver.wait(until.elementLocated(By.name('Enter package name, ID, or search pattern...')), 10000); - await searchBox.sendKeys('debug'); - - // Wait for the search button and click it - const searchButton = await driver.wait(until.elementLocated(By.linkText('Search by Name')), 10000); - await searchButton.click(); + // Wait for the "Packages" link to be visible + const packagesLink = await driver.wait(until.elementLocated(By.linkText('Upload Package')), 10000); + await packagesLink.click(); - // Wait for the search results to be displayed - await driver.wait(until.elementsLocated(By.css('.package-result')), 10000); + // Wait for the URL to change + await driver.wait(until.urlContains('/upload'), 10000); - const results = await driver.findElements(By.css('.package-result')); - expect(results.length).to.be.greaterThan(0); // Ensure results are displayed + const currentUrl = await driver.getCurrentUrl(); + expect(currentUrl).to.include('/upload'); }); // Quit WebDriver after tests