-
-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added support for parsed styles * Added stdlib function. * Added e2e tests * Added e2e tests for STYLE_* functions
- Loading branch information
Showing
42 changed files
with
1,223 additions
and
215 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
LET url = @dynamic + "?redirect=/events" | ||
LET doc = DOCUMENT(url, true) | ||
LET pageSelector = "#page-events" | ||
LET elemSelector = "#wait-no-style-content" | ||
|
||
WAIT_ELEMENT(doc, pageSelector) | ||
|
||
LET el = ELEMENT(doc, elemSelector) | ||
LET attrs = ATTR_GET(el, "style") | ||
|
||
RETURN EXPECT("display: block;", attrs.style) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
LET url = @dynamic + "?redirect=/events" | ||
LET doc = DOCUMENT(url, true) | ||
LET pageSelector = "#page-events" | ||
LET elemSelector = "#wait-no-style-content" | ||
|
||
WAIT_ELEMENT(doc, pageSelector) | ||
LET el = ELEMENT(doc, elemSelector) | ||
|
||
LET prev = el.attributes.style | ||
|
||
ATTR_REMOVE(el, "style") | ||
|
||
WAIT(1000) | ||
|
||
LET curr = el.attributes.style | ||
|
||
RETURN prev == "display: block;" && curr == NONE ? "" : "expected attribute to be removed" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
LET url = @dynamic + "?redirect=/events" | ||
LET doc = DOCUMENT(url, true) | ||
LET pageSelector = "#page-events" | ||
LET elemSelector = "#wait-no-style-content" | ||
|
||
WAIT_ELEMENT(doc, pageSelector) | ||
|
||
LET el = ELEMENT(doc, elemSelector) | ||
LET prev = el.style | ||
|
||
ATTR_SET(el, "style", "color: black;") | ||
|
||
WAIT(1000) | ||
|
||
LET curr = el.style | ||
|
||
RETURN curr.color == "black" ? "" : "styles should be updated" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
LET url = @dynamic + "?redirect=/events" | ||
LET doc = DOCUMENT(url, true) | ||
LET pageSelector = "#page-events" | ||
LET elemSelector = "#wait-no-style-content" | ||
|
||
WAIT_ELEMENT(doc, pageSelector) | ||
|
||
LET el = ELEMENT(doc, elemSelector) | ||
|
||
ATTR_SET(el, { style: "color: black;", "data-ferret-x": "test" }) | ||
|
||
WAIT(1000) | ||
|
||
RETURN el.style.color == "black" && el.attributes["data-ferret-x"] == "test" ? "" : "styles should be updated" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
LET url = @dynamic + "?redirect=/events" | ||
LET doc = DOCUMENT(url, true) | ||
LET pageSelector = "#page-events" | ||
LET elemSelector = "#wait-no-style-content" | ||
|
||
WAIT_ELEMENT(doc, pageSelector) | ||
|
||
LET el = ELEMENT(doc, elemSelector) | ||
LET val = STYLE_GET(el, "display") | ||
|
||
RETURN val.display == "block" ? "" : "could not get style values" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
LET url = @dynamic + "?redirect=/events" | ||
LET doc = DOCUMENT(url, true) | ||
LET pageSelector = "#page-events" | ||
LET elemSelector = "#wait-no-style-content" | ||
|
||
WAIT_ELEMENT(doc, pageSelector) | ||
LET el = ELEMENT(doc, elemSelector) | ||
|
||
LET prev = el.style | ||
|
||
STYLE_REMOVE(el, "display") | ||
|
||
WAIT(1000) | ||
|
||
LET curr = el.style | ||
|
||
RETURN prev.display == "block" && curr.display == NONE ? "" : "expected style to be removed" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
LET url = @dynamic + "?redirect=/events" | ||
LET doc = DOCUMENT(url, true) | ||
LET pageSelector = "#page-events" | ||
LET elemSelector = "#wait-no-style-content" | ||
|
||
WAIT_ELEMENT(doc, pageSelector) | ||
|
||
LET el = ELEMENT(doc, elemSelector) | ||
LET prev = el.style | ||
|
||
STYLE_SET(el, "color", "black") | ||
|
||
WAIT(1000) | ||
|
||
LET curr = el.style | ||
|
||
RETURN curr.color == "black" ? "" : "styles should be updated" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
LET url = @dynamic + "?redirect=/events" | ||
LET doc = DOCUMENT(url, true) | ||
LET pageSelector = "#page-events" | ||
LET elemSelector = "#wait-no-style-content" | ||
|
||
WAIT_ELEMENT(doc, pageSelector) | ||
|
||
LET el = ELEMENT(doc, elemSelector) | ||
LET prev = el.style | ||
|
||
STYLE_SET(el, { color: "black", "min-width": "100px", "background-color": "#11111" }) | ||
|
||
WAIT(1000) | ||
|
||
LET curr = el.style | ||
|
||
RETURN curr.color == "black" && curr["min-width"] == "100px" && curr["background-color"] == "#11111" ? "" : "styles should be updated" |
Oops, something went wrong.