Skip to content

Commit

Permalink
feat(auth0-deploy-cli): add captcha_widget_theme property to colors o…
Browse files Browse the repository at this point in the history
…bject
  • Loading branch information
developerkunal committed Jun 21, 2024
1 parent 16dee06 commit b3e4cdc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/tools/auth0/handlers/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ export const schema = {
pattern: '^#(([0-9a-fA-F]{3}){1,2}|([0-9a-fA-F]{4}){1,2})$',
type: 'string',
},
captcha_widget_theme: {
description: 'Captcha Widget Theme',
pattern: '^(auto|light|dark)$',
type: 'string',
},
error: {
description: 'Error',
pattern: '^#(([0-9a-fA-F]{3}){1,2}|([0-9a-fA-F]{4}){1,2})$',
Expand Down Expand Up @@ -288,6 +293,7 @@ export const schema = {
'success',
'widget_background',
'widget_border',
'captcha_widget_theme'
],
type: 'object',
},
Expand Down Expand Up @@ -520,6 +526,7 @@ export interface Colors {
links_focused_components: string;
header: string;
body_text: string;
captcha_widget_theme:string;
widget_background: string;
widget_border: string;
input_labels_placeholders: string;
Expand Down
6 changes: 5 additions & 1 deletion test/tools/auth0/handlers/themes.tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const { expect, assert } = require('chai');
import chai, { expect ,assert} from 'chai';
import chaiAsPromised from 'chai-as-promised';
const { omit, cloneDeep } = require('lodash');
const { default: ThemesHandler } = require('../../../../src/tools/auth0/handlers/themes');

chai.use(chaiAsPromised);

function stub() {
const s = function (...args) {
s.callCount += 1;
Expand Down Expand Up @@ -56,6 +59,7 @@ const mockTheme = ({ withThemeId } = {}) => {
header: '#FF00CC',
icons: '#FF00CC',
input_background: '#FF00CC',
captcha_widget_theme: 'dark',
input_border: '#FF00CC',
input_filled_text: '#FF00CC',
input_labels_placeholders: '#FF00CC',
Expand Down

0 comments on commit b3e4cdc

Please sign in to comment.