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

Feature/portal api v3 #1120

Closed
wants to merge 213 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
213 commits
Select commit Hold shift + click to select a range
830d0ef
changes for local dev w/ npm
rustyjux Apr 17, 2024
25011f8
new page for no gateways - WIP
rustyjux Apr 22, 2024
160081a
CliCommand component
rustyjux Apr 22, 2024
e034ab4
restore IconButton
rustyjux Apr 22, 2024
413fe49
create all elements
rustyjux Apr 23, 2024
e432021
smooth scroll
rustyjux Apr 23, 2024
b46d347
fix scroll
rustyjux Apr 23, 2024
a7f2dd6
move no-gateways content into new component
rustyjux Apr 25, 2024
de0bc29
add query to see if there are gateways
rustyjux Apr 25, 2024
74d202e
changes for local dev w/ npm
rustyjux Apr 17, 2024
54b0d1b
Move ns dropdown
rustyjux May 1, 2024
aeda668
save and load recently viewed gws
rustyjux May 1, 2024
e8cff9f
search namespaces
rustyjux May 2, 2024
c9c032a
oops - remove local dev changes
rustyjux May 3, 2024
136dbdb
fix UserData.userId property reference
rustyjux May 3, 2024
b0fa764
fix ip
rustyjux May 3, 2024
9e1c0b4
maintain focus, style, fix type errors
rustyjux May 3, 2024
0bdc95d
ns to gw in text
rustyjux May 3, 2024
bc63b36
include current gw in recently viewed
rustyjux May 3, 2024
8e54df1
add query to whitelist
rustyjux May 3, 2024
757e905
remove old menu for no NSs
rustyjux May 3, 2024
db43e06
remove current gw from recently viewed
rustyjux May 30, 2024
346066e
edit display name - WIP, query and mutation inc
rustyjux May 31, 2024
1bdca86
touch up ns search
rustyjux Jun 3, 2024
56be561
style edit display name
rustyjux Jun 3, 2024
17bbf94
fix error
rustyjux Jun 3, 2024
1f549c5
add displayName to mocks
rustyjux Jun 3, 2024
5dde66f
show ns displayname on namespaces page
rustyjux Jun 3, 2024
58eb847
remove files / changes accidentally committed
rustyjux Jun 3, 2024
98a97f2
refine Getting Started content
rustyjux Jun 3, 2024
0217134
Feature/display name backend for selector (#1058)
ikethecoder Jun 4, 2024
840b1c7
cleanup
rustyjux Jun 4, 2024
07c68bf
make full gateways list link a MenuItem
rustyjux Jun 4, 2024
6ffafd1
cleanup
rustyjux Jun 4, 2024
8e71187
update Your Products page header
rustyjux Jun 4, 2024
f3abe75
refresh namespaces when opening menu
rustyjux Jun 4, 2024
a89a7c0
first draft
ikethecoder Jun 4, 2024
a497909
hide Recently Viewed heading if none
rustyjux Jun 4, 2024
74774be
udp babel config
ikethecoder Jun 4, 2024
422c566
adj to run sonarscan
ikethecoder Jun 4, 2024
6d6b48d
default to v3 of api
ikethecoder Jun 4, 2024
d1dc8c5
search both name and displayName
rustyjux Jun 5, 2024
7d83ab8
change Your Products header
rustyjux Jun 5, 2024
78f9429
add cypress tests for v3 of api
ikethecoder Jun 5, 2024
8c77220
cleanup bit of cypress
ikethecoder Jun 5, 2024
ab31df5
new page for get-started
rustyjux Jun 5, 2024
d02a5ba
added Get Started to links to show in nav for dev
rustyjux Jun 5, 2024
8fb827c
divide up api v2 tests
ikethecoder Jun 6, 2024
455903e
add endpoint availability check
ikethecoder Jun 6, 2024
71a3397
make available a boolean
ikethecoder Jun 6, 2024
f322e01
upd route availability
ikethecoder Jun 6, 2024
7553ab7
replace gatewayId in create-gateway call
rustyjux Jun 11, 2024
90d6720
v3 upds generate display name and dataset resources contacts
ikethecoder Jun 12, 2024
955b8dc
remove unused file
ikethecoder Jun 12, 2024
3b5aaa6
fix the org and product batch loading
ikethecoder Jun 13, 2024
b9d19d3
fix unit test
ikethecoder Jun 13, 2024
88165cb
Merge pull request #1050 from bcgov/feature/ns-to-gw-selector
ikethecoder Jun 13, 2024
7612f5e
Merge pull request #1061 from bcgov/feature/ns-to-gw-v3-api
ikethecoder Jun 13, 2024
4092080
Merge branch 'feature/ns-to-gw' into feature/ns-to-gw-new-provider
ikethecoder Jun 13, 2024
899ca04
Merge pull request #1045 from bcgov/feature/ns-to-gw-new-provider
ikethecoder Jun 13, 2024
d5e34e9
My gateways page changes copied over
Elson9 Jun 14, 2024
4b92b6f
Merge pull request #1069 from bcgov/feature/my-gateways-page-new
ikethecoder Jun 14, 2024
3ebeada
Added and updated breadcrumbs
Elson9 Jun 18, 2024
79fef16
redirect provider to /manager/gateways on login
rustyjux Jun 19, 2024
4e9a214
upd namespace display name validation and default value
ikethecoder Jun 19, 2024
8eb965a
upd route endpoint availability
ikethecoder Jun 19, 2024
72f363d
restrict new My Gateways to signed in portal-user
rustyjux Jun 19, 2024
ae98e63
Merge branch 'feature/ns-to-gw' of https://github.com/bcgov/api-servi…
rustyjux Jun 19, 2024
7c82ace
hide gateway selector on Get Started page
rustyjux Jun 19, 2024
2635f0f
use consts for help URLs
rustyjux Jun 19, 2024
b29a5dc
Breadcrumbs display name support
Elson9 Jun 19, 2024
58ae174
upd proxy to gwa-api to keep using v2
ikethecoder Jun 20, 2024
03ba6b2
Update api-proxy to gwa-api to fix routing to v2
ikethecoder Jun 20, 2024
42420fd
use existing whitelisted query
rustyjux Jun 20, 2024
50174ce
conditionally push to Get Started page, simplify query
rustyjux Jun 20, 2024
f4293f0
show banner if gateways on Get Started
rustyjux Jun 20, 2024
d499f23
show all GWs if no recently viewed GWs
rustyjux Jun 21, 2024
e257919
show displayName on selector button
rustyjux Jun 21, 2024
9af6815
handle null currentNamespace
rustyjux Jun 24, 2024
b589ea8
link to My Gateways
rustyjux Jun 24, 2024
bb1367d
remove Get Started from nav links
rustyjux Jun 24, 2024
55fa508
use appendedBreadcrumbs to check if it's the gateway details page. Re…
Elson9 Jun 24, 2024
8d0767d
don't refetch on search change
rustyjux Jun 24, 2024
2611538
Merge pull request #1073 from bcgov/feature/gateway-breadcrumbs
Elson9 Jun 24, 2024
e3c600b
Gateways restructure and redirect logic
Elson9 Jun 24, 2024
6248bae
My gateways page redirects to detail page when gateway selected
Elson9 Jun 24, 2024
7fea734
update recentlyViewedNamespaces on change from list
rustyjux Jun 24, 2024
c580470
add GRAFANA_URL to .env.local
rustyjux Jun 24, 2024
01baa0c
don't show gw selector on list
rustyjux Jun 24, 2024
de2078a
Gateways redirect logic optimization
Elson9 Jun 25, 2024
c8d7e3d
add details to 'test your gateway' step
rustyjux Jun 25, 2024
32604f9
update labels in /nextapp
rustyjux Jun 26, 2024
a22c849
a few more renames
rustyjux Jun 26, 2024
fb02632
gw switch toast messages
rustyjux Jun 26, 2024
50ce477
replace use of namespace.name
rustyjux Jun 26, 2024
303ce72
fix links.ts for new gateways pages
rustyjux Jun 26, 2024
58b7c3a
Reduce space after title (header)
Elson9 Jun 26, 2024
9b1d320
Remove New tag
Elson9 Jun 26, 2024
0ae0620
Detail page: redirect to list if no gateway selected
Elson9 Jun 26, 2024
b158c92
Naming updates
Elson9 Jun 26, 2024
abe3ddb
Merge branch 'feature/ns-to-gw' of https://github.com/bcgov/api-servi…
rustyjux Jun 26, 2024
bd7ada8
Remove unused POC content
rustyjux Jun 26, 2024
6647b54
Sort alphabetically by displayName, secondarily by name
Elson9 Jun 26, 2024
47bc3cf
Remove check for existence of displayName (assume always exists)
Elson9 Jun 26, 2024
f137491
Fixed TypeError: Cannot read properties of undefined (reading 'locale…
Elson9 Jun 26, 2024
0a8d50c
rename Namespace permissions to Gateway
rustyjux Jun 27, 2024
e8b455e
rename namespace-access page to admin-access
rustyjux Jun 27, 2024
b36d9e4
lowercase gateway in selector menu
rustyjux Jun 27, 2024
915326b
Use global techdocs URL
Elson9 Jun 27, 2024
32b9f3e
update gateways report output
rustyjux Jun 27, 2024
807556c
delete unused resources content
rustyjux Jun 27, 2024
9639e87
modify Get Started
rustyjux Jun 27, 2024
5c3e1d6
Other manager pages: redirect to list if no gateway selected
Elson9 Jun 28, 2024
09299f4
Merge branch 'feature/ns-to-gw' of https://github.com/bcgov/api-servi…
rustyjux Jul 2, 2024
f55b4a3
set host commands based on portal environment
rustyjux Jul 3, 2024
a5832b1
default access manage to new gateway owner
ikethecoder Jul 3, 2024
b1c0c02
default a gw display name when blank
ikethecoder Jul 3, 2024
74e9cb8
undo setting api root - setting during build does not allow override …
ikethecoder Jul 4, 2024
b158bc2
remove some unnecessary logging
ikethecoder Jul 4, 2024
1db929d
Gateways nav bar link no longer redirects to details page
Elson9 Jul 4, 2024
a1a840b
fix check availability
ikethecoder Jul 4, 2024
d4613f7
Adding or removing gateway shows up instantly in list page
Elson9 Jul 4, 2024
067905b
add createGateway command
rustyjux Jul 5, 2024
5e159c7
complete review suggestions
rustyjux Jul 5, 2024
99aedb1
Merge branch 'feature/ns-to-gw' into feature/ns-to-gw-portal-labels
rustyjux Jul 5, 2024
31e2f21
Merge branch 'feature/ns-to-gw' into feature/ns-to-gw-portal-labels
rustyjux Jul 5, 2024
dfd02fc
Merge pull request #1077 from bcgov/feature/ns-to-gw-portal-labels
rustyjux Jul 5, 2024
04dd9fb
add toast during gw delete
rustyjux Jul 5, 2024
fe831ce
fix incomplete data on revisit to gateways/list
rustyjux Jul 5, 2024
b0d7962
add query for ns id
rustyjux Jul 8, 2024
712c50d
Merge branch 'feature/ns-to-gw' into cypress/ns-to-gw-regression
rustyjux Jul 8, 2024
01dc6a3
add testid for gatewayid on detail page
rustyjux Jul 8, 2024
eabaa84
and display name
rustyjux Jul 8, 2024
18d50c9
add activateGateway command
rustyjux Jul 8, 2024
66177a7
update permissions names
rustyjux Jul 8, 2024
5f54739
confirm activation using currentNamespace
rustyjux Jul 8, 2024
8a77dab
update `gwa gateway` commands in tests
rustyjux Jul 8, 2024
1644caa
use v3 endpoint for orgs
rustyjux Jul 8, 2024
ee2a7bb
useNamespace --> activateGateway
rustyjux Jul 8, 2024
8f5eaa5
remove graphql-request package use
rustyjux Jul 9, 2024
86dea79
01/02
rustyjux Jul 9, 2024
fe69170
/02 tests, tweak create and activate gw
rustyjux Jul 9, 2024
dee4648
Validation error messages namespace to gateway
Elson9 Jul 10, 2024
09bfccb
upload JSON report to GH
rustyjux Jul 10, 2024
d597b12
createGateway w/ API instead of cli
rustyjux Jul 11, 2024
ee5d484
More namespace to gateway name changes
Elson9 Jul 11, 2024
88b4845
Resolve merge conflicts
Elson9 Jul 11, 2024
d8b968b
visit after activateGateway to fetch session
rustyjux Jul 11, 2024
e35c85c
env var for disabling Astra on API requests
rustyjux Jul 12, 2024
2546a4a
revert logout to include wait
rustyjux Jul 12, 2024
8f211aa
use cy.request in getUserSession
rustyjux Jul 12, 2024
db962d9
update paths to /api/v3
rustyjux Jul 12, 2024
f71bcfd
remove unused MyProfile page
rustyjux Jul 12, 2024
e575efa
org approval fixes
rustyjux Jul 12, 2024
df25574
remove accidentally kept .only
rustyjux Jul 12, 2024
e77f10b
skip astra (additional changes)
rustyjux Jul 12, 2024
5e67d71
preserve API v2 tests
rustyjux Jul 12, 2024
49fa69b
disable content tests
rustyjux Jul 12, 2024
1c86762
fix visit for detailPath
rustyjux Jul 12, 2024
f708302
fix test for namespace in org
rustyjux Jul 12, 2024
51bcd29
fix more tests
rustyjux Jul 12, 2024
a6b1829
remove ns to gw name replacement from data
rustyjux Jul 15, 2024
9ba282d
remove unused cmds
rustyjux Jul 15, 2024
34cedce
update cmd name
rustyjux Jul 15, 2024
08127d1
Merge pull request #1095 from bcgov/feature/ns-to-gw-fix-scopes-form
rustyjux Jul 15, 2024
e7aeb73
remove unused from home.ts
rustyjux Jul 15, 2024
68033cf
check nav bar links by user idp
rustyjux Jul 15, 2024
00c59bc
update test data dependencies
rustyjux Jul 15, 2024
d7807ec
check for My Access instead of Gateways on login
rustyjux Jul 15, 2024
c2f3423
fix user session
rustyjux Jul 15, 2024
ab68738
fix user session again
rustyjux Jul 16, 2024
6a36d4d
/devportal and /manager redirects
Elson9 Jul 16, 2024
bdb1252
modify redirect for no namespaces
rustyjux Jul 16, 2024
f2a89ef
add NEXT_PUBLIC_GRAFANA_URL for local
rustyjux Jul 16, 2024
4dc50bf
change test for namespace deletion
rustyjux Jul 16, 2024
abcfd1b
remove unused namespace var
rustyjux Jul 16, 2024
5bc1171
minor fixes
rustyjux Jul 17, 2024
c7680dc
revert orgs/ns comparison
rustyjux Jul 17, 2024
58e8ea5
improve test output format in GHA
rustyjux Jul 17, 2024
afa61fa
check deletion w/ API response
rustyjux Jul 17, 2024
878dd45
verify ns deletion via allNamepsaces gql
rustyjux Jul 17, 2024
aa0b635
make stats prettier
rustyjux Jul 17, 2024
6364568
bump version for upload-artifact
rustyjux Jul 17, 2024
e7faefa
fix for manager approving self access
ikethecoder Jul 17, 2024
12b4ba6
Add wait after delete ns
rustyjux Jul 18, 2024
99e2c99
extend wait
rustyjux Jul 18, 2024
d30b4a6
yml --> yaml in cli
rustyjux Jul 18, 2024
e28389f
Unauthorized login button goes to API provider login page
Elson9 Jul 19, 2024
8ceb7af
Revert cypress file and logger messages back to namespace
Elson9 Jul 19, 2024
a4c48ab
Merge pull request #1085 from bcgov/feature/ns-to-gw-validation-error
rustyjux Jul 22, 2024
551dcc6
remove isDisabled from help menu
rustyjux Jul 22, 2024
c8ef409
add keys to avoid lack of unique key React warning
rustyjux Jul 22, 2024
0b858eb
eliminate svg size attribute errors
rustyjux Jul 22, 2024
1009a01
Merge branch 'feature/ns-to-gw' into cypress/ns-to-gw-regression
rustyjux Jul 22, 2024
604195a
Merge pull request #1112 from bcgov/cypress/ns-to-gw-regression
rustyjux Jul 22, 2024
2741593
Merge branch 'feature/ns-to-gw' into feature/ns-to-gw-redirects
rustyjux Jul 22, 2024
41ad730
update Enable Env tooltip
rustyjux Jul 22, 2024
7e6da9d
check if user is on a API provider page
rustyjux Jul 22, 2024
f6f35d4
Merge pull request #1101 from bcgov/feature/ns-to-gw-redirects
rustyjux Jul 22, 2024
6df2662
bump upload-artifact version in all uses
rustyjux Jul 24, 2024
eeda238
API Directory tweaks
rustyjux Jul 29, 2024
0659fec
Merge branch 'feature/ns-to-gw' of https://github.com/bcgov/api-servi…
rustyjux Jul 29, 2024
0433d24
redirect to manager/gateways on provider login
rustyjux Jul 29, 2024
6ad2d43
capitalize Gateway on /get-started
rustyjux Jul 29, 2024
b2e4031
Merge branch 'feature/ns-to-gw' into feature/approve-own-request
rustyjux Jul 30, 2024
a0cf168
Merge pull request #1107 from bcgov/feature/approve-own-request
rustyjux Jul 30, 2024
fa59527
Merge branch 'feature/ns-to-gw' of https://github.com/bcgov/api-servi…
rustyjux Jul 30, 2024
8f9ff5b
add help, remove 'cli commands'
rustyjux Aug 1, 2024
64c6889
hide 'No Gateways' if there are gws
rustyjux Aug 1, 2024
884259d
add description of gws to My Gateways
rustyjux Aug 1, 2024
f7d4ae6
remove bold on products description
rustyjux Aug 1, 2024
fba8833
redirect to gws on provider login from root
rustyjux Aug 2, 2024
bb4a221
Portal uses API v3 where appropriate
Elson9 Aug 7, 2024
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
21 changes: 20 additions & 1 deletion .env.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LOG_LEVEL=info
LOG_LEVEL=debug
DISABLE_LOGGING='true'
AUTH_STRATEGY=Oauth2Proxy
KNEX_HOST=kong-db
Expand Down Expand Up @@ -27,7 +27,26 @@ LOCAL_ENV=true
WORKING_PATH=/tmp
DESTINATION_URL=
SSR_API_ROOT=http://apsportal.localtest.me:3000
NEXT_PUBLIC_APP_VERSION=0.0.0
NEXT_PUBLIC_APP_REVISION=000000000000000000000000
NEXT_PUBLIC_KUBE_CLUSTER=local
NEXT_PUBLIC_HELP_DESK_URL=https://dpdd.atlassian.net/servicedesk/customer/portal/1/group/2
NEXT_PUBLIC_HELP_CHAT_URL=https://chat.developer.gov.bc.ca/channel/aps-ops
NEXT_PUBLIC_HELP_ISSUE_URL=https://github.com/bcgov/api-services-portal/issues
NEXT_PUBLIC_HELP_API_DOCS_URL=/ds/api/v3/console/
NEXT_PUBLIC_HELP_SUPPORT_URL=https://dev.developer.gov.bc.ca/docs/default/component/aps-infra-platform-docs/
NEXT_PUBLIC_HELP_RELEASE_URL=https://dev.developer.gov.bc.ca/docs/default/component/aps-infra-platform-docs/reference/releases/
NEXT_PUBLIC_HELP_STATUS_URL=https://uptime.com/s/bcgov-dss
NEXT_PUBLIC_DEVELOPER_IDS=idir,bceid,bcsc,github
NEXT_PUBLIC_PROVIDER_IDS=idir
NEXT_PUBLIC_ACCOUNT_BCEID_URL=https://www.test.bceid.ca/logon.aspx?returnUrl=/profile_management
NEXT_PUBLIC_ACCOUNT_BCSC_URL=https://idtest.gov.bc.ca/account/
NEXT_PUBLIC_GRAFANA_URL=https://grafana.local


# For automated integrated testing
TEST_PORTAL_CLIENT_ID=aps-portal
TEST_PORTAL_CLIENT_SECRET=8e1a17ed-cb93-4806-ac32-e303d1c86018
TEST_PORTAL_USERNAME=janis@idir
TEST_PORTAL_PASSWORD=awsummer

18 changes: 12 additions & 6 deletions .github/workflows/aps-cypress-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,20 @@ jobs:
fi
done

- name: Upload E2E Test Results Report
uses: actions/upload-artifact@v2
- name: Upload E2E Test Results HTML Report
uses: actions/upload-artifact@v4
with:
name: test-results
name: test-results-html
path: ${{ github.workspace }}/e2e/results/report

- name: Upload E2E Test Results JSON Report
uses: actions/upload-artifact@v4
with:
name: test-results-json
path: ${{ github.workspace }}/e2e/results/bcgov-aps-e2e-report.json

- name: Upload E2E Code Coverage Report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: ${{ github.workspace }}/e2e/coverage
Expand Down Expand Up @@ -100,8 +106,8 @@ jobs:
run: |
FAILURE_COUNT=$(cat ${{ github.workspace }}/e2e/results/bcgov-aps-e2e-report.json | jq '.stats.failures')
if [[ "$FAILURE_COUNT" -gt 0 ]]; then
FAILED_TESTS=$(cat ${{ github.workspace }}/e2e/results/bcgov-aps-e2e-report.json | jq '.results | .[] | .suites | .[].tests | .[] | select(.fail==true) | .title')
STATS=$(cat ${{ github.workspace }}/e2e/results/bcgov-aps-e2e-report.json | jq '.stats')
FAILED_TESTS=$(jq -r '.results[] | {file: .file, suites: .suites[]} | .suites as $suite | {file: .file, failed_tests: ($suite.tests[] | select(.fail == true) | {title})} | select(.failed_tests != null) | "- " + (.file | split("/") | .[2:] | join("/")) + " - " + .failed_tests.title' ${{ github.workspace }}/e2e/results/bcgov-aps-e2e-report.json)
STATS=$(cat ${{ github.workspace }}/e2e/results/bcgov-aps-e2e-report.json | jq -r '.stats | to_entries | map("\(.key)\t\(.value)") | .[]' | column -t)
echo -e "Stats: $STATS\n\nFailed Tests:\n$FAILED_TESTS\n\nRun Link: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" > msg
export MSG=$(cat msg)
gh issue create --title "FAILED: Automated Tests($FAILURE_COUNT)" --body "$MSG" --label "automation" --assignee "${{ env.GIT_COMMIT_AUTHOR }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ jobs:
NEXT_PUBLIC_HELP_ISSUE_URL:
value: 'https://github.com/bcgov/api-services-portal/issues'
NEXT_PUBLIC_HELP_API_DOCS_URL:
value: '/ds/api/v2/console/'
value: '/ds/api/v3/console/'
NEXT_PUBLIC_HELP_SUPPORT_URL:
value: 'https://developer.gov.bc.ca/docs/default/component/aps-infra-platform-docs/'
NEXT_PUBLIC_HELP_RELEASE_URL:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-feat-sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Run Tests
run: |
docker compose up kong-db -d
docker compose up keycloak -d

set -o allexport
source ./.env.local
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Run this command to test logging in and creating a namespace:

```
gwa login
gwa namespace create --name gw-12345
gwa gateway create --gateway-id gw-12345
```

### Keycloak configuration
Expand All @@ -67,17 +67,19 @@ Use the following configuration to run the Portal locally (outside of Docker) ag

1. If using Node version > 17, run `npm install --legacy-peer-deps`

1. Turn off the docker compose Portal: `docker stop apsportal`
1. Configure the `oauth2-proxy` that is running in Docker:
1. Turn off the docker compose Portal and OAuth2 Proxy: `docker stop apsportal oauth2-proxy`

1. Update `upstreams` in `local/oauth2-proxy/oauth2-proxy-local.cfg` to include the IP address of your local machine, e.g. `upstreams=["http://172.100.100.01:3000"]`
<br>You can obtain the IP address using `hostname -I`.
1. Start the OAuth2 Proxy locally:

1. Restart the oauth2-proxy: `docker compose restart oauth2-proxy`
1. Update `DESTINATION_URL` in `local/feeds/.env.local` to include the IP address of your local machine
1. Restart the feeder: `docker compose restart feeder`
1. Update `PORTAL_ACTIVITY_URL` in `local/gwa-api/.env.local` to include the IP address of your local machine
1. Restart the feeder: `docker compose restart gwa-api`
```sh
hostip=$(ifconfig en0 | awk '$1 == "inet" {print $2}')

docker run -ti --rm --name proxy --net=host \
--add-host portal.localtest.me:$hostip \
-v `pwd`/local/oauth2-proxy/oauth2-proxy-dev.cfg:/oauth2.config \
quay.io/oauth2-proxy/oauth2-proxy:v7.2.0 \
--config /oauth2.config
```

1. Start the Portal locally:

Expand Down
2 changes: 1 addition & 1 deletion e2e/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ COPY e2e/*.yml /e2e
COPY e2e/entrypoint.sh /tmp
ADD e2e/cypress /e2e/cypress

RUN curl -v -L -O https://github.com/bcgov/gwa-cli/releases/download/v2.0.15/gwa_Linux_x86_64.tgz \
RUN curl -v -L -O https://github.com/bcgov/gwa-cli/releases/download/v3.0.0/gwa_Linux_x86_64.tgz \
&& tar -xzf gwa_Linux_x86_64.tgz \
&& mv gwa /usr/local/bin/.

Expand Down
6 changes: 5 additions & 1 deletion e2e/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default defineConfig({
'./cypress/tests/16-*/*.ts',
'./cypress/tests/17-*/*.ts',
'./cypress/tests/18-*/*.ts',
'./cypress/tests/19-*/*.ts',
]
return config
},
Expand All @@ -57,9 +58,10 @@ export default defineConfig({
},
chromeWebSecurity: false,
env: {
ASTRA_SCAN_ENABLED: true,
CLIENT_ID: 'aps-portal',
CLIENT_SECRET: '8e1a17ed-cb93-4806-ac32-e303d1c86018',
OIDC_ISSUER: 'http://keycloak.localtest.me:9081',
OIDC_ISSUER: 'http://keycloak.localtest.me:9081/auth/realms/master',
TOKEN_URL:
'http://keycloak.localtest.me:9081/auth/realms/master/protocol/openid-connect/token',
GWA_API_URL: 'http://gwa-api.localtest.me:2000/v2',
Expand All @@ -69,6 +71,8 @@ export default defineConfig({
BASE_URL: 'http://oauth2proxy.localtest.me:4180',
KEYCLOAK_URL: 'http://keycloak.localtest.me:9081',
WEBAPP_URL: 'http://html-sample-app.localtest.me:4242',
DEV_USERNAME: 'janis@idir',
DEV_PASSWORD: 'awsummer',
},
retries: {
runMode: 2,
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/fixtures/access-manager.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"namespace": "permission"
},
"serviceAccount": {
"scopes": ["GatewayConfig.Publish", "Namespace.Manage", "Content.Publish"]
"scopes": ["GatewayConfig.Publish", "Gateway.Manage", "Content.Publish"]
},
"labels_consumer1": {
"labels": {
Expand Down
Loading
Loading