Files
Jonathan Adeline 97d3afd59a feat: add configurable responsive breakpoints (#5738)
* first commit

* feat: add configurable breakpoints styles and update SCSS imports

* change icon and menu position

* fixings and improvments

* add changelog

* lint

* generate dynamic media queries from elementType

* store responsive breakpoints in a JSON field

* initialize default breakpoints when creating applications

* confirm breakpoint settings saves

* lint

* fix: address configurable breakpoint review feedback

* fix: address responsive breakpoint feedback
2026-08-26 16:07:08 +04:00

27 lines
712 B
JavaScript

import { describe, expect, test } from 'vitest'
import {
LEGACY_BUILDER_BREAKPOINTS,
getBuilderBreakpoints,
} from '@baserow/modules/builder/utils/breakpoints'
describe('builder breakpoints', () => {
test('uses legacy breakpoints when they are not explicitly configured', () => {
expect(
getBuilderBreakpoints({
breakpoints: {},
})
).toBe(LEGACY_BUILDER_BREAKPOINTS)
expect(getBuilderBreakpoints({})).toBe(LEGACY_BUILDER_BREAKPOINTS)
})
test('uses explicitly configured breakpoints', () => {
const builder = { breakpoints: { mobile: 640, tablet: 1024 } }
expect(getBuilderBreakpoints(builder)).toEqual({
mobile: 640,
tablet: 1024,
})
})
})