Skip to content

Commit f073d12

Browse files
authored
Merge pull request #701 from integer32llc/css-modules
2 parents ffb8746 + 138d28a commit f073d12

File tree

92 files changed

+3040
-2135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3040
-2135
lines changed

ci/workflows.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,10 @@ workflows:
336336
run: >-
337337
yarn --cwd ui/frontend/ test:lint
338338
339+
- name: "Style"
340+
run: >-
341+
yarn --cwd ui/frontend/ test:style
342+
339343
- name: "Build frontend"
340344
run: >-
341345
yarn --cwd ui/frontend/ run build:production

tests/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ GEM
1818
diff-lcs (1.4.4)
1919
launchy (2.5.0)
2020
addressable (~> 2.7)
21-
mini_mime (1.0.2)
21+
mini_mime (1.0.3)
2222
mini_portile2 (2.5.0)
23-
nokogiri (1.11.1)
23+
nokogiri (1.11.2)
2424
mini_portile2 (~> 2.5.0)
2525
racc (~> 1.4)
2626
public_suffix (4.0.6)

tests/spec/features/assistance_spec.rb

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313
EOF
1414
click_on("Build")
1515

16-
within('.output-warning') do
16+
within(:output, :warning) do
1717
click_on("add a main function")
1818
end
1919

20-
within('.editor') do
21-
expect(editor).to have_line 'println!("Hello, world!")'
22-
end
20+
expect(editor).to have_line 'println!("Hello, world!")'
2321
end
2422

2523
scenario "using an unstable feature offers adding the feature flag" do
@@ -29,13 +27,11 @@
2927
EOF
3028
click_on("Build")
3129

32-
within('.output-stderr') do
30+
within(:output, :stderr) do
3331
click_on("add `#![feature(abi_avr_interrupt)]`")
3432
end
3533

36-
within('.editor') do
37-
expect(editor).to have_line '#![feature(abi_avr_interrupt)]'
38-
end
34+
expect(editor).to have_line '#![feature(abi_avr_interrupt)]'
3935
end
4036

4137
scenario "using a type that hasn't been imported offers importing it" do
@@ -44,13 +40,11 @@
4440
EOF
4541
click_on("Build")
4642

47-
within('.output-stderr') do
43+
within(:output, :stderr) do
4844
click_on("use std::collections::HashMap;")
4945
end
5046

51-
within('.editor') do
52-
expect(editor).to have_line 'use std::collections::HashMap;'
53-
end
47+
expect(editor).to have_line 'use std::collections::HashMap;'
5448
end
5549

5650
scenario "triggering a panic offers enabling backtraces" do
@@ -61,11 +55,11 @@
6155
EOF
6256
click_on("Run")
6357

64-
within('.output-stderr') do
58+
within(:output, :stderr) do
6559
click_on("run with `RUST_BACKTRACE=1` environment variable to display a backtrace")
6660
end
6761

68-
within('.output-stderr') do
62+
within(:output, :stderr) do
6963
expect(page).to have_content("stack backtrace:")
7064
end
7165
end

tests/spec/features/automatic_primary_action_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
EOF
1414
click_on("Run")
1515

16-
within('.output-stdout') do
16+
within(:output, :stdout) do
1717
expect(page).to have_content 'Hello, world'
1818
end
1919
end
@@ -27,7 +27,7 @@
2727
EOF
2828
click_on("Build")
2929

30-
within('.output-stderr') do
30+
within(:output, :stderr) do
3131
expect(page).to have_content 'function is never used: `main`'
3232
end
3333
end
@@ -47,7 +47,7 @@
4747
EOF
4848
click_on("Build")
4949

50-
within('.output-stderr') do
50+
within(:output, :stderr) do
5151
expect(page).to have_content 'function is never used: `main`'
5252
end
5353
end
@@ -59,7 +59,7 @@
5959
EOF
6060
click_on("Test")
6161

62-
within('.output-stdout') do
62+
within(:output, :stdout) do
6363
expect(page).to have_content 'running 1 test'
6464
expect(page).to have_content 'test awesome ... ok'
6565
expect(page).to have_content 'test result: ok'
@@ -79,7 +79,7 @@
7979
EOF
8080
click_on("Test")
8181

82-
within('.output-stdout') do
82+
within(:output, :stdout) do
8383
expect(page).to have_content 'running 1 test'
8484
expect(page).to_not have_content 'Running in main'
8585
end
@@ -93,7 +93,7 @@
9393
EOF
9494
click_on("Run")
9595

96-
within('.output-stdout') do
96+
within(:output, :stdout) do
9797
expect(page).to have_content 'Running in main'
9898
end
9999
end
@@ -106,7 +106,7 @@
106106
EOF
107107
click_on("Build")
108108

109-
within('.output-stderr') do
109+
within(:output, :stderr) do
110110
expect(page).to have_content 'function is never used: `arbitrary_code`'
111111
end
112112
end

tests/spec/features/backtrace_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
context "backtraces are enabled" do
1414
before do
1515
in_advanced_options_menu { choose 'enabled' }
16-
within('.header') { click_on("Run") }
16+
within(:header) { click_on("Run") }
1717
end
1818

1919
scenario "a backtrace is shown" do
20-
within('.output-stderr') do
20+
within(:output, :stderr) do
2121
expect(page).to have_content 'stack backtrace:'
2222
expect(page).to have_content 'rust_begin_unwind'
2323
end
2424
end
2525

2626
scenario "filenames link to that line of code" do
27-
within('.output-stderr') do
27+
within(:output, :stderr) do
2828
expect(page).to have_link('main.rs:2')
2929
expect(page).to have_link('main.rs:6')
3030
end
@@ -33,11 +33,11 @@
3333

3434
context "backtraces are disabled" do
3535
before do
36-
within('.header') { click_on("Run") }
36+
within(:header) { click_on("Run") }
3737
end
3838

3939
scenario "the backtrace suggestion is a link" do
40-
within('.output-stderr') do
40+
within(:output, :stderr) do
4141
expect(page).to have_link(text: /Run with .* a backtrace/i)
4242
end
4343
end

tests/spec/features/compilation_modes_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
in_mode_menu { click_on("Debug") }
1515
click_on("Run")
1616

17-
within('.output-stdout') do
17+
within(:output, :stdout) do
1818
expect(page).to have_content 'Compiling in debug mode'
1919
expect(page).to_not have_content 'Compiling in release mode'
2020
end
@@ -24,7 +24,7 @@
2424
in_mode_menu { click_on("Release") }
2525
click_on("Run")
2626

27-
within('.output-stdout') do
27+
within(:output, :stdout) do
2828
expect(page).to_not have_content 'Compiling in debug mode'
2929
expect(page).to have_content 'Compiling in release mode'
3030
end

tests/spec/features/compilation_targets_spec.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@
2222

2323
scenario "choosing to run the code" do
2424
in_build_menu { click_on(build_button: "Run") }
25-
within('.output-stdout') do
25+
within(:output, :stdout) do
2626
expect(page).to have_content 'Hello, world!'
2727
end
2828
end
2929

3030
scenario "choosing to build the code" do
3131
in_build_menu { click_on(build_button: "Build") }
32-
within('.output-stderr') do
32+
within(:output, :stderr) do
3333
expect(page).to have_content 'function is never used: `main`'
3434
end
3535
end
3636

3737
scenario "choosing to test the code" do
3838
in_build_menu { click_on(build_button: "Test") }
39-
within('.output-stdout') do
39+
within(:output, :stdout) do
4040
expect(page).to have_content "panicked at 'assertion failed: false'"
4141
end
4242
end
@@ -50,7 +50,7 @@
5050
scenario "compiling to assembly" do
5151
in_build_menu { click_on("assembly") }
5252

53-
within('.output-code') do
53+
within(:output, :code) do
5454
# We demangle the symbols
5555
expect(page).to have_content 'playground::main:'
5656

@@ -67,7 +67,7 @@
6767
scenario "compiling to assembly" do
6868
in_build_menu { click_on("assembly") }
6969

70-
within('.output-code') do
70+
within(:output, :code) do
7171
# We demangle the symbols
7272
expect(page).to have_content 'playground::main:'
7373

@@ -79,7 +79,7 @@
7979
scenario "compiling to LLVM IR" do
8080
in_build_menu { click_on("LLVM IR") }
8181

82-
within('.output-code') do
82+
within(:output, :code) do
8383
expect(page).to have_content 'ModuleID'
8484
expect(page).to have_content 'target datalayout'
8585
expect(page).to have_content 'target triple'
@@ -89,7 +89,7 @@
8989
scenario "compiling to MIR" do
9090
in_build_menu { click_on("MIR") }
9191

92-
within('.output-result') do
92+
within(:output, :result) do
9393
expect(page).to have_content 'StorageLive'
9494
expect(page).to have_content 'StorageDead'
9595
end
@@ -102,15 +102,15 @@
102102

103103
in_build_menu { click_on("HIR") }
104104

105-
within('.output-result') do
105+
within(:output, :result) do
106106
expect(page).to have_content 'fn demo() -> /*impl Trait*/ { 42 }'
107107
end
108108
end
109109

110110
scenario "compiling to WebAssembly" do
111111
in_build_menu { click_on("WASM") }
112112

113-
within('.output-code') do
113+
within(:output, :code) do
114114
expect(page).to have_content '(module'
115115
expect(page).to have_content '(block'
116116
end
@@ -122,7 +122,7 @@
122122
scenario "it shows the compilation error" do
123123
in_build_menu { click_on("MIR") }
124124

125-
within('.output-stderr') do
125+
within(:output, :stderr) do
126126
expect(page).to have_content 'an unclosed delimiter'
127127
end
128128
end

tests/spec/features/editions_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
in_advanced_options_menu { choose '2015' }
1515
click_on("Run")
1616

17-
within('.output-stderr') do
17+
within(:output, :stderr) do
1818
expect(page).to have_content 'unused variable: `async`'
1919
expect(page).to_not have_content 'expected identifier, found keyword `async`'
2020
end
@@ -24,7 +24,7 @@
2424
in_advanced_options_menu { choose '2018' }
2525
click_on("Run")
2626

27-
within('.output-stderr') do
27+
within(:output, :stderr) do
2828
expect(page).to have_content 'expected identifier, found keyword `async`'
2929
expect(page).to_not have_content 'unused variable: `async`'
3030
end

tests/spec/features/editor_types_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
click_on("Run")
1515

16-
within('.output-stdout') do
16+
within(:output, :stdout) do
1717
expect(page).to have_content 'simple editor'
1818
end
1919
end

tests/spec/features/highlighting_error_output_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@
55
before do
66
visit '/'
77
editor.set(code)
8-
within('.header') { click_on("Run") }
8+
within(:header) { click_on("Run") }
99
end
1010

1111
scenario "errors are highlighted" do
12-
within('.output-stderr') do
12+
within(:output, :stderr) do
1313
expect(page).to have_css '.error', text: '1 type argument but 2 type arguments were supplied'
1414
expect(page).to have_css '.error', text: 'aborting due to 2 previous errors'
1515
expect(page).to have_css '.error', text: /Could not compile `playground`/i
1616
end
1717
end
1818

1919
scenario "error locations are links" do
20-
within('.output-stderr') do
20+
within(:output, :stderr) do
2121
expect(page).to have_link('src/main.rs')
2222
end
2323
end
2424

2525
scenario "github see-issues are links" do
26-
within('.output-stderr') do
26+
within(:output, :stderr) do
2727
expect(page).to have_link('see issue #23416 <https://github.com/rust-lang/rust/issues/23416>', href: 'https://github.com/rust-lang/rust/issues/23416')
2828
end
2929
end
3030

3131
scenario "error codes link to the error page" do
32-
within('.output-stderr') do
32+
within(:output, :stderr) do
3333
expect(page).to have_link('E0107', href: /error-index.html#E0107/)
3434
end
3535
end

tests/spec/features/highlighting_mir_output_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
end
1313

1414
scenario "error locations are links" do
15-
within('.output-mir') do
15+
within(:output, :mir) do
1616
click_link('src/main.rs:4:14: 4:19', match: :first)
1717
end
1818
expect(editor).to have_highlighted_text('a + b')

tests/spec/features/multiple_channels_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
in_channel_menu { click_on("Stable") }
1515
click_on("Run")
1616

17-
within('.output-stdout') do
17+
within(:output, :stdout) do
1818
expect(page).to have_content 'rustc'
1919
expect(page).to_not have_content 'beta'
2020
expect(page).to_not have_content 'nightly'
@@ -25,7 +25,7 @@
2525
in_channel_menu { click_on("Beta") }
2626
click_on("Run")
2727

28-
within('.output-stdout') do
28+
within(:output, :stdout) do
2929
expect(page).to have_content 'rustc'
3030
expect(page).to have_content 'beta'
3131
expect(page).to_not have_content 'nightly'
@@ -36,7 +36,7 @@
3636
in_channel_menu { click_on("Nightly") }
3737
click_on("Run")
3838

39-
within('.output-stdout') do
39+
within(:output, :stdout) do
4040
expect(page).to have_content 'rustc'
4141
expect(page).to_not have_content 'beta'
4242
expect(page).to have_content 'nightly'

tests/spec/features/sharing_with_others_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
in_mode_menu { click_on("Release") }
1717
in_advanced_options_menu { choose("2018") }
1818

19-
within('.header') { click_on 'Share' }
19+
within(:header) { click_on 'Share' }
2020

2121
# Save the links before we navigate away
2222
perma_link = find_link("Permalink to the playground")[:href]

0 commit comments

Comments
 (0)