Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion src/core/capture/CaptureFlow.res
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ let parseCubeInput = (input, selectedFormat: NotationOutput.notationFormat) => {
| None =>
Unreadable({
message: isToken
? "Invalid Orbit64 state token. Only Orbit64 V2 color state tokens of 2×2–15×15 cubes are supported."
? String.length(trimmed) == 43
? "Orbit64 V1 is no longer supported"
: "Invalid Orbit64 state token. Only Orbit64 V2 color state tokens of 2×2–15×15 cubes are supported."
: format == Wrg
? "Invalid facelets. Must be 6 space-separated blocks of equal, perfect-square length (9 for 3×3, 25 for 5×5, ...) using colors W, O, G, R, B, Y, in U R F D L B order."
: "Invalid facelets. Must be 6 space-separated blocks of equal, perfect-square length (9 for 3×3, 25 for 5×5, ...) using letters U, R, F, D, L, B (the face each sticker matches when solved), in U R F D L B order.",
Expand Down
3 changes: 2 additions & 1 deletion test/cube/notation/orbit64Token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ describe('Orbit64 token in the UI layer, sizes 2 to 15', () => {
expect(decodeOrbit64Token(v1Five)).toBeNull()
const refused = parseCubeInput(v1Five, 'urf')
expect(refused.ok).toBe(false)
if (!refused.ok) expect(refused.message).toContain('2×2–15×15')
if (!refused.ok)
expect(refused.message).toBe('Orbit64 V1 is no longer supported')
expect(decodeOrbit64Token('A'.repeat(7))).toBeNull()
expect(encodeOrbit64Token('UUUU RRRR FFFF DDDD LLLL')).toBeNull()
const sixteen = ['U', 'R', 'F', 'D', 'L', 'B']
Expand Down