Skip to content

Instantly share code, notes, and snippets.

@karlkfi
Created April 29, 2013 06:58
Show Gist options
  • Save karlkfi/5480124 to your computer and use it in GitHub Desktop.
Save karlkfi/5480124 to your computer and use it in GitHub Desktop.
BAS action chain.
@page (domain = "domain.com")
(path = "/email-form/") {
status-code: 200;
input.email {
text: set("myemail@domain.com");
}
input.submit:click() {
status-code: 200;
@import("./next-page-sheet.bas")
}
}
@karlkfi
Copy link
Author

karlkfi commented Apr 29, 2013

probably don't want to allow recursion like this would. It might be easier to just have a basic-like syntax for handling ordered flow.... Or just leave it to a real programming language, but I think one of the beautify things about BAS is that it might not require a programmer to write. Once you get into flow and groupign and abstraction you might as well just being using a scripting language.

@cgiffard
Copy link

cgiffard commented May 1, 2013

Interesting ideas. I think it's a very hard problem to solve, and will probably require a lot of discussion. :)

One of the key concepts/ideas I had with Bas was that everything should be declarative, not procedural, and relationships between parts of a page and its assertions should be able to be expressed abstractly. Any solution to solve action chaining should meet that as a fundamental aspect of how it works.

(Not saying that your example doesn't do this - but it's worth remembering.)

I'm fairly confident that there's an elegant way to specify lists of actions and assertions along the way. I'll have a think about the possible syntax and post examples/mockups as I think of them!

@cgiffard
Copy link

cgiffard commented May 1, 2013

Oh, and I posted an issue over here: cgiffard/Behaviour-Assertion-Sheets#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment