design_system 0.13.0 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b61d6a51f578ccedbe93a430fa8b94388a78b870eab9fc271088750e9c66fca3
4
- data.tar.gz: 5dfe10f8b92f07a277716996c7d1c6378ce80f331aaaf29f474e0e3c2ee24c4f
3
+ metadata.gz: b15fc1d9069ff953d3c5baf06ed285124f3180a8f94f1d87f833e775f503a6b6
4
+ data.tar.gz: 3c0bef7989f9c981c1fbbcd7f70fbd975fc066bdc9d28eba2105f8b3f68876fa
5
5
  SHA512:
6
- metadata.gz: 1a9431fa199c5e2e655029c0bb902de07ebd580668b5eb891cf6a08e9f0c2d00795498ca03f73a936db36255eec48df0cc0bee61e49c6d5ac9cfca8935c44a66
7
- data.tar.gz: 5e6635813ca0e9d64a7854f1b276733fa00bd6c767dd652c39f79bc8f40fe3d0b2519fca32907592cd8943d6ffb9beabd0d2bd5b778092a0d68c11468dcc78e1
6
+ metadata.gz: 470212f3e39cb92659245dea5de02e076dde7850da074aa285bf12ea4931a318f056eba3385297d540cd9a3a2ee52edba5966528e89d2c76faab808ca107b952
7
+ data.tar.gz: 93d919f3d60f766ef8fb9e3d5fd0dddc3ed8407364e2b5336a55dc9c7dbaf6902b1f25be633bd1cc2c9398a923a2e793fcd39fe17150f6e8c9416d9fb004f673
@@ -1,3 +1,3 @@
1
1
  module DesignSystem
2
- VERSION = '0.13.0'.freeze
2
+ VERSION = '0.13.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: design_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filis Liu
@@ -462,7 +462,6 @@ files:
462
462
  - lib/design_system/nhsuk/builders/elements/breadcrumbs.rb
463
463
  - lib/design_system/nhsuk/builders/fixed_elements.rb
464
464
  - lib/design_system/nhsuk/builders/grid.rb
465
- - lib/design_system/nhsuk/builders/grid_test.rb
466
465
  - lib/design_system/nhsuk/builders/heading.rb
467
466
  - lib/design_system/nhsuk/builders/inset_text.rb
468
467
  - lib/design_system/nhsuk/builders/link.rb
@@ -480,7 +479,7 @@ files:
480
479
  - lib/tasks/design_system_tasks.rake
481
480
  - lib/tasks/govuk.rake
482
481
  - lib/tasks/nhsuk.rake
483
- - public/design_system/static/design_system-0.12.0/design_system.js
482
+ - public/design_system/static/design_system-0.13.2/design_system.js
484
483
  - public/design_system/static/govuk-frontend-5.11.1/fonts/bold-affa96571d-v2.woff
485
484
  - public/design_system/static/govuk-frontend-5.11.1/fonts/bold-b542beb274-v2.woff2
486
485
  - public/design_system/static/govuk-frontend-5.11.1/fonts/light-94a07e06a1-v2.woff2
@@ -1,109 +0,0 @@
1
- require 'test_helper'
2
-
3
- module DesignSystem
4
- module Nhsuk
5
- module Builders
6
- # This tests the nhsuk grid builder
7
- class GridTest < ActionView::TestCase
8
- include DesignSystemHelper
9
-
10
- setup do
11
- @brand = 'nhsuk'
12
- @controller.stubs(:brand).returns(@brand)
13
- end
14
-
15
- test 'should fail if width is specified' do
16
- assert_raises(ArgumentError) do
17
- ds_grid do |grid|
18
- grid.add_column do
19
- 'Test content'
20
- end
21
- end
22
- end
23
- end
24
-
25
- test 'should fail if given width is not supported' do
26
- error = assert_raises(ArgumentError) do
27
- ds_grid do |grid|
28
- grid.add_column(:nonsense_width) do
29
- 'Test content'
30
- end
31
- end
32
- end
33
- assert_equal 'Unknown grid width: nonsense_width', error.message
34
- end
35
-
36
- test 'should render block of content' do
37
- @output_buffer = ds_grid do |grid|
38
- grid.add_column(:two_thirds) do
39
- content_tag(:p, 'Test content')
40
- end
41
- end
42
-
43
- assert_select "div.#{brand}-grid-row" do
44
- assert_select "div.#{brand}-grid-column-two-thirds" do
45
- assert_select 'p', text: 'Test content'
46
- end
47
- end
48
- end
49
-
50
- test 'should render multiple columns' do
51
- @output_buffer = ds_grid do |grid|
52
- grid.add_column(:two_thirds) do
53
- content_tag(:p, 'Two thirds content')
54
- end
55
- grid.add_column(:one_third) do
56
- content_tag(:p, 'One third content')
57
- end
58
- end
59
- assert_select "div.#{brand}-grid-row" do
60
- assert_select "div.#{brand}-grid-column-two-thirds" do
61
- assert_select 'p', text: 'Two thirds content'
62
- end
63
- assert_select "div.#{brand}-grid-column-one-third" do
64
- assert_select 'p', text: 'One third content'
65
- end
66
- end
67
- end
68
-
69
- test 'should raise an error if total width exceeds 100%' do
70
- error = assert_raises(ArgumentError) do
71
- ds_grid do |grid|
72
- grid.add_column(:two_thirds) do
73
- content_tag(:p, 'Two thirds content')
74
- end
75
- grid.add_column(:two_thirds) do
76
- content_tag(:p, 'Two thirds content')
77
- end
78
- end
79
- end
80
- assert_equal 'Total grid width exceeds 100%', error.message
81
- end
82
-
83
- test 'should render nested grid' do
84
- @output_buffer = ds_grid do |row|
85
- row.add_column(:two_thirds) do
86
- content_tag(:p, 'Outer two thirds content') +
87
- ds_grid do |inner_row|
88
- inner_row.add_column(:two_thirds) do
89
- content_tag(:p, 'Inner two thirds content')
90
- end
91
- end
92
- end
93
- end
94
-
95
- assert_select "div.#{brand}-grid-row" do
96
- assert_select "div.#{brand}-grid-column-two-thirds" do
97
- assert_select 'p', text: 'Outer two thirds content'
98
- assert_select "div.#{brand}-grid-row" do
99
- assert_select "div.#{brand}-grid-column-two-thirds" do
100
- assert_select 'p', text: 'Inner two thirds content'
101
- end
102
- end
103
- end
104
- end
105
- end
106
- end
107
- end
108
- end
109
- end