Ocelot-Social/cypress/integration/common/I_click_on_{string}.js
Ulf Gebhardt 39fb4b98d3
User.ChangePassword.feature
unified user creation and logging in
2021-04-14 20:36:13 +02:00

17 lines
521 B
JavaScript

import { When } from "cypress-cucumber-preprocessor/steps";
When("I click on {string}", element => {
const elementSelectors = {
'submit button': 'button[name=submit]',
'create post button': '.post-add-button',
'save button': 'button[type=submit]',
'the first post': '.post-teaser:first-child',
'comment button': 'button[type=submit]',
'reply button': '.reply-button',
'security menu': 'a[href="/settings/security"]',
}
cy.get(elementSelectors[element])
.click()
.wait(750);
});