mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* 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
27 lines
712 B
JavaScript
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,
|
|
})
|
|
})
|
|
})
|