This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'html_validation' | |
include PageValidations | |
HaveValidHTML.show_html_in_failures = true | |
HTMLValidation.ignored_attribute_errors = ['moznomarginboxes', 'mozdisallowselectionprint'] | |
module HTMLValidationSession | |
def visit(url) | |
result = super(url) | |
if driver.response_headers['Content-Type'].include?('text/html') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.feature 'Post react component test' do | |
before(:each) do | |
post_json(render_component_path, { | |
component: 'Post', | |
props: { title: title } | |
}.to_json) | |
end | |
context 'with a title' do | |
let(:title) { 'Hello World' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= react_component(“Post”, {title: “Hello World”}, {camelize_props: true}) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-react-class="Post" data-react-props="{"title":"Hello World"}"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RenderComponentsController < ActionController::Base | |
def create | |
render component: params[:component], props: params[:props] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error in crecto_test.rb:28: instantiating 'Repo:Module#all(Post.class)' | |
Repo.all Post | |
^~~ | |
in lib/crecto/src/crecto/repo.cr:76: instantiating 'add_preloads(Array(Post), Post.class, Array(NamedTuple(symbol: Symbol, query: Crecto::Repo::Query | Nil)))' | |
add_preloads(results, queryable, preloads) | |
^~~~~~~~~~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "json" | |
class RouteJSON | |
JSON.mapping({ | |
verb: String, | |
controller: String, | |
action: String, | |
pipeline: String, | |
scope: String, | |
uri_pattern: String, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('fattable/fattable.js'); | |
/* | |
* This variable is used to keep the scroll position when the live view navigation changes. | |
* This is useful for modals. | |
*/ | |
let keepScroll = {}; | |
export default { |
OlderNewer