From d49faeee6b46a283712558faefc9d0787498583f Mon Sep 17 00:00:00 2001 From: Hement Chhabra Date: Sun, 8 Dec 2024 23:35:58 -0500 Subject: [PATCH 1/3] fixed upload button --- frontend/app/upload/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', From 62e3b19c92a376161d7fb2d8e98e8116886b68c9 Mon Sep 17 00:00:00 2001 From: josh Date: Sun, 8 Dec 2024 23:44:36 -0500 Subject: [PATCH 2/3] more tests stuff --- frontend/tests/selenium/website.test.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) 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 From b96f261d7c59851d80d2f53b0fe6d8fb75d8478c Mon Sep 17 00:00:00 2001 From: Ryan Jordan Date: Sun, 8 Dec 2024 23:52:08 -0500 Subject: [PATCH 3/3] updated README --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 +```