Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #254

Merged
merged 10 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/e2e-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Tests: E2E"
on: [pull_request]
jobs:
tests_e2e:
name: Run end-to-end tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: install dependencies
run: npm ci
- name: install playwright browsers
run: npx playwright install --with-deps
- name: npm run test:e2e
run: npm run test:e2e
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ yarn-error.log*

# vercel
.vercel

## IDE's
.idea/

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions .idea/checkstyle-idea.xml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/pull-request-community.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ You can add / update your personal profile by creating a Pull Request to this re
and anything that you are passionate about. Are you an architect? Do you speak Chinese? Studied amusement park
and roller coaster engineering? This is the place to brag!

2. By default, we'll use your GitHub photo. There's currently an [open issue](https://github.com/urish/pull-request-community/issues/78) to allow custom profile photos.
2. By default, we'll use your GitHub photo. If you don't have a GitHub profile photo,
or want to use a different one, add it under [public/images/people](public/images/people) in jpeg format.
Use your GitHub username for the image, e.g. `MichalPorag.jpg`.

Then, add `"customImage": true` to your profile JSON that you created in the previous step.

3. Create a pull request with new files.

Expand Down
4 changes: 3 additions & 1 deletion components/description/Description.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ const Description = ({ descriptionOutput, descriptionHeight }) => {
const myRef = useRef(null);
const [height, setHeight] = useState(0);

descriptionHeight(height);
useEffect(() => {
descriptionHeight(height);
}, [descriptionHeight, height]);

useEffect(() => {
const handleResize = () => {
Expand Down
3 changes: 3 additions & 0 deletions components/label/label.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
&[role="Admin"] {
background: cornflowerblue;
}
&[role="Former admin"] {
background: cadetblue;
}

@media screen and (max-width: 600px) {
font-size: 10px;
Expand Down
8 changes: 8 additions & 0 deletions e2e/home.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { test, expect } from '@playwright/test'

test('page should have title of "קהילת Pull Request"', async ({page}) => {
await page.goto('http://localhost:3000/')
const title = await page.title()
expect(title).toBe('קהילת Pull Request')
});

45 changes: 45 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"dev": "npm run open-browser && next dev",
"open-browser": "node ./scripts/open-browser.js",
"build": "next build",
"start": "next start",
"start": "npm run build && next start",
"prepare": "husky install",
"lint": "next lint"
"lint": "next lint",
"test:e2e": "playwright test"
},
"dependencies": {
"@mdi/js": "^5.6.55",
Expand All @@ -22,6 +23,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"@playwright/test": "^1.22.2",
"@types/node": "^14.11.2",
"@types/react": "^16.9.50",
"eslint": "^7.32.0",
Expand Down
1 change: 1 addition & 0 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ export const getStaticProps: GetStaticProps = async () => {
props: {
people: randomShuffle(getPeople()),
},
revalidate: true,
};
};
10 changes: 10 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
webServer: {
command: "npm run start",
url: "http://localhost:3000",
}
};

export default config;