Skip to content

Commit

Permalink
Staging (#254)
Browse files Browse the repository at this point in the history
* feat: add Yedidya Rashi profile (#220)

* chore: remove idea folder (#236)

* updating readme: custom image (#239)

* test: add e2e infra with playwright and a sample test (#235)

* test: add e2e infra with playwright and a sample test

* test: add github action for e2e test

* test: add config for framework spin-up

* Yedidyar/issue167 (#240)

* feat: add Yedidya Rashi profile (#220)

* fix: randomShuffle isn't working correctly  (#167)

* fix(Description): wrap descriptionHeight with useEffect (#243)

see more about the issue:
https://stackoverflow.com/questions/62336340/cannot-update-a-component-while-rendering-a-different-component-warning

* There is no background for the role of Former admin label
Fixes #241

* Test (#238)

* inital commit

* revert change

Co-authored-by: noa <[email protected]>

Co-authored-by: yedidya rashi <[email protected]>
Co-authored-by: Omri Bar-Zik <[email protected]>
Co-authored-by: shir22 <[email protected]>
Co-authored-by: Liran Tal <[email protected]>
Co-authored-by: Inbar Danieli <[email protected]>
Co-authored-by: noa <[email protected]>
  • Loading branch information
7 people authored Jul 8, 2022
1 parent 8ae23ec commit 84d56ac
Show file tree
Hide file tree
Showing 17 changed files with 104 additions and 62 deletions.
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;

0 comments on commit 84d56ac

Please sign in to comment.