Skip to content

Commit

Permalink
Nov7PlaywrightChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaiahA21 committed Nov 14, 2024
1 parent ae15d80 commit af7e987
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/playwright_tests_on_vercel.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
on:
deployment_status:
name: Playwright

jobs:
run-end2endTests:
Expand Down
14 changes: 6 additions & 8 deletions content-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This guide documents how and when to update different content on the Tech Start
- [Resources Page](#resources-page)
- [Guides](#guides)
- [Playwright Tests](#playwright-tests)
- [Installing Plawright](#installing-plawright)
- [Installing Playwright](#installing-playwright)
- [How to run tests](#how-to-run-the-tests)
- [To view test results](#to-view-the-test-results)

Expand Down Expand Up @@ -223,15 +223,13 @@ Example:
/>
```
## Plawright Tests
## Playwright Tests
<<<<<<< HEAD
### Installing Playwright
### Installing Plawright
Here are 2 helpful links to get you started with Plawright
[Plawright Getting Started ](https://playwright.dev/docs/intro) Or [Getting Started with Playwright and VS Code](https://www.youtube.com/watch?v=Xz6lhEzgI5I).
The second link is a video tutorial that will guide you through the process of setting up Plawright with VS Code, writing tests, and running them using the IDE.
Here are 2 helpful links to get you started with Playwright
[Playwright Getting Started ](https://playwright.dev/docs/intro) Or [Getting Started with Playwright and VS Code](https://www.youtube.com/watch?v=Xz6lhEzgI5I).
The second link is a video tutorial that will guide you through the process of setting up Playwright with VS Code, writing tests, and running them using the IDE.
### How to run the tests using the terminal
Expand Down
2 changes: 0 additions & 2 deletions global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import path from 'path';
*/

async function globalSetupFunc() {
// import dotenv from 'dotenv';
// read from ".env.testEnv file"
dotenv.config({ path: path.resolve(__dirname, '.env.local') });
console.log("Running tests on environment:", process.env.STAGING === '1' ? "Local" : "Production");
}
Expand Down
7 changes: 1 addition & 6 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,5 @@ export default defineConfig({
// },
],

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },

});
6 changes: 3 additions & 3 deletions src/components/TeamSection/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const Profile = (props: ProfileProps) => {
const preventDragHandler = (e: any) => e.preventDefault();

// memoize the test data id so its not recalcaulated on every render but only when the member name changes
const testDataId = useMemo( () => {
return `profile-image-${props.member.name.replace(/\s/g, "-").toLowerCase()}`
}, [props.member.name]);
const testDataId = useMemo(() =>
`profile-image-${props.member.name.replace(/\s/g, "-").toLowerCase()}`,
[props.member.name]);

return (
<S.ProfileDiv
Expand Down
1 change: 0 additions & 1 deletion tests/project/ProjectPage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { test, expect } from '@playwright/test';
<<<<<<< HEAD
test('Apply Now btn nagivates to the apply now page', async ({ page, baseURL }) => {
await page.goto(`${baseURL}/projects`);
// await page.getByText('Apply Now').click();
const applyButton = page.getByTestId('apply_now_button');
applyButton.click();
await expect(page).toHaveURL(`${baseURL}/apply`);
Expand Down

0 comments on commit af7e987

Please sign in to comment.