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

chore: added tests for SSR #1750

Closed
wants to merge 18 commits into from
Closed
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 fastn-core/tests/01-help/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: $FBT_CWD/../target/debug/fastn --test --help
cmd: $FBT_CWD/../target/release/fastn --test --help

Will have to be updated every time version changes.

Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/02-hello/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022 --ignore-failed
cmd: cd amitu && $FBT_CWD/../target/release/fastn --test build --edition 2022 --ignore-failed
output: amitu/.build

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/03-nested-document/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022
cmd: cd amitu && $FBT_CWD/../target/release/fastn --test build --edition 2022
output: amitu/.build


Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/04-import-code-block/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022
cmd: cd amitu && $FBT_CWD/../target/release/fastn --test build --edition 2022
output: amitu/.build


Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/05-hello-font/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022
cmd: cd amitu && $FBT_CWD/../target/release/fastn --test build --edition 2022
output: amitu/.build

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/08-static-assets/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build
cmd: cd amitu && $FBT_CWD/../target/release/fastn --test build
output: amitu/.build

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/09-markdown-pages/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build
cmd: cd amitu && $FBT_CWD/../target/release/fastn --test build
output: amitu/.build

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/10-readme-index/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build
cmd: cd amitu && $FBT_CWD/../target/release/fastn --test build
output: amitu/.build
skip: temporarily removed markdown support

Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/11-readme-with-index/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022
cmd: cd amitu && $FBT_CWD/../target/release/fastn --test build --edition 2022
output: amitu/.build

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/15-fpm-dependency-alias/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022
cmd: cd amitu && $FBT_CWD/../target/release/fastn --test build --edition 2022
output: amitu/.build

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/16-include-processor/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: $FBT_CWD/../target/debug/fastn --test build --edition 2022
cmd: $FBT_CWD/../target/release/fastn --test build --edition 2022
output: .build

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/17-sitemap/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: $FBT_CWD/../target/debug/fastn --test build
cmd: $FBT_CWD/../target/release/fastn --test build
output: .build

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/18-fmt/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: $FBT_CWD/../target/debug/fastn --test update && $FBT_CWD/../target/debug/fastn --test fmt
cmd: $FBT_CWD/../target/release/fastn --test update && $FBT_CWD/../target/release/fastn --test fmt
output: .

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/19-offline-build/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: $FBT_CWD/../target/debug/fastn --test update && $FBT_CWD/../target/debug/fastn --test build --offline
cmd: $FBT_CWD/../target/release/fastn --test update && $FBT_CWD/../target/release/fastn --test build --offline
output: .build

-- stdout:
Expand Down
2 changes: 1 addition & 1 deletion fastn-core/tests/20-fastn-update-check/cmd.p1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- fbt:
cmd: $FBT_CWD/../target/debug/fastn --test update --check
cmd: $FBT_CWD/../target/release/fastn --test update --check
exit-code: 7

-- stdout:
Expand Down
13 changes: 13 additions & 0 deletions fastn-core/tests/21-bot-ssr/cmd.p1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- fbt:
cmd: $FBT_CWD/tests/21-bot-ssr/run-test.sh
output: .build

-- stdout:

Updated package dependency.
Starting fastn server ...
No packages updated.
### Server Started ###
Go to: http://127.0.0.1:8000
Curling http://127.0.0.1:8000 with User Agent Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) ...
Curling http://127.0.0.1:8000 with User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123 Safari/537.36 ...
3 changes: 3 additions & 0 deletions fastn-core/tests/21-bot-ssr/input/FASTN.ftd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- import: fastn

-- fastn.package: fastn-community.github.io/ssr-test
162 changes: 162 additions & 0 deletions fastn-core/tests/21-bot-ssr/input/assets/ipsum-logo-dark.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 152 additions & 0 deletions fastn-core/tests/21-bot-ssr/input/assets/ipsum-logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions fastn-core/tests/21-bot-ssr/input/index.ftd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- import: fastn-community.github.io/ssr-test/assets

-- ftd.column:
width: fill-container
height: fill-container
align-content: center
spacing.fixed.rem: 2

-- ftd.image: $assets.files.assets.ipsum-logo.svg

-- ftd.text: Hello SSR!

-- end: ftd.column