forked from stakwork/sphinx-tribes-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into write-tests-case-for-wanted
- Loading branch information
Showing
98 changed files
with
4,375 additions
and
1,530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Test tickets | ||
about: Template to create tests | ||
title: '' | ||
labels: Bounties | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Context | ||
|
||
|
||
### File to to test | ||
|
||
|
||
### File to create | ||
|
||
|
||
### Acceptance Criteria | ||
- [ ] I have rebased and tested locally before submitting my PR | ||
|
||
### References | ||
- Watch this [Jest Youtube playlist](https://www.youtube.com/watch?v=T2sv8jXoP4s&list=PLC3y8-rFHvwirqe1KHFCHJ0RqNuN61SJd) if you are new to testing | ||
- Here is an [example unit test](https://github.com/stakwork/sphinx-tribes/blob/master/frontend/app/src/helpers/__test__/helpers.spec.ts) | ||
- Here is an [example component test](https://github.com/stakwork/sphinx-tribes/blob/9310f49b3b17a51992dada932f4298eb9eba15ff/frontend/app/src/people/widgetViews/__tests__/AboutView.spec.tsx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Docker build on push (master) | ||
env: | ||
DOCKER_CLI_EXPERIMENTAL: enabled | ||
|
||
on: | ||
push: | ||
branch: | ||
- master | ||
|
||
# https://docs.github.com/en/actions/learn-github-actions/expressions | ||
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context | ||
concurrency: | ||
# github.workflow: name of the workflow | ||
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
|
||
# Cancel in-progress runs when a new workflow with the same group name is triggered | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
name: Build and push Tribes image (master) | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
steps: | ||
- name: Check out from Git | ||
uses: actions/checkout@v2 | ||
- name: Login to Docker Hub | ||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
- name: Setup Docker buildx action | ||
uses: crazy-max/ghaction-docker-buildx@v1 | ||
id: buildx | ||
with: | ||
buildx-version: latest | ||
qemu-version: latest | ||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Run Docker buildx | ||
run: | | ||
docker buildx build \ | ||
--cache-to "type=local,dest=/tmp/.buildx-cache" \ | ||
--platform linux/amd64,linux/arm/v7 \ | ||
--tag "${{ secrets.DOCKER_HUB_USER }}/sphinx-tribes-frontend:master" \ | ||
--output "type=registry" ./ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
cd frontend/app && yarn run lint | ||
yarn run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
describe('Alice tries to create a bounty', () => { | ||
it('Create a bounty', () => { | ||
let activeUser = 'alice'; | ||
cy.login(activeUser); | ||
cy.wait(1000); | ||
|
||
cy.create_bounty({ | ||
title: 'My new Bounty', | ||
category: 'Web development', | ||
coding_language: ['Typescript', 'Javascript', 'Lightning'], | ||
description: 'This is available', | ||
amount: '123', | ||
assign: 'carol', | ||
deliverables: 'We are good to go man', | ||
tribe: '', | ||
estimate_session_length: 'Less than 3 hour', | ||
estimate_completion_date: '09/09/2024' | ||
}); | ||
|
||
cy.wait(1000); | ||
|
||
cy.logout(activeUser); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
describe('Create Organization', () => { | ||
it('Creating an Organization', () => { | ||
cy.login('carol'); | ||
|
||
cy.create_org({ | ||
loggedInAs: 'carol', | ||
name: 'New Organization 8', | ||
description: 'We are testing out our oeganization', | ||
website: 'https://community.sphinx.chat', | ||
github: 'https://github.com/stakwork/sphinx-tribes-frontend' | ||
}); | ||
|
||
cy.logout('carol'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// LNURL PublicKey | ||
// 0430a9b0f2a0bad383b1b3a1989571b90f7486a86629e040c603f6f9ecec857505fd2b1279ccce579dbe59cc88d8d49b7543bd62051b1417cafa6bb2e4fd011d30 | ||
|
||
describe('Login with LNURL', () => { | ||
it('User trying to login with LNURL', () => { | ||
cy.lnurl_login(); | ||
|
||
cy.wait(1000); | ||
cy.logout('0430'); // NOTE: to logout LNURL auth use the first for letters of the pubkey as the userAlias. | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
declare namespace Cypress { | ||
interface Chainable { | ||
login(userAlias: string): void; | ||
logout(userAlias: string): void; | ||
create_bounty(bounty: Bounty): void; | ||
lnurl_login(): void; | ||
create_org(Organization: Organization): void; | ||
pay_invoice(details: InvoiceDetail): void; | ||
} | ||
|
||
type Category = | ||
| 'Web development' | ||
| 'Mobile development' | ||
| 'Design' | ||
| 'Desktop app' | ||
| 'Dev ops' | ||
| 'Bitcoin / Lightning' | ||
| 'Other'; | ||
|
||
type EstimateSessionLength = | ||
| 'Less than 1 hour' | ||
| 'Less than 3 hour' | ||
| 'More than 3 hour' | ||
| 'Not sure yet'; | ||
|
||
type Bounty = { | ||
organization?: string; | ||
title: string; | ||
github_issue_url?: string; | ||
category: Category; | ||
coding_language?: string[]; | ||
description: string; | ||
amount: string; | ||
tribe?: string; | ||
estimate_session_length?: EstimateSessionLength; | ||
estimate_completion_date?: string; // MM/DD/YYYY | ||
deliverables?: string; | ||
assign?: string; | ||
}; | ||
|
||
type Organization = { | ||
loggedInAs: string; | ||
name: string; | ||
description: string; | ||
website?: string; | ||
github?: string; | ||
}; | ||
|
||
type InvoiceDetail = { | ||
payersName: string; | ||
invoice: string; | ||
}; | ||
} |
Oops, something went wrong.