inferno_core 0.3.0 → 0.3.3

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: d2c456ff669a788bd2a8929015f4498fd15a2bd88a8668761581b75e1bcdceb5
4
- data.tar.gz: a6d1d9de9471fa6e924820ec08b52ec1bf64e5f877e076e371d01ddc8222b0c3
3
+ metadata.gz: 884936b347ee4892198605b7ae408f3889e74bed0a4e33b6ec2a5ee7ed3adcd9
4
+ data.tar.gz: b0e30f11313a6a5b690e96a08fdb083ba9d85b94b512ec105fce75631802f0cb
5
5
  SHA512:
6
- metadata.gz: 91594cc9761d5edd625f706b46f52308b18eae2b5181dec45028e31d0eac447d7196b8ec5c1b3b09e6a63a7ed7e8436e085934ac05217991b847603a42d0f3a3
7
- data.tar.gz: 3d3d36c97e63e9f4434a9c4a448d9a7095a6c0fc36b9473b16aaff09c3eb9b77aca6f47527883c3a89d62234044fae3b434e0cdd9f8e34af5cc9983daa70032e
6
+ metadata.gz: 13b145c224d9b762b2ae8019048d6775dea2bd0ce47abcb3450959e3148224a523914eaf06b480a25d1a065c449e32b9c64ed83056118b611e8be2c4d9640755
7
+ data.tar.gz: 78a7bd5437739a2e1e7384dc500d46a99c8795f03638023839fdf4c24131fcc9a6ba8ca1ec507cd0b0bd559d8c9741e07ce2c6e3b04954b72bf6ba4ce7158805
@@ -1,6 +1,9 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
+ <!-- Use the highest supported document mode of Internet Explorer -->
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+
4
7
  <meta charset="utf-8" />
5
8
  <link rel="icon" href="<%= Inferno::Application['public_path'] %>/favicon.ico" />
6
9
  <meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -26,6 +29,11 @@
26
29
  Learn how to configure a non-root public URL by running `npm run build`.
27
30
  -->
28
31
  <style>
32
+ @media print {
33
+ .no-print {
34
+ display: none;
35
+ }
36
+ }
29
37
  .wrapper {
30
38
  height: 100%;
31
39
  display: flex;
@@ -46,7 +54,7 @@
46
54
  <noscript>You need to enable JavaScript to run this app.</noscript>
47
55
  <div class='wrapper'>
48
56
  <% if File.exist? (File.join(Dir.pwd, 'config', 'banner.html.erb')) %>
49
- <div class='banner'><%= ERB.new(File.read(File.join(Dir.pwd, 'config', 'banner.html.erb'))).result %></div>
57
+ <div class='banner no-print'><%= ERB.new(File.read(File.join(Dir.pwd, 'config', 'banner.html.erb'))).result %></div>
50
58
  <% end %>
51
59
  <div class='app' id="root"></div>
52
60
  </div>
@@ -36,8 +36,10 @@ module Inferno
36
36
  get '/version', to: ->(_env) { [200, {}, [{ 'version' => Inferno::VERSION.to_s }.to_json]] }, as: :api_version
37
37
  end
38
38
 
39
- get '/', to: ->(_env) { [200, {}, [client_page]] }
40
- get '/test_sessions/:id', to: ->(_env) { [200, {}, [client_page]] }
39
+ # Should not need Content-Type header but GitHub Codespaces will not work without them.
40
+ # This could be investigated and likely removed if addressed properly elsewhere.
41
+ get '/', to: ->(_env) { [200, { 'Content-Type' => 'text/html' }, [client_page]] }
42
+ get '/test_sessions/:id', to: ->(_env) { [200, { 'Content-Type' => 'text/html' }, [client_page]] }
41
43
 
42
44
  Inferno.routes.each do |route|
43
45
  cleaned_id = route[:suite].id.gsub(/[^a-zA-Z\d\-._~]/, '_')
@@ -67,7 +67,9 @@ module Inferno
67
67
  self.class.named_requests_used.map do |request_name|
68
68
  request_alias = self.class.config.request_name(request_name)
69
69
  request = requests_repo.find_named_request(test_session_id, request_alias)
70
- raise StandardError, "Unable to find '#{request_alias}' request" if request.nil?
70
+ if request.nil?
71
+ raise Exceptions::SkipException, "Request `#{request_alias}` was not made in a previous test as expected."
72
+ end
71
73
 
72
74
  requests << request
73
75
  end
@@ -60,7 +60,7 @@ module Inferno
60
60
  end
61
61
 
62
62
  def optional?
63
- runnable.optional?
63
+ runnable.nil? || runnable.optional?
64
64
  end
65
65
 
66
66
  def required?