mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
17 lines
521 B
JavaScript
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);
|
|
}); |