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

feat: view transitions #57

Merged
merged 2 commits into from
Sep 25, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/api/.dev.vars.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ GITHUB_PR_LABEL =
GITHUB_APP_ID =
GITHUB_APP_INSTALLATION_ID =
GITHUB_APP_PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----\n-----END PRIVATE KEY-----"
ALLOWED_ORIGIN = http://localhost:3000
ALLOWED_ORIGIN = http://localhost:4321
8 changes: 4 additions & 4 deletions packages/api/test/createIssue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ test('Calls github api to create an issue (happy path)', async () => {
shouldCreateIssueFail.mockReturnValue(false);

const response = await handler.fetch(
new Request('http://localhost:3000', {
new Request('http://localhost:4321', {
method: 'POST',
headers: {
Origin: 'http://localhost:3000',
Origin: 'http://localhost:4321',
'Content-Type': 'application/json',
},
body: JSON.stringify({
Expand Down Expand Up @@ -53,10 +53,10 @@ test('Returns 500 when call to github api fails', async () => {
vi.useFakeTimers();

const promise = handler.fetch(
new Request('http://localhost:3000', {
new Request('http://localhost:4321', {
method: 'POST',
headers: {
Origin: 'http://localhost:3000',
Origin: 'http://localhost:4321',
'Content-Type': 'application/json',
},
body: JSON.stringify({
Expand Down
4 changes: 2 additions & 2 deletions packages/api/test/json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test('Manages invalid json', async () => {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Origin: 'http://localhost:3000',
Origin: 'http://localhost:4321',
},
body: JSON.stringify({ name: 'world' }),
}),
Expand Down Expand Up @@ -103,7 +103,7 @@ test('Manages malformed JSON', async () => {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Origin: 'http://localhost:3000',
Origin: 'http://localhost:4321',
},
body: '{',
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/site/.env.local
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PUBLIC_API_BASE_URL=http://localhost:3000/oulu-dev-meetups/api
PUBLIC_API_BASE_URL=http://localhost:4321/oulu-dev-meetups/api
12 changes: 6 additions & 6 deletions packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"test": "vitest"
},
"dependencies": {
"@astrojs/mdx": "^0.19.7",
"@astrojs/rss": "^2.4.3",
"@astrojs/sitemap": "^2.0.1",
"@astrojs/tailwind": "^4.0.0",
"meetup-shared": "workspace:*",
"@astrojs/mdx": "^1.1.0",
"@astrojs/rss": "^3.0.0",
"@astrojs/sitemap": "^3.0.0",
"@astrojs/tailwind": "^5.0.0",
"@tailwindcss/forms": "^0.5.4",
"@tailwindcss/typography": "^0.5.9",
"astro": "^2.9.0",
"astro": "^3.1.3",
"date-fns": "^2.30.0",
"meetup-shared": "workspace:*",
"tailwindcss": "^3.3.3"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/site/src/layouts/PageLayout.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import { ViewTransitions } from 'astro:transitions';
import Footer from '../components/Footer.astro';
import Header from '../components/Header.astro';
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
Expand All @@ -22,6 +23,7 @@ const {
<html class="h-full">
<head>
<BaseHead title={title} description={description} image={image} />
<ViewTransitions />
</head>
<body class="h-full">
<div class="flex h-full flex-col">
Expand Down
4 changes: 2 additions & 2 deletions packages/site/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test('meta is correct', async () => {
const page = await browser.newPage();
page.on('console', (msg) => console.log(msg.text()));

await page.goto('http://localhost:3000/');
await page.goto('http://localhost:4321/');

const title = await page.title();
expect(title).toBe('Oulu developer meetups');
Expand All @@ -23,7 +23,7 @@ test('main heading is set', async () => {
const page = await browser.newPage();
page.on('console', (msg) => console.log(msg.text()));

await page.goto('http://localhost:3000/');
await page.goto('http://localhost:4321/');

expect(
await page
Expand Down
2 changes: 1 addition & 1 deletion packages/site/test/submit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test('main heading is set', async () => {
const page = await browser.newPage();
page.on('console', (msg) => console.log(msg.text()));

await page.goto('http://localhost:3000/submit');
await page.goto('http://localhost:4321/submit');

expect(
await page
Expand Down