Skip to content

Commit

Permalink
Revert of adding the word CSS style at the end of the assertion that …
Browse files Browse the repository at this point in the history
…the element contains a specific CSS style #168
  • Loading branch information
TasneemNatshah committed Aug 17, 2024
1 parent 65ad718 commit 6e1908f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Feature: An example to test if the element contains a certain expected CSS prope
Given I am on "/test--then--the-element-should_not-contain-cssproperty.html"
Then I should see a "body" element by attr
When I press "Submit"
Then the "body" element should contain "background-color:white;" css style
Then the "body" element should contain "background-color:white;"
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Feature: An example to test if the element does not contain a certain expected C
Given I am on "/test--then--the-element-should_not-contain-cssproperty.html"
Then I should see a "body" element by attr
When I press "Submit"
Then the "#uname" element should not contain "border:solid 5px red;" css style
And the "pword" element should not contain "font-size: 28px;" css style
Then the "#uname" element should not contain "border:solid 5px red;"
And the "pword" element should not contain "font-size: 28px;"
10 changes: 5 additions & 5 deletions tests/step-definitions/webship.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ Then(/^(I|we)* should not see (a|an) "([^"]*)?" element by( its)*( "([^"]*)?")*
* Example: Then the "body" element should contain "color:white;"
*
*/
Then(/^the "([^"]*)?" element should contain "([^"]*)?" css style$/, function (attrValue, elementCss) {
Then(/^the "([^"]*)?" element should contain "([^"]*)?"$/, function (attrValue, elementCss) {

const hasASpace = attrValue.indexOf(' ');

Expand Down Expand Up @@ -724,11 +724,11 @@ Then(/^the "([^"]*)?" element should contain "([^"]*)?" css style$/, function (a

/**
* Assert, that element contains a specific CSS style
* Example: Then the "body" element should not contain "color:white;" css style
* Example: Then the "#uname" element should not contain "border:solid 5px red;" css style
* Example: Then the "pword" element should not contain "font-size: 26px;" css style
* Example: Then the "body" element should not contain "color:white;"
* Example: Then the "#uname" element should not contain "border:solid 5px red;"
* Example: Then the "pword" element should not contain "font-size: 26px;"
*/
Then(/^the "([^"]*)?" element should not contain "([^"]*)?" css style$/, function (attrValue, elementCss) {
Then(/^the "([^"]*)?" element should not contain "([^"]*)?"$/, function (attrValue, elementCss) {

const hasASpace = attrValue.indexOf(' ');

Expand Down

0 comments on commit 6e1908f

Please sign in to comment.