Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
2eb7c3c
update success subtle color value
javiert-okta Aug 22, 2025
5db974e
add icon components
javiert-okta Aug 22, 2025
390c5a2
refactor card components order
javiert-okta Aug 22, 2025
135e9a6
update styles for card component
javiert-okta Aug 22, 2025
996c30b
udpate toolbar button to include tooltip
javiert-okta Aug 22, 2025
96bbae1
remove background color
javiert-okta Aug 22, 2025
024fa3b
update jwt input
javiert-okta Aug 22, 2025
32f9d50
update debugger toolbar styles
javiert-okta Aug 22, 2025
59b050a
update font size
javiert-okta Aug 22, 2025
af1ec5b
add icons to toolbar components
javiert-okta Aug 22, 2025
078bfd2
update color values
javiert-okta Aug 29, 2025
833f4a4
change titles for decoded header and payload
javiert-okta Aug 29, 2025
f485c4b
update styles for token decoder signature component
javiert-okta Aug 29, 2025
a0d4b0c
update secret key input styles
javiert-okta Aug 29, 2025
4101083
update styles for jwt input headline
javiert-okta Aug 29, 2025
c10e64d
update styles for claims table
javiert-okta Aug 29, 2025
ecc5839
add bottom margin
javiert-okta Aug 29, 2025
4655953
add eye icons
javiert-okta Aug 29, 2025
88f1e38
update card tabs styling
javiert-okta Aug 29, 2025
5d66e8d
update styles for card component
javiert-okta Aug 29, 2025
5594a34
update styles for checkbox
javiert-okta Aug 29, 2025
93d3d1b
remove roboto font
javiert-okta Sep 10, 2025
641ada4
remove borders, add color to svg icons
javiert-okta Sep 10, 2025
0ff9668
change button icons positioning, udpate styles
javiert-okta Sep 10, 2025
784c436
remove background color
javiert-okta Sep 10, 2025
93a3d07
update styles for property tooltip
javiert-okta Sep 10, 2025
83bea5a
update global style variables values
javiert-okta Sep 10, 2025
682182f
update focus values
javiert-okta Sep 12, 2025
26f2bdd
update picker en message
javiert-okta Sep 12, 2025
0b202db
update token decoder styling
javiert-okta Sep 12, 2025
61c4d5e
update debugger picker styling and reorganize tags
javiert-okta Sep 12, 2025
bf2fe57
Navbar update (#879)
christiansamaniego-okta Sep 15, 2025
79f7c8d
delete unused prop
javiert-okta Sep 15, 2025
2993e82
update focused and disabled styles
javiert-okta Sep 15, 2025
92148a7
Merge pull request #883 from jsonwebtoken/update-algorithm-picker
javiert-okta Sep 15, 2025
e442a80
add new encoding toggle switch component
javiert-okta Sep 16, 2025
cd270fc
update card styles and component to render toggle switch
javiert-okta Sep 16, 2025
f4624e3
comment footer
javiert-okta Sep 16, 2025
ff37381
format secret key input component
javiert-okta Sep 16, 2025
19565b7
update react control styles
javiert-okta Sep 17, 2025
deb9bfc
move pickers to card component
javiert-okta Sep 17, 2025
3f9d976
update debugger picker styling and options
javiert-okta Sep 17, 2025
dba55a9
update label styles
javiert-okta Sep 17, 2025
5a4868f
update alg picker container
javiert-okta Sep 17, 2025
c255d5e
update styling for signature messages
javiert-okta Sep 17, 2025
1f0c9a2
remove height
javiert-okta Sep 17, 2025
b966d37
Merge pull request #884 from jsonwebtoken/update-token-encoder-picker
javiert-okta Sep 17, 2025
eac13e6
add new ebook image
javiert-okta Sep 19, 2025
9e6e16c
delete unused image
javiert-okta Sep 19, 2025
761a901
add new code component
javiert-okta Sep 19, 2025
39e690c
update styles for ebook component
javiert-okta Sep 19, 2025
443d65b
add whitespace to code component
javiert-okta Sep 22, 2025
1ad55b9
update global styles values
javiert-okta Sep 22, 2025
3ea39b0
add classes for number and boolean code
javiert-okta Sep 22, 2025
3c9f03a
add hover state to ebook link button
javiert-okta Sep 23, 2025
ab18c28
Merge pull request #885 from jsonwebtoken/update-handbook-message-com…
javiert-okta Sep 23, 2025
afbf8cb
fix merge conflicts
javiert-okta Sep 23, 2025
24e008e
Info messages (#886)
christiansamaniego-okta Sep 23, 2025
58a4001
add data-no-padding attribute
javiert-okta Sep 24, 2025
ca3353d
fix card styles
javiert-okta Sep 24, 2025
92d74fe
update padding value
javiert-okta Sep 24, 2025
a054985
delete comment
javiert-okta Sep 24, 2025
21ba061
update toggle switch logic and styles
javiert-okta Sep 24, 2025
e2ee558
add heading and update styles
javiert-okta Sep 24, 2025
931c82d
update en dictionary entries
javiert-okta Sep 24, 2025
51867df
update global values
javiert-okta Sep 24, 2025
09ffa20
add headers to token encoder cards
javiert-okta Sep 24, 2025
cd274ab
delete unused component
javiert-okta Sep 24, 2025
b1529d8
add headline classname
javiert-okta Sep 25, 2025
45211a2
add styles for heading container
javiert-okta Sep 25, 2025
686d4e4
fix row-gap value
javiert-okta Sep 25, 2025
a2c53e7
fix button icon styling
javiert-okta Sep 25, 2025
863fdf8
fix picker styles
javiert-okta Sep 25, 2025
68c44ea
increase font size
javiert-okta Sep 25, 2025
f1471cb
increase padding
javiert-okta Sep 25, 2025
2824a48
align items to center
javiert-okta Sep 25, 2025
df05d98
fix styles for encoder picker
javiert-okta Sep 25, 2025
39dad3f
add picker to token encoder component
javiert-okta Sep 25, 2025
84350b5
add new color to light theme
javiert-okta Sep 25, 2025
600cbdc
fix toggle switch styles
javiert-okta Sep 25, 2025
12d71b1
delete unused images and add new diagram
javiert-okta Sep 26, 2025
e907e1e
add arrow head icon
javiert-okta Sep 26, 2025
fe00bcf
update auth0-cta component styling
javiert-okta Sep 26, 2025
53af493
update assets component
javiert-okta Sep 26, 2025
742a1de
delete auth0 component from home page
javiert-okta Sep 26, 2025
b04da93
udpate global values
javiert-okta Sep 26, 2025
fb7ff2e
update footer styles
javiert-okta Sep 26, 2025
7d55e46
Merge pull request #890 from jsonwebtoken/update-footer-design
javiert-okta Oct 1, 2025
199b947
Merge pull request #889 from jsonwebtoken/library-message-component-u…
javiert-okta Oct 1, 2025
7f547b4
delete no padding styles
javiert-okta Oct 2, 2025
c40823f
remove padding
javiert-okta Oct 2, 2025
5e791f7
add none algorithm option
javiert-okta Oct 2, 2025
4a2abf8
decrease padding
javiert-okta Oct 2, 2025
ec01c9e
update color for selected option in picker
javiert-okta Oct 2, 2025
4096e62
fix padding option
javiert-okta Oct 2, 2025
da0fd12
Merge branch 'ui-redesign' of https://github.com/jsonwebtoken/jsonweb…
javiert-okta Oct 2, 2025
22e093e
Navbar dropdown (#891)
christiansamaniego-okta Oct 2, 2025
38d521d
fix merge conflicts
javiert-okta Oct 2, 2025
167aeaa
Merge pull request #877 from jsonwebtoken/update-panel-picker
javiert-okta Oct 2, 2025
9671527
Merge branch 'master' of https://github.com/jsonwebtoken/jsonwebtoken…
javiert-okta Oct 2, 2025
5816664
update check mark icon style
javiert-okta Oct 3, 2025
18df7af
update x-mark icon style
javiert-okta Oct 3, 2025
4220dbf
update question mark icon style
javiert-okta Oct 3, 2025
8ea0854
update library card styling
javiert-okta Oct 3, 2025
00fe123
update picker label
javiert-okta Oct 3, 2025
ceb6355
add danger color variables
javiert-okta Oct 3, 2025
1de4f07
Merge pull request #892 from jsonwebtoken/update-libraries-page
javiert-okta Oct 7, 2025
90fce54
update article component layout and add title and ebook-ad styles (#893)
christiansamaniego-okta Oct 8, 2025
9e0ca1d
update bg color (#894)
christiansamaniego-okta Oct 8, 2025
2eafa7d
delete unecessary test
javiert-okta Oct 8, 2025
47ddaab
add aria-label to card toolbar button
javiert-okta Oct 8, 2025
4a35998
fix jsx syntax on icons components
javiert-okta Oct 8, 2025
862d475
Add language selector (#896)
christiansamaniego-okta Oct 15, 2025
f9e09d9
Merge branch 'ui-redesign' of https://github.com/jsonwebtoken/jsonweb…
javiert-okta Oct 16, 2025
17221cf
add data test id to encoding format switch
javiert-okta Oct 21, 2025
7b73a15
add switch id to data test dictionary
javiert-okta Oct 21, 2025
9b2d905
fix decoder e2e tests
javiert-okta Oct 21, 2025
6023a28
fix encoder e2e tests
javiert-okta Oct 21, 2025
59103fc
Merge pull request #895 from jsonwebtoken/fix-e2e-tests
javiert-okta Oct 21, 2025
360d4a5
Add jp translations (#898)
christiansamaniego-okta Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 67 additions & 93 deletions e2e/decoder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
import { MessageStatusValue, MessageTypeValue } from "./e2e.values";
import { JwtDictionaryModel, JwtSignedWithDigitalModel } from "./e2e.models";
import jwts from "./jwt.json" with { type: "json" };
import { EncodingValues } from "@/features/common/values/encoding.values";

const TestJwts = (jwts as JwtDictionaryModel).byAlgorithm;

Expand All @@ -39,7 +40,7 @@ test.describe("Can interact with JWT Decoder JWT editor", () => {
const jwtEditorInput = getDecoderJwtEditorInput(page);

await expect(jwtEditorInput).toHaveValue(
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30",
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30"
);
});

Expand All @@ -53,8 +54,13 @@ test.describe("Can interact with JWT Decoder JWT editor", () => {
await expect(jwtEditorInput).toHaveValue(inputValue);
});

test("can copy value in JWT editor", async ({ page, context, browserName }) => {
const permissions = browserName === 'firefox' ? [] : ["clipboard-read", "clipboard-write"]
test("can copy value in JWT editor", async ({
page,
context,
browserName,
}) => {
const permissions =
browserName === "firefox" ? [] : ["clipboard-read", "clipboard-write"];
const inputValue = (TestJwts.RS512 as JwtSignedWithDigitalModel).withPemKey
.jwt;
await context.grantPermissions(permissions);
Expand All @@ -76,7 +82,7 @@ test.describe("Can interact with JWT Decoder JWT editor", () => {
await copyButton.click();

const clipboardContent = await page.evaluate(() =>
navigator.clipboard.readText(),
navigator.clipboard.readText()
);

expect(clipboardContent).toBe(inputValue);
Expand Down Expand Up @@ -105,51 +111,14 @@ test.describe("Can generate JWT examples", () => {
await page.goto(E2E_BASE_URL);
});

test("Can open and close JWT Decoder example widget", async ({ page }) => {
const lang = await getLang(page);
expectToBeNonNull(lang);

const pickersUiDictionary = getPickersUiDictionary(lang);

const decoderWidget = page.getByTestId(dataTestidDictionary.decoder.id);

const exampleButton = decoderWidget.getByRole("button", {
name: pickersUiDictionary.exampleAlgPicker.label,
});

await exampleButton.click();

await expect(exampleButton).not.toBeVisible();

const closeButton = page.getByRole("button", {
name: pickersUiDictionary.exampleAlgPicker.closeButton.label,
});

await closeButton.click();

await expect(exampleButton).toBeVisible();
await expect(closeButton).not.toBeVisible();
});

test.describe("Can generate a JWT decoder example", () => {
test.beforeEach(async ({ page }) => {
const lang = await getLang(page);
expectToBeNonNull(lang);

const pickersUiDictionary = getPickersUiDictionary(lang);

const decoderWidget = page.getByTestId(dataTestidDictionary.decoder.id);

const exampleButton = decoderWidget.getByRole("button", {
name: pickersUiDictionary.exampleAlgPicker.label,
});

await exampleButton.click();

await expect(exampleButton).not.toBeVisible();

const pickerIndicator = decoderWidget.getByText(
pickersUiDictionary.exampleAlgPicker.defaultValue,
const pickerIndicator = page.getByText(
pickersUiDictionary.exampleAlgPicker.defaultValue
);

await pickerIndicator.click();
Expand All @@ -174,7 +143,7 @@ test.describe("Can generate JWT examples", () => {
const targetToken = DefaultTokensValues[option];

const jwtEditor = decoderWidget.getByTestId(
dataTestidDictionary.decoder.jwtEditor.id,
dataTestidDictionary.decoder.jwtEditor.id
);
const jwtEditorInput = jwtEditor.getByRole("textbox");

Expand Down Expand Up @@ -203,7 +172,7 @@ test.describe("Can generate JWT examples", () => {
});

const secretKeyEditor = decoderWidget.getByTestId(
dataTestidDictionary.decoder.secretKeyEditor.id,
dataTestidDictionary.decoder.secretKeyEditor.id
);
const secretKeyInput = secretKeyEditor.getByRole("textbox");

Expand All @@ -217,9 +186,13 @@ test.describe("Can generate JWT examples", () => {
status: MessageStatusValue.VISIBLE,
});

const encodingValue = await secretKeyEditor
.locator(".react-select__single-value")
.innerText();
const isEncodingSwitchChecked = await page
.getByRole("switch")
.isChecked();

const encodingValue = isEncodingSwitchChecked
? EncodingValues.BASE64URL
: EncodingValues.UTF8;

expect(encodingValue).toBe(symmetricToken.secretEncoding);

Expand All @@ -236,8 +209,9 @@ test.describe("Can generate JWT examples", () => {
status: MessageStatusValue.VISIBLE,
});

const formatValue = await secretKeyEditor
const formatValue = await page
.locator(".react-select__single-value")
.nth(1)
.innerText();

expect(formatValue).toBe(asymmetricToken.publicKeyFormat);
Expand Down Expand Up @@ -270,7 +244,7 @@ test.describe("decode JWTs", () => {
const decoderWidget = page.getByTestId(dataTestidDictionary.decoder.id);

const jwtEditor = decoderWidget.getByTestId(
dataTestidDictionary.decoder.jwtEditor.id,
dataTestidDictionary.decoder.jwtEditor.id
);
const jwtEditorInput = jwtEditor.getByRole("textbox");

Expand Down Expand Up @@ -327,14 +301,14 @@ test.describe("decode JWTs", () => {
});

const secretKeyEditor = decoderWidget.getByTestId(
dataTestidDictionary.decoder.secretKeyEditor.id,
dataTestidDictionary.decoder.secretKeyEditor.id
);
const secretKeyEditorInput = secretKeyEditor.getByRole("textbox");

await secretKeyEditorInput.fill(entryWithUtf8Secret.secret);

await expect(secretKeyEditorInput).toHaveValue(
entryWithUtf8Secret.secret,
entryWithUtf8Secret.secret
);

await checkSecretKeyDecoderEditorStatusBarMessage({
Expand All @@ -343,9 +317,13 @@ test.describe("decode JWTs", () => {
status: MessageStatusValue.VISIBLE,
});

const encodingValue = await secretKeyEditor
.locator(".react-select__single-value")
.innerText();
const isEncodingSwitchChecked = await page
.getByRole("switch")
.isChecked();

const encodingValue = isEncodingSwitchChecked
? EncodingValues.BASE64URL
: EncodingValues.UTF8;

expect(encodingValue).toBe(entryWithUtf8Secret.secretEncoding);

Expand Down Expand Up @@ -388,17 +366,13 @@ test.describe("decode JWTs", () => {
status: MessageStatusValue.VISIBLE,
});

const formatPicker = secretKeyEditor.locator(
".react-select__single-value",
);

await formatPicker.click();
const encodingSwitch = await page.getByTestId(dataTestidDictionary.encoder.switch)
expect(encodingSwitch).toBeVisible()

await page
.getByRole("option", {
name: entryWithBase64urlSecret.secretEncoding,
})
.click();
if (
entryWithBase64urlSecret.secretEncoding === EncodingValues.BASE64URL
)
await encodingSwitch.click();

await secretKeyEditorInput.fill(entryWithBase64urlSecret.secret);

Expand Down Expand Up @@ -451,7 +425,7 @@ test.describe("decode JWTs", () => {
});

const secretKeyEditor = decoderWidget.getByTestId(
dataTestidDictionary.decoder.secretKeyEditor.id,
dataTestidDictionary.decoder.secretKeyEditor.id
);
const secretKeyEditorInput = secretKeyEditor.getByRole("textbox");

Expand All @@ -465,7 +439,7 @@ test.describe("decode JWTs", () => {
status: MessageStatusValue.VISIBLE,
});

const formatValue = await secretKeyEditor
const formatValue = await page
.locator(".react-select__single-value")
.innerText();

Expand Down Expand Up @@ -511,8 +485,8 @@ test.describe("decode JWTs", () => {
status: MessageStatusValue.VISIBLE,
});

const formatPicker = secretKeyEditor.locator(
".react-select__single-value",
const formatPicker = page.locator(
".react-select__single-value"
);

await formatPicker.click();
Expand All @@ -530,7 +504,7 @@ test.describe("decode JWTs", () => {
});

await secretKeyEditorInput.fill(
JSON.stringify(entrywithJwkKey.publicKey, null, 2),
JSON.stringify(entrywithJwkKey.publicKey, null, 2)
);

await checkJwtEditorStatusBarMessage({
Expand Down Expand Up @@ -581,8 +555,8 @@ test.describe("decode JWTs", () => {
status: MessageStatusValue.VISIBLE,
});

const formatPicker = secretKeyEditor.locator(
".react-select__single-value",
const formatPicker = page.locator(
".react-select__single-value"
);

await formatPicker.click();
Expand All @@ -594,7 +568,7 @@ test.describe("decode JWTs", () => {
.click();

await secretKeyEditorInput.fill(
JSON.stringify(entrywithJwkKey.publicKey, null, 2),
JSON.stringify(entrywithJwkKey.publicKey, null, 2)
);

await checkJwtEditorStatusBarMessage({
Expand Down Expand Up @@ -642,10 +616,10 @@ test("Can decode JWTs signed with a non-supported algorithm", async ({
kid: "sig",
};
const expectedDecodedPayload = {
"sub": "1234567890",
"name": "John Doe",
"admin": true,
"iat": 1516239022
sub: "1234567890",
name: "John Doe",
admin: true,
iat: 1516239022,
};

await page.goto(E2E_BASE_URL);
Expand All @@ -656,7 +630,7 @@ test("Can decode JWTs signed with a non-supported algorithm", async ({
const decoderWidget = page.getByTestId(dataTestidDictionary.decoder.id);

const jwtEditor = decoderWidget.getByTestId(
dataTestidDictionary.decoder.jwtEditor.id,
dataTestidDictionary.decoder.jwtEditor.id
);
const jwtEditorInput = jwtEditor.getByRole("textbox");

Expand All @@ -678,22 +652,22 @@ test("Can decode JWTs signed with a non-supported algorithm", async ({

await expect(
decoderWidget.getByTestId(
dataTestidDictionary.decoder.decodedHeader.json.id,
),
dataTestidDictionary.decoder.decodedHeader.json.id
)
).toHaveText(JSON.stringify(expectedDecodedHeader, null, 2), {
useInnerText: true,
});

await expect(
decoderWidget.getByTestId(
dataTestidDictionary.decoder.decodedPayload.json.id,
),
dataTestidDictionary.decoder.decodedPayload.json.id
)
).toHaveText(JSON.stringify(expectedDecodedPayload, null, 2), {
useInnerText: true,
});

const secretKeyEditor = decoderWidget.getByTestId(
dataTestidDictionary.decoder.secretKeyEditor.id,
dataTestidDictionary.decoder.secretKeyEditor.id
);

await expect(secretKeyEditor).not.toBeVisible();
Expand All @@ -711,10 +685,10 @@ test.describe("Decode pieces of JWTs in Base64Url", () => {
jwtPiece:
"eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0",
expectedDecodedOutput: {
"sub": "1234567890",
"name": "John Doe",
"admin": true,
"iat": 1516239022
sub: "1234567890",
name: "John Doe",
admin: true,
iat: 1516239022,
},
},
{
Expand All @@ -737,7 +711,7 @@ test.describe("Decode pieces of JWTs in Base64Url", () => {
const decoderWidget = page.getByTestId(dataTestidDictionary.decoder.id);

const jwtEditor = decoderWidget.getByTestId(
dataTestidDictionary.decoder.jwtEditor.id,
dataTestidDictionary.decoder.jwtEditor.id
);
const jwtEditorInput = jwtEditor.getByRole("textbox");

Expand All @@ -759,20 +733,20 @@ test.describe("Decode pieces of JWTs in Base64Url", () => {

await expect(
decoderWidget.getByTestId(
dataTestidDictionary.decoder.decodedHeader.json.id,
),
dataTestidDictionary.decoder.decodedHeader.json.id
)
).toHaveText(JSON.stringify(expectedDecodedOutput, null, 2), {
useInnerText: true,
});

await expect(
decoderWidget.getByTestId(
dataTestidDictionary.decoder.decodedPayload.json.id,
),
dataTestidDictionary.decoder.decodedPayload.json.id
)
).toBeEmpty();

const secretKeyEditor = decoderWidget.getByTestId(
dataTestidDictionary.decoder.secretKeyEditor.id,
dataTestidDictionary.decoder.secretKeyEditor.id
);

await expect(secretKeyEditor).not.toBeVisible();
Expand Down
Loading