Scenarios Scenario: Open link in a new window Given there is an external link When I click the link while holding Command/Ctrl key Then I can see the linked document open in a new window End-to-End / E2E • All end user action use-cases • Real browser needed
Integration Scenarios Scenario: URI Parameters from Resource and Transition Given an ADD with URI Parameters in both Resource and in Transition Then I can see the URI Parameters from Transition rendered before the URI Parameters from Resource Integration • Checks the rendering to be correct and complete • Can use fake browser environment
import { After, Before } from ‘cucumber’ After(async function() { const logEntries = await this.browser.getConsoleLogs(); logEntries.forEach(console.info); }) Hooks Low level • Should not affect the features contents • Use Background
Tags Execution Filtering • Tag expressions https://cucumber.io/docs/cucumber/api/#tag-expressions @debug Scenario: Seeing Resource Group Breadcrumbs if there's one Given an API Description Document (ADD) …
Executing Scenario Scenario: Open a link Given there is an external link • When I click the link … const humanColumn = await this.documentation.getHumanColumn() humanColumn.clickLink() const link = await driver.findElement( By.className(‘docs-humanColumn’) ) link.click()
Spec Updates npx cucumber-js … Scenario: I click … # features/documentation/navigation.feature:32 ? Given I have a Renderer Configuration named “mobile-layout“ Undefined. Implement with the following snippet: Given('I have a Renderer Configuration named {string}', function (string) { // Write code here that turns the phrase above into concrete actions return 'pending'; });
Integration Tests Setup Steps • Run mocha test case • Page Objects Enzyme • React Component jQuery-like workflows jsdom • Provides just enough of DOM in node.js