Skip to content

Commit

Permalink
Merge pull request #114 from rtjord/dev
Browse files Browse the repository at this point in the history
Fix frontend ada compliance
  • Loading branch information
rtjord authored Dec 9, 2024
2 parents 3d5d293 + 8e1546d commit 4c9eb78
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

2 changes: 1 addition & 1 deletion frontend/app/upload/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default function UploadFile() {
type="submit"
style={{
padding: '10px 20px',
backgroundColor: '#007bff',
backgroundColor: '#006ee5',
color: 'white',
border: 'none',
borderRadius: '4px',
Expand Down
20 changes: 8 additions & 12 deletions frontend/tests/selenium/website.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c9eb78

Please sign in to comment.