Skip to content

Commit e718e80

Browse files
committed
Added tests for the text under the 'Plain Text'
1 parent 2e41254 commit e718e80

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/e2e/specs/LicenseCode.js

+22
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,27 @@ module.exports = {
3737
.assert.elementPresent('p[class="license-text"]')
3838
.assert.elementPresent('#attribution-text > p > span:nth-child(1)')
3939
.assert.elementPresent('#attribution-text > p > span:nth-child(2)')
40+
},
41+
42+
// Tests for the text under the "Plain Text"
43+
44+
'Check if the work in plain text is displayed': function(browser) {
45+
browser
46+
.click('nav > ul > li:nth-child(2) > a')
47+
.expect.element('#attribution-text > p > span:nth-child(1) > span:nth-child(1)').text.to.equal('This work')
48+
},
49+
'Check if the license in plain text is displayed': function(browser) {
50+
browser
51+
.expect.element('#attribution-text > p > span:nth-child(1) > span:nth-child(4)').text.to.equal('CC BY-SA 4.0')
52+
},
53+
'Check if the author-name in plain text is displayed': function(browser) {
54+
browser
55+
.expect.element('#attribution-text > p > span:nth-child(1) > span:nth-child(2) > span').text.to.equal('Jane Doe')
56+
},
57+
'Check if the license-details in plain text are displayed': function(browser) {
58+
browser
59+
.click('nav > ul > li:nth-child(2) > a')
60+
.assert.elementPresent('#attribution-text > p > span:nth-child(2)')
61+
.expect.element('#attribution-text > p > span:nth-child(2)').text.to.equal('. To view a copy of this license, visit https://creativecommons.org/licenses/by-sa/4.0')
4062
}
4163
}

0 commit comments

Comments
 (0)