Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async navigateDeletePdfEntries (text, formName) {
await t
.useRole(admin)
.navigateTo(`${baseURL}/wp-admin/admin.php?page=${text}`)
.hover(formList(formName))
.click(formEntries(formName))
.hover(this.settingsMenu)
.click(link('.gf_submenu', 'PDF'))
let tempalte = await this.template.count
if (tempalte > 0) {
for (let i = 0; i < tempalte; i++) {
await t
.hover(this.template)
.click(this.deletePDF)
.click(this.confirmDelete)
.wait(2000)
}
}
test('Test1', async() => {
await t
.useRole(someUser)
.expect(userName.textContent).eql('SomeUser')
.useRole(Role.anonymous())
.expect(userName.textContent).eql('');
})
async navigateSettingsTab (text) {
await t
.useRole(admin)
.navigateTo(`${baseURL}/wp-admin/admin.php?page=${text}`)
.click(this.runSetupButton)
}
}
async navigatePage () {
await t
.useRole(admin)
.navigateTo(`${baseURL}/wp-admin/edit.php?post_type=page`)
}
async navigateSettingsTab (text) {
await t
.useRole(admin)
.navigateTo(`${baseURL}/wp-admin/admin.php?page=${text}`)
.click(this.downloadButton)
}
}
async navigateSettingsTab (text) {
await t
.useRole(admin)
.navigateTo(`${baseURL}/wp-admin/admin.php?page=${text}`)
.click(this.licenseInputField)
.selectText(this.licenseInputField, 32, 0)
.pressKey('backspace')
}
}
async navigateConfirmationsSection (text) {
await t
.useRole(admin)
.navigateTo(`${baseURL}/wp-admin/admin.php?page=${text}`)
.click(link('#the-list', 'Default Confirmation'))
}
async navigateConfirmationsSection (text) {
await t
.useRole(admin)
.navigateTo(`${baseURL}/wp-admin/admin.php?page=${text}`)
.click(link('#the-list', 'Default Confirmation'))
}
}
async navigateSettingsTab (text) {
await t
.useRole(admin)
.navigateTo(`${baseURL}/wp-admin/admin.php?page=${text}`)
.click(button('Manage Fonts'))
}
}
async navigateSettingsTab (text) {
await t
.useRole(admin)
.navigateTo(`${baseURL}/wp-admin/admin.php?page=${text}`)
.click(this.sectionTable)
.click(this.downloadButton, { speed: 1 })
}
}