Subscribe to eNewsletter - bdd

How do I write code in c# for the below Task on
The BDD below- tests to prove that login and register links appear on site
After i used Specflow I have a skeleton code being generated, but then how do I add code? Any Nunit? Story Q, CAN generate code to complete a green test pass?
As a Member
I want to be able to subscribe to eNewsletters
So that I am regularly informed about developments in the superannuation industry
Acceptance Criteria
Background: I am a Super website Member. Subscribing to enewsletters requires the member to log into Member online section (=MOL)
WHEN I am on the eNewsletters page
THEN text will be displayed to explain how to subscribe to eNewsletters
WHEN I am on the eNewsletters page
THEN there will be an option to log into MOL and to register for MOL

Not trying to be rude, but do you have any experience/knowledge about Specflow/BDD? Because, looking at the question, it seems like you don't. Therefore I think it would benefit you much much more if you would look into that first, before asking someone to write a test for you (what you're basicly doing here). There is enough documentation and examples available from which you can get the answer to this question. Follow a short tutorial on YouTube or something like that to get you started.

Specflow allows you to edit an xxx.feature file containing your specification in Given, when and then statements. When you save that file it generates an xxx.feature.cs file just like WinForms generates xxx.designer.cs files.
Should you use "Navigate to" (F12) in VS in the feature file and it will give you the option to copy a template method for you to implement in your own code. These can simply be added to any file in your project that is public and marked with the [Binding] Attribute.
Further details can be found here http://www.specflow.org/specflownew/ProjectSetupGuide.html

Related

Connect to Twilio Autopilot with Dynamic Stylesheet

My use case requires me to have users pick their desired voice for the autopilot questions. The thing is there doesn't seem to be a way of Dynamically choosing the Stylesheet of the Assistant (without actually updating the resource).
My perfect scenario would be something like:
connect.autopilot(SID, {voice: 'Polly.Joanna'})
I've also checked in The JSON Encoded Actions Schema but it doesn't seem to have a way of changing the voice of a specific Autopilot Action like this:
"say": {
"say_voice": "Polly.Joanna",
"speech: "Example speech"
}
The only reasonable solutions so far seem to be either:
create an Assistant for each user. (May lead to overloading Twilio)
have only one Assistant but update its stylesheet before connecting the user (This would probably lead to concurrency issues, right?)
Any other suggestions on how to tackle this problem? Thanks in advance
You are right, an Assistant has one directly linked StyleSheet and that is how you define the voice. You also don't want to update the Assistant with a new StyleSheet as that would likely change the voice of any calls that are already in progress (though I haven't tested this).
You do suggest creating an Assistant for each user. According to the Autopilot documentation you can create up to 500 Assistants per account. I don't know how many users you have that need Assistants, but that could work? I would guess that if your users want to customise the voice, they may end up wanting to customise other aspects of the Assistant, including the phrases it uses, so it might be useful to have an Assistant each too.
I don't have any other ideas for this though, I'm afraid.

Rally SDK 2 - Given a story A and a story B, how can I say that B is a successor of A thanks to Javascript API?

I'm using the Rally SDK 2 to manipulate user stories from Javascript in a "Custom HTML" application.
I can query a story and retrieve its attributes.
I can update some of the attributes, like the Name of the Iteration for instance.
How can I add a successor to my story?
If I understand well, I should edit the "/HierarchicalRequirement/.../Successors" of my story, but I don't understand how to do that.
Would someone have an example, please?
Unfortunately, I don't have an exact example you can use, but the successors (or predecessors) are 'collections'. As such, you need to 'add' to the collection. There is an explanation of some of this here: https://docs.ca.com/ca-agile-central/saas/apps/2.1/doc/#!/guide/collections_in_v2
Built into the model for the artefact are routines to handle all the details. If you want more details, then you can download the sdk-debug.js file from the Rally server. To get to it, open up the developer tools in your browser and have a look where a custom app would get the sdk.js file from. The debug variant is formatted for humans to read and a very useful source of how to do things at the low levels. The definition of Rally.data.wsapi.ModelFactory has some good tips.
One of the recommendations I make to people starting out writing custom apps, is to use the developer tools in the browser to watch the network traffic that the Rally UI makes - and then work backwards to code.

Swagger UI for messaging API

I'd like to know if the following is possible.
Swagger is almost what I need to document a Message based API. For instance for a Command Message I'd like to say "Command" instead of "Post", and instead of "path" I'd like to have the name of the Command.
The spec mentions that Vendor Extensions are possible using "x-" properties but I am 1) not finding any examples of how to do this and 2) not sure if the use of these properties would help me meet my goals.
Might anyone be able to point me to some resources that can help me move along?
Swagger is designed to document REST APIs which are based on HTTP verbs. You can't replace verbs or invent new ones.
Vendor extensions are there to allow adding additional information that the specification does not allow, but ultimately, it is still intended for REST APIs.
From what I gather, you're trying to describe something different.
We do welcome suggestions for additional roads for Swagger (that is, cover non-REST APIs), and in order to do that, I'd suggest opening an issue on the swagger-spec repository.

Google+ Authorship: #REL, GET Parameters and Redirects

I recently decided to start to take advantage of rich snippets to improve my personal website's content for the search engines and, IMHO most importantly, the site readers – hi, Mam! ;-). One of these are Google Authorship. Personally, I think the idea behind Google Authorship is a sound one: it helps to brings a sense of identity, personality and – arguably, most importantly – credibility to what is still largely an anonymous web.
Normally, I would link my article to Google Authorship using the following line of HTML:
<A REL="author" HREF="https://plus.google.com/112431363835029530079?rel=author">Jordan Clark</A>
However, in the instance of a website that publishes articles that are written by multiple authors, manually entering each another’s Google+ UID string starts to become a tiresome process.
Is is valid to do the following:
(a) Link to the author like so, using the script "author.php" (or other type of server-side script).
<A REL="author" HREF="/author.php?by=Alice&rel=author/[UID]?rel=author">Alice</A>
(b) The file "author.php" scripts simply do a quick check for Alice's (or whoever) User ID string provided by Google, and then uses a simple HTTP redirect header to pass this data to Google.
What I would like to know is:
Is it okay to use a local script to redirect to your Google+ user profile? (i.e. will it affect the PageRank of already indexed page or have any other unforeseen negative effects on new and indexed pages?)
Why do I not see more people linking with Google’s “prettified” version:
http://profiles.google.com/clarky.y2k?rel=author
Are there any drawbacks to using the “prettified” version of this method?
Ideally, I would like to use the intermediate PHP script, as I have already described above (see part 1). However, any tips, suggestions or other ways you may have implemented on your websites are very welcome!
For item (1), you can maintain your own app's profiles (author.php in your case) for your authors. On your own app's profile page (author.php), you would add a link from that page to Google and specify the rel="me" attribute on that link. So Alice's profile page might say something like "Find Alice on Google+.
This indirect authorship linking is supported. You also will need the link from Alice's Google+ profile that lists her as a contributor to your site. Once the linking is setup in both directions, authorship can start to show up. Authorship won't always display in all cases and can take some time for it to start appearing as Google would need to reindex your pages.
For item (2), I don't think the profiles URL will enable authorship. Some people use that URL as a vanity URL, but as far as I know it isn't supported for use with things like authorship, badges, etc.
You should test if your redirects are followed using the Rich Snippets Testing Tool: http://www.google.com/webmasters/tools/richsnippets
rel="author" is no longer supported.

How to integrate Sharepoint Community Features

I have a web site for showing different reports like these examples
http://contoso.com/report.aspx?id=1
http://contoso.com/report.aspx?id=2
In each report page I want to embed a Sharepoint control that will allow me to:
Start a discussion for each report
Add Comment/response to the existing thread for the report
Rate the report on a scale of 1 to 5 and provide comments
As is implicit, a Sharepoint forum will be the backing store and can be accessed directly as well.
Is this possible in Sharepoint 2007? How difficult if so?
How can I implement such a scenario?
To best answer your question, I need to know what a report actually is. I assume a report is a Word document.
You probably need to do some custom coding for this to work well. One approach might be:
Create a Document Library.
Create a Discussion Forum.
Add a column to the Document library for storing the rating on a scale of 1-5.
Create a WebPart that displays the document and it's metadata including your score.
Have an event receiver or Workflow on the Document Library that creates a new top level thread each time a report it added with the title of the document as the subject.
Have code in your webpart that queries for all items in the discussion forum where the thread starting title is the name of the document, and display the thread.
It would probably require some C# and WebPart development skills to accomplish this task. Not something a beginner could do.

Resources