Skip to content

Commit 255ecde

Browse files
nuxt upgrade to 3.17.5 (#201)
* nuxt upgrade * fix pipeline * other fixes Signed-off-by: Piotr Karpala <[email protected]> --------- Signed-off-by: Piotr Karpala <[email protected]>
1 parent dd53f68 commit 255ecde

File tree

11 files changed

+12878
-8522
lines changed

11 files changed

+12878
-8522
lines changed

.github/workflows/playwright.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ jobs:
3939
- name: Run Vite tests
4040
run: CI=true npm test
4141
- name: Run Playwright tests
42-
run: CI=true RUN_COMMAND='npm run preview' npm run test:e2e
42+
run: |
43+
CI=true \
44+
NUXT_SESSION_PASSWORD=foo-foo-foo-foo-foo-foo-foo-foo-foo-foo-foo-foo \
45+
NUXT_PUBLIC_GITHUB_ORG=octodemo \
46+
NUXT_PUBLIC_IS_DATA_MOCKED=true \
47+
RUN_COMMAND='npm run preview' npm run test:e2e
4348
- uses: actions/upload-artifact@v4
4449
if: ${{ !cancelled() }}
4550
with:
@@ -65,6 +70,8 @@ jobs:
6570
docker run --rm --name playwright \
6671
-v $(pwd)/test-results-docker:/test-results \
6772
-e NUXT_SESSION_PASSWORD=foo-foo-foo-foo-foo-foo-foo-foo-foo-foo-foo-foo \
73+
-e NUXT_PUBLIC_GITHUB_ORG=octodemo \
74+
-e NUXT_PUBLIC_IS_DATA_MOCKED=true \
6875
app:pw
6976
- uses: actions/upload-artifact@v4
7077
if: always()

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ logs
2626
# Playwright
2727
playwright-report
2828
playwright-logs
29-
test-results
29+
test-results
30+
results.xml

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ RUN echo '#!/bin/sh' > /entrypoint.sh && \
3737
echo 'export NUXT_PUBLIC_GITHUB_TEAM=${NUXT_PUBLIC_GITHUB_TEAM:-$VUE_APP_GITHUB_TEAM}' >> /entrypoint.sh && \
3838
echo 'export NUXT_GITHUB_TOKEN=${NUXT_GITHUB_TOKEN:-$VUE_APP_GITHUB_TOKEN}' >> /entrypoint.sh && \
3939
echo 'export NUXT_SESSION_PASSWORD=${NUXT_SESSION_PASSWORD:-$SESSION_SECRET$SESSION_SECRET$SESSION_SECRET$SESSION_SECRET}' >> /entrypoint.sh && \
40+
# in case SESSION_SECRET is not set, use NUXT_GITHUB_TOKEN as a fallback
41+
echo 'export NUXT_SESSION_PASSWORD=${NUXT_SESSION_PASSWORD:-$NUXT_GITHUB_TOKEN$NUXT_GITHUB_TOKEN}' >> /entrypoint.sh && \
4042
echo 'export NUXT_OAUTH_GITHUB_CLIENT_ID=${NUXT_OAUTH_GITHUB_CLIENT_ID:-$GITHUB_CLIENT_ID}' >> /entrypoint.sh && \
4143
echo 'export NUXT_OAUTH_GITHUB_CLIENT_SECRET=${NUXT_OAUTH_GITHUB_CLIENT_SECRET:-$GITHUB_CLIENT_SECRET}' >> /entrypoint.sh && \
4244
# Conditionally set NUXT_PUBLIC_USING_GITHUB_AUTH if GITHUB_CLIENT_ID is provided

app/components/MainComponent.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ export default defineNuxtComponent({
151151
case 404:
152152
apiError.value = `404 Not Found - is the ${config.public.scope || ''} org:"${config.public.githubOrg || ''}" ent:"${config.public.githubEnt || ''}" team:"${config.public.githubTeam}" correct? ${error.message}`;
153153
break;
154+
case 422:
155+
apiError.value = `422 Unprocessable Entity - Is the Copilot Metrics API enabled for the Org/Ent? ${error.message}`;
156+
break;
154157
case 500:
155158
apiError.value = `500 Internal Server Error - most likely a bug in the app. Error: ${error.message}`;
156159
break;

e2e-tests/copilot.ent.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let dashboard: DashboardPage;
77

88
test.beforeAll(async ({ browser }) => {
99
const page = await browser.newPage();
10-
await page.goto('/enterprises/octo-demo-ent');
10+
await page.goto('/enterprises/octo-demo-ent?mock=true');
1111

1212
dashboard = new DashboardPage(page);
1313

e2e-tests/copilot.org.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let dashboard: DashboardPage;
77

88
test.beforeAll(async ({ browser }) => {
99
const page = await browser.newPage();
10-
await page.goto('/orgs/octo-demo-org');
10+
await page.goto('/orgs/octo-demo-org?mock=true');
1111

1212
dashboard = new DashboardPage(page);
1313

e2e-tests/copilot.team.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let dashboard: DashboardPage;
77

88
test.beforeAll(async ({ browser }) => {
99
const page = await browser.newPage();
10-
await page.goto('/orgs/octo-demo-org/teams/the-a-team');
10+
await page.goto('/orgs/octo-demo-org/teams/the-a-team?mock=true');
1111

1212
dashboard = new DashboardPage(page);
1313

e2e-tests/metrics.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { DashboardPage } from './pages/DashboardPage';
44
const tag = { tag: ['@ent', '@org', '@team'] };
55

66
[
7-
{ name: 'Teams', url: '/orgs/octodemo-org/teams/the-a-team' },
8-
{ name: 'Orgs', url: '/orgs/octodemo-org' },
9-
{ name: 'Enterprises', url: '/enterprises/octo-enterprise' },
7+
{ name: 'Teams', url: '/orgs/octodemo-org/teams/the-a-team?mock=true' },
8+
{ name: 'Orgs', url: '/orgs/octodemo-org?mock=true' },
9+
{ name: 'Enterprises', url: '/enterprises/octo-enterprise?mock=true' },
1010
].forEach(({ name, url }) => {
1111

1212
test.describe('tests for ' + name, () => {

0 commit comments

Comments
 (0)