Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Blockquote Component Nightwatch Test #1168

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
let currentBrowser;

module.exports = {
tags: ['component', 'blockquote', 'web component'],
'Bolt Blockquote': function(browser) {
const { testingUrl } = browser.globals;
console.log(`global browser url: ${testingUrl}`);
currentBrowser = '--' + browser.currentEnv || 'chrome';
let testName = 'bolt-blockquote';

browser
.url(
`${testingUrl}/pattern-lab/patterns/02-components-blockquote-10-blockquote-alignItems-variation/02-components-blockquote-10-blockquote-alignItems-variation.html`,
)
.waitForElementVisible('bolt-blockquote', 1000)
.assert.elementPresent('bolt-logo[slot="logo"]')
.execute(
function(data) {
const blockquote = document.querySelector('bolt-blockquote');
return blockquote.renderRoot
.querySelector('blockquote')
.classList.contains('c-bolt-blockquote');
},
[],
function(result) {
browser.assert.ok(
result.value === true,
`verified that <bolt-blockquote> rendered the blockquote element with a class of c-bolt-blockquote.`,
);
},
)
.assert.containsText(
'bolt-blockquote cite[slot="author-name"]',
'Michelangelo di Lodovico Buonarroti Simoni',
)
.saveScreenshot(
`screenshots/bolt-blockquote/${testName}--${currentBrowser}.png`,
)
.end();
},
};