-
-
Save karlkfi/5480124 to your computer and use it in GitHub Desktop.
@page (domain = "domain.com") | |
(path = "/email-form/") { | |
status-code: 200; | |
input.email { | |
text: set("[email protected]"); | |
} | |
input.submit:click() { | |
status-code: 200; | |
@import("./next-page-sheet.bas") | |
} | |
} |
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!
Oh, and I posted an issue over here: cgiffard/Behaviour-Assertion-Sheets#1
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.