Rails System Testing, no selector available for assert_selector - ruby-on-rails

I am getting into rails system testing and trying to use assert_selector to find an edited text. Here is the problem, the text is not wrapped in a CSS selector, it is just plain text on the page (please check the screenshot).
Is there a better assertion to find the edited text on the page, or is my page just poorly optimized because the content is not wrapped in a CSS selector?
Surely there is a way to still search the page and find this edited text?

Related

Why is there a line break in my email preview text in iOS Mail app?

I have created a few HTML emails using Foundation for Emails. I am seeing a strange behavior in the iOS Mail app consistently with every email I create. The preview text has a line break in it for some reason. Here's what I mean:
Instead of showing the entire preview text as a continuous string, it's putting "Thanks" on it's own line.
This is the code for the preview text:
<span class="preheader" style="color:#f3f3f3;display:none!important;font-size:1px;line-height:1px;max-height:0;max-width:0;mso-hide:all!important;opacity:0;overflow:hidden;visibility:hidden">Thanks for your order! Your order number is 1538. Please save this order confirmation email for your records.</span>
I can't figure out why the preview text is displaying this way. Does anyone have any clue?
Even if I remove the preview text completely, the preview still displays with a line break. For example, if the .preheader section is empty, then iOS displays the preview text as:
Thanks
For Your...
I am very confused. Does anyone have any idea what could be causing this?
One other thing that might be relevant, besides the styles on the .preheader tag, there is also these styles on the body, which is the parent of the .preheader tag.
-moz-box-sizing:border-box;-ms-text-size-adjust:100%;-webkit-box-sizing:border-box;-webkit-text-size-adjust:100%;Margin:0;box-sizing:border-box;color:#0a0a0a;font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;min-width:100%;padding:0;text-align:left;width:100%!important
The emails are being sent through BigCommerce. It's an issue with how BigCommerce encodes their emails. BigCommerce adds linebreaks to limit line length, but not properly using 'quoted-printable' encoding to ensure continuous lines remain continuous. Frustrating, but at least there is an explanation. I sent them an explanation so we'll see if it ever gets fixed.

Hyper link issue inside ICS file

I have created an ICS file. And it has a hyperlink for a text. In outlook 2013, it is working fine. But in other email clients, it is showing me the full URL along with the hyper linked text. Refer the below screenshots.
MAC-OS-Laptop
Outlook2016
This is only working fine in Outlook2013. Refer this screenshot.
Outlook2013
Please help to resolve this issue.
Thanks in advance.
Venil, Not all calendar or email applications will cope with html in the event description. Of course some choose to, however the specification tends to indicate that the DESCRIPTION is meant to be 'plain' text. Some applications will convert a plain url (no hyperlink) to a clickable one. It may be safer and cleaner to use a plain url rather than the html hyperlink. See the RFC5545 specification links:
The DESCRIPTION definition in the RFC5545 specification says it is of type text. A text type is defined as human readable. The spec allows for an ALTREP that may contain html. Putting all that together implies that the DESCRIPTION field is not intended to have html.

CKEditor: how to get clcikable links

I’ve followed Michael Harti Ruby on Rails tutorial and created ruby on rails app.
I’ve added some functionality as formatted text (link below) by implementing SKEditor.
ruby on rails: text filed formatting
So, right now text formatting is fine but the links are not clickable.
I mean, when users type for ex, http:://www/yahoo.com, they could not just click on it and go to yahoo.page. - it is just text instead of links.
I use
https://github.com/tsechingho/ckeditor-rails
and followed installation until Advanced Usage
to get formatted text.
How to make link clickable?
Advanced Usage said
“Add your app/assets/javascripts/ckeditor/config.js.coffee like..”
But right now, in my frame I have only app/assets/stylesheets…..
I create folder ckeditor and put file contents.css.scss and other files as well on it follow Advance Usage CKEditor(link above).
Is it right approach or should I do something differently?
But after those adding, I still have no clickable links……
How to get clcikable links using CKEditor
Thanks.
Notice the image below, I have first selected a text then clicked on link sign present at the second row of toolbar and finally added a link.
hope this helps

Unable to customize specflow report with screenshots path

I am trying to generate specflow mstestexecution report with the screenshots path mentioned as link. I made use of Console.Writeline() to mention the screenshots path but its getting dispalyed as text in the report. Please provide your inputs on the same.
The HTML report sees everything as plain text even if you use HTML tags. This is by design. You can change the behaviour of specflow.exe yourself, it is an open source project on GitHub.
When you don't want to dive to deep into that, you need a more ugly work around: You could consider to tag your links with another token (like {img} instead of ) and than search and replace in the .html file for all {img} to for example.

textarea that was using plain text with option of markdown or textile filter now needs images

My clients can enter text into textarea and have the option to use the markdown or textile filters for each textarea.
With some models (articles, newsletter, etc) they can upload images to associate with the model, which are displayed in a column next to the text of the text.
This worked fine for a while, but they have now told me that the want the ability to put the images INSIDE the text a specific positions.
What is the best way to go about this? I suppose I may have to use a wysiwyg for this, but would rather not. And how would this work for images which are not yet on the server, etc?
There are different directions you could go to:
Follow the path of Confluence, which released in their new version 4.0 a rewritten WYSIWYG editor, that stores as source XHTML, not any more wiki markup.
Leads to an update of all pages when migrating.
Was pretty difficult to implement. I do not know if they use any more the TinyMCE editor of previous versions.
Follow the format of markdown how to include images in your source format. So by typing: This is my text. !image.png! The inline image shows ..., you will have a format that is understandable.
You have to expand the interpretation, so that the !<filename>! will be mapped that is stored locally anyway.
You have to add clear-up dialogs for the images that are yet not known, so doing bulk uploads ...
You may provide a drag area on your view, that then shows the filename and gives examples how to include that inside the text area.
Go for something in between, by allowing users to drag images inside the editor. There are plugins written in Javascript that allow you to do that, e.g. UI Draggable for jquery
I have no idea how to integrate that image inside the text editor. Overlay?
So the second one is the easiest, and the user knows how to do it. If they only decide that this is the solution they want to have :-)
I think I'm going to use a combination of #2 above, and the Liquid templating engine.

Resources