diff --git a/__snapshots__/make-badge.spec.mjs.js b/__snapshots__/make-badge.spec.mjs.js index 3b149e98505f4..a32754594f7e7 100644 --- a/__snapshots__/make-badge.spec.mjs.js +++ b/__snapshots__/make-badge.spec.mjs.js @@ -237,7 +237,7 @@ exports['The badge generator "flat" template badge generation should match snaps - + - - + + grown - + - + - - + + - label: message - - - - - - - - - - - - - - - - - label - - - - message - - - - -` - exports['The badge generator "flat" template badge generation should match snapshots: message with custom suffix 1'] = ` ` + +exports['The badge generator badges with logos should always produce the same badge default badge with logo 1'] = ` + + label: message + + + + + + + + + + + + + + + + + label + + + + message + + + + +` + +exports['The badge generator badges with logos should always produce the same badge default badge with logo, no label, has message 1'] = ` + + undefined: message + + + + + + + + + + + + + + + + + undefined + + + + message + + + + +` + +exports['The badge generator badges with logos should always produce the same badge default badge with logo, has label, no message 1'] = ` + + label: undefined + + + + + + + + + + + + + + + + + label + + + + undefined + + + + +` + +exports['The badge generator badges with logos should always produce the same badge default badge with logo, no label, no message 1'] = ` + + label: undefined + + + + + + + + + + + + + + + + + label + + + + undefined + + + + +` + +exports['The badge generator badges with logos should always produce the same badge flat badge with logo 1'] = ` + + label: message + + + + + + + + + + + + + + + + + label + + + + message + + + + +` + +exports['The badge generator badges with logos should always produce the same badge flat badge with logo, no label, has message 1'] = ` + + undefined: message + + + + + + + + + + + + + + + + + undefined + + + + message + + + + +` + +exports['The badge generator badges with logos should always produce the same badge flat badge with logo, has label, no message 1'] = ` + + label: undefined + + + + + + + + + + + + + + + + + label + + + + undefined + + + + +` + +exports['The badge generator badges with logos should always produce the same badge flat badge with logo, no label, no message 1'] = ` + + label: undefined + + + + + + + + + + + + + + + + + label + + + + undefined + + + + +` + +exports['The badge generator badges with logos should always produce the same badge flat-square badge with logo 1'] = ` + + label: message + + + + + + + + label + + + message + + + + +` + +exports['The badge generator badges with logos should always produce the same badge flat-square badge with logo, no label, has message 1'] = ` + + undefined: message + + + + + + + + undefined + + + message + + + + +` + +exports['The badge generator badges with logos should always produce the same badge flat-square badge with logo, has label, no message 1'] = ` + + label: undefined + + + + + + + + label + + + undefined + + + + +` + +exports['The badge generator badges with logos should always produce the same badge flat-square badge with logo, no label, no message 1'] = ` + + label: undefined + + + + + + + + label + + + undefined + + + + +` + +exports['The badge generator badges with logos should always produce the same badge for-the-badge badge with logo 1'] = ` + + LABEL: MESSAGE + + + + + + + + LABEL + + + MESSAGE + + + + +` + +exports['The badge generator badges with logos should always produce the same badge for-the-badge badge with logo, no label, has message 1'] = ` + + UNDEFINED: MESSAGE + + + + + + + + UNDEFINED + + + MESSAGE + + + + +` + +exports['The badge generator badges with logos should always produce the same badge for-the-badge badge with logo, has label, no message 1'] = ` + + LABEL: UNDEFINED + + + + + + + + LABEL + + + UNDEFINED + + + + +` + +exports['The badge generator badges with logos should always produce the same badge for-the-badge badge with logo, no label, no message 1'] = ` + + LABEL: UNDEFINED + + + + + + + + LABEL + + + UNDEFINED + + + + +` + +exports['The badge generator badges with logos should always produce the same badge social badge with logo 1'] = ` + + Label: message + + + + + + + + + + + + + + + + + + + +` + +exports['The badge generator badges with logos should always produce the same badge social badge with logo, no label, has message 1'] = ` + + Undefined: message + + + + + + + + + + + + + + + + + + + +` + +exports['The badge generator badges with logos should always produce the same badge social badge with logo, has label, no message 1'] = ` + + Label: undefined + + + + + + + + + + + + + + + + + + + +` + +exports['The badge generator badges with logos should always produce the same badge social badge with logo, no label, no message 1'] = ` + + Label: undefined + + + + + + + + + + + + + + + + + + + +` + +exports['The badge generator badges with logos should always produce the same badge plastic badge with logo 1'] = ` + + label: message + + + + + + + + + + + + + + + + + + + label + + + + message + + + + +` + +exports['The badge generator badges with logos should always produce the same badge plastic badge with logo, no label, has message 1'] = ` + + undefined: message + + + + + + + + + + + + + + + + + + + undefined + + + + message + + + + +` + +exports['The badge generator badges with logos should always produce the same badge plastic badge with logo, has label, no message 1'] = ` + + label: undefined + + + + + + + + + + + + + + + + + + + label + + + + undefined + + + + +` + +exports['The badge generator badges with logos should always produce the same badge plastic badge with logo, no label, no message 1'] = ` + + label: undefined + + + + + + + + + + + + + + + + + + + label + + + + undefined + + + + +` diff --git a/badge-maker/lib/make-badge.spec.mjs b/badge-maker/lib/make-badge.spec.mjs index f91229446f862..55dccf2281e51 100644 --- a/badge-maker/lib/make-badge.spec.mjs +++ b/badge-maker/lib/make-badge.spec.mjs @@ -700,7 +700,7 @@ describe('The badge generator', function () { }) describe('badges with logos should always produce the same badge', function () { - it('badge with logo', async function () { + it('default badge with logo', async function () { await expectBadgeToMatchSnapshot({ label: 'label', message: 'message', @@ -708,5 +708,214 @@ describe('The badge generator', function () { logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', }) }) + + it('default badge with logo, no label, has message', async function () { + await expectBadgeToMatchSnapshot({ + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + }) + }) + + it('default badge with logo, has label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + }) + }) + + it('default badge with logo, no label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + }) + }) + + it('flat badge with logo', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'flat', + }) + }) + + it('flat badge with logo, no label, has message', async function () { + await expectBadgeToMatchSnapshot({ + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'flat', + }) + }) + + it('flat badge with logo, has label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'flat', + }) + }) + + it('flat badge with logo, no label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'flat', + }) + }) + + it('flat-square badge with logo', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'flat-square', + }) + }) + + it('flat-square badge with logo, no label, has message', async function () { + await expectBadgeToMatchSnapshot({ + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'flat-square', + }) + }) + + it('flat-square badge with logo, has label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'flat-square', + }) + }) + + it('flat-square badge with logo, no label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'flat-square', + }) + }) + + it('for-the-badge badge with logo', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'for-the-badge', + }) + }) + + it('for-the-badge badge with logo, no label, has message', async function () { + await expectBadgeToMatchSnapshot({ + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'for-the-badge', + }) + }) + + it('for-the-badge badge with logo, has label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'for-the-badge', + }) + }) + + it('for-the-badge badge with logo, no label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'for-the-badge', + }) + }) + + it('social badge with logo', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'social', + }) + }) + + it('social badge with logo, no label, has message', async function () { + await expectBadgeToMatchSnapshot({ + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'social', + }) + }) + + it('social badge with logo, has label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'social', + }) + }) + + it('social badge with logo, no label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'social', + }) + }) + + it('plastic badge with logo', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'plastic', + }) + }) + + it('plastic badge with logo, no label, has message', async function () { + await expectBadgeToMatchSnapshot({ + message: 'message', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'plastic', + }) + }) + + it('plastic badge with logo, has label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'plastic', + }) + }) + + it('plastic badge with logo, no label, no message', async function () { + await expectBadgeToMatchSnapshot({ + label: 'label', + format: 'svg', + logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxu', + style: 'plastic', + }) + }) }) })