career
Summary #
4 suites · 27 scenarios
Contents #
- career CLI — 6 scenarios
- career generate — 13 scenarios
- cv renders a PDF (default template) with an accent color
- cv writes a valid PDF header
- japanese-resume renders a PDF from a positional input
- japanese-resume accepts the 履歴書 alias
- japanese-resume embeds the bundled sample portrait passed with –photo
- work-history renders a PDF using –input and the default output name
- work-history still accepts the legacy career-history alias
- work-history accepts the 職務経歴書 alias
- multiple templates renders every template with -t all
- errors fails when the input file is missing
- errors fails on an unknown template
- errors fails on an invalid accent color
- errors fails when no input is given
- career init — 4 scenarios
- career README examples — 4 scenarios
career CLI #
Source: test/e2e/tools/career/cli.atago.yaml
Scenario: prints root help with no arguments #
When #
career
Then #
- exit code is
0 - stdout contains
Usage:,generate
Scenario: prints the version #
When #
career version
Then #
- exit code is
0 - stdout contains
career
Scenario: lists the available templates #
When #
career templates
Then #
- exit code is
0 - stdout contains
cv,japanese-resume,work-history
Scenario: documents the aliases generate accepts #
When #
career templates
Then #
- exit code is
0 - stdout contains
履歴書,職務経歴書,career-history
Scenario: describes the generate command #
When #
career help generate
Then #
- exit code is
0 - stdout contains
--template
Scenario: unknown command fails with a helpful message #
When #
career frobnicate
Then #
- exit code is not
0 - stderr contains
unknown command
career generate #
Source: test/e2e/tools/career/generate.atago.yaml
Scenario: cv renders a PDF (default template) with an accent color #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml --accent "#2c6e6e" -o cv.pdf
Then #
- after
career generate resume.yaml --accent "#2c6e6e" -o cv.pdf:- exit code is
0 - stdout contains
wrote - file
cv.pdfexists
- exit code is
Generated artifacts #
cv.pdf
Scenario: cv writes a valid PDF header #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml -t cv -o cv.pdf
head -c 4 cv.pdf
Then #
- after
head -c 4 cv.pdf:- stdout equals an exact value
- pdf
cv.pdf>= 1 pages
Scenario: japanese-resume renders a PDF from a positional input #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml -t japanese-resume -o out.pdf
Then #
- after
career generate resume.yaml -t japanese-resume -o out.pdf:- exit code is
0 - stdout contains
wrote - file
out.pdfexists
- exit code is
Generated artifacts #
out.pdf
Scenario: japanese-resume accepts the 履歴書 alias #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml -t 履歴書 -o out.pdf
Then #
- after
career generate resume.yaml -t 履歴書 -o out.pdf:- exit code is
0 - stdout contains
wrote - file
out.pdfexists
- exit code is
Generated artifacts #
out.pdf
Scenario: japanese-resume embeds the bundled sample portrait passed with –photo #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml -t japanese-resume --photo "$CAREER_EXAMPLES/../image/sample_japanese_man.jpg" -o out.pdf
Then #
- after
career generate resume.yaml -t japanese-resume --photo "$CAREER_EXAMPLES/../image/sample_japanese_man.jpg" -o out.pdf:- exit code is
0 - stdout contains
wrote - file
out.pdfexists
- exit code is
Generated artifacts #
out.pdf
Scenario: work-history renders a PDF using –input and the default output name #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate --input resume.yaml --template work-history --output ch.pdf
Then #
- after
career generate --input resume.yaml --template work-history --output ch.pdf:- exit code is
0 - stdout contains
wrote - file
ch.pdfexists
- exit code is
Generated artifacts #
ch.pdf
Scenario: work-history still accepts the legacy career-history alias #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml -t career-history -o legacy.pdf
Then #
- after
career generate resume.yaml -t career-history -o legacy.pdf:- exit code is
0 - stdout contains
work-history - file
legacy.pdfexists
- exit code is
Generated artifacts #
legacy.pdf
Scenario: work-history accepts the 職務経歴書 alias #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml -t 職務経歴書 -o ja.pdf
Then #
- after
career generate resume.yaml -t 職務経歴書 -o ja.pdf:- exit code is
0 - stdout contains
wrote - file
ja.pdfexists
- exit code is
Generated artifacts #
ja.pdf
Scenario: multiple templates renders every template with -t all #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml -t all
Then #
- after
career generate resume.yaml -t all:- exit code is
0 - stdout contains
cv,japanese-resume,work-history - file
cv.pdfexists - file
japanese-resume.pdfexists - file
work-history.pdfexists
- exit code is
Generated artifacts #
cv.pdfjapanese-resume.pdfwork-history.pdf
Scenario: errors fails when the input file is missing #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate nope.yaml -t cv -o out.pdf
Then #
- after
career generate nope.yaml -t cv -o out.pdf:- exit code is not
0 - stderr is not empty
- exit code is not
Scenario: errors fails on an unknown template #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml -t bogus -o out.pdf
Then #
- after
career generate resume.yaml -t bogus -o out.pdf:- exit code is not
0 - stderr contains
unknown template
- exit code is not
Scenario: errors fails on an invalid accent color #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate resume.yaml -t cv --accent bogus -o out.pdf
Then #
- after
career generate resume.yaml -t cv --accent bogus -o out.pdf:- exit code is not
0 - stderr contains
hex color
- exit code is not
Scenario: errors fails when no input is given #
When #
cp "$CAREER_EXAMPLES/minimal.yaml" resume.yaml
career generate -t cv
Then #
- after
career generate -t cv:- exit code is not
0 - stderr contains
no input file
- exit code is not
career init #
Source: test/e2e/tools/career/init.atago.yaml
Scenario: writes a starter file #
When #
career init resume.yaml
Then #
- exit code is
0 - stdout contains
wrote - file
resume.yamlexists
Generated artifacts #
resume.yaml
Scenario: refuses to overwrite without –force #
When #
career init resume.yaml
career init resume.yaml
Then #
- after
career init resume.yaml:- exit code is not
0 - stderr contains
already exists
- exit code is not
Scenario: overwrites with –force #
When #
career init resume.yaml
career init resume.yaml --force
Then #
- after
career init resume.yaml --force:- exit code is
0 - stdout contains
wrote
- exit code is
Scenario: produces a file that generate accepts #
When #
career init resume.yaml
career generate resume.yaml -t cv -o cv.pdf
Then #
- after
career generate resume.yaml -t cv -o cv.pdf:- exit code is
0 - stdout contains
wrote - file
cv.pdfexists
- exit code is
Generated artifacts #
cv.pdf
career README examples #
Source: test/e2e/tools/career/readme.atago.yaml
Scenario: cv example: career generate resume.yaml -t cv -o cv.pdf #
When #
cp "$CAREER_EXAMPLES/resume.yaml" resume.yaml
career generate resume.yaml -t cv -o cv.pdf
Then #
- after
career generate resume.yaml -t cv -o cv.pdf:- exit code is
0 - stdout contains
wrote - file
cv.pdfexists
- exit code is
Generated artifacts #
cv.pdf
Scenario: japanese-resume example: -t japanese-resume -o rirekisho.pdf #
When #
cp "$CAREER_EXAMPLES/resume.yaml" resume.yaml
career generate resume.yaml -t japanese-resume -o rirekisho.pdf
Then #
- after
career generate resume.yaml -t japanese-resume -o rirekisho.pdf:- exit code is
0 - stdout contains
wrote - file
rirekisho.pdfexists
- exit code is
Generated artifacts #
rirekisho.pdf
Scenario: work-history example: -t work-history -o shokumukeirekisho.pdf #
When #
cp "$CAREER_EXAMPLES/resume.yaml" resume.yaml
career generate resume.yaml -t work-history -o shokumukeirekisho.pdf
Then #
- after
career generate resume.yaml -t work-history -o shokumukeirekisho.pdf:- exit code is
0 - stdout contains
wrote - file
shokumukeirekisho.pdfexists
- exit code is
Generated artifacts #
shokumukeirekisho.pdf
Scenario: all example: -t all writes the three default file names #
When #
cp "$CAREER_EXAMPLES/resume.yaml" resume.yaml
career generate resume.yaml -t all
Then #
- after
career generate resume.yaml -t all:- exit code is
0 - stdout contains
wrote - file
cv.pdfexists - file
japanese-resume.pdfexists - file
work-history.pdfexists
- exit code is
Generated artifacts #
cv.pdfjapanese-resume.pdfwork-history.pdf