career

Summary #

4 suites · 27 scenarios

Contents #

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.pdf exists

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.pdf exists

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.pdf exists

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.pdf exists

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.pdf exists

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.pdf exists

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.pdf exists

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.pdf exists
    • file japanese-resume.pdf exists
    • file work-history.pdf exists

Generated artifacts #

  • cv.pdf
  • japanese-resume.pdf
  • work-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

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

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

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

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.yaml exists

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

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

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.pdf exists

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.pdf exists

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.pdf exists

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.pdf exists

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.pdf exists
    • file japanese-resume.pdf exists
    • file work-history.pdf exists

Generated artifacts #

  • cv.pdf
  • japanese-resume.pdf
  • work-history.pdf