Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async login(login, password) {
await t
.click('#login')
.pressKey('ctrl+a delete')
.typeText('#login', login)
.click('#password')
.pressKey('ctrl+a delete')
.typeText('#password', password)
.click('#submit-login-password')
.wait(1000);
}
async createTestUI(label, timeStamp) {
const number = Selector('veda-control[property="v-ui:testInteger"] div select.form-control').find('option').withText('2');
const checkbox = Selector('veda-control[rel="v-ui:testLink"] div div.checkbox').find('label').withText('Спецификация тестового объектного свойства');
await t
.click('#menu')
.click('li[id="menu"] li[resource="v-s:Create"]')
.click('veda-control.fulltext.dropdown')
.pressKey('ctrl+a delete')
.typeText('veda-control.fulltext.dropdown', 'Класс для тестирования интерфейса')
.click('div.suggestion[resource="v-ui:TestUIClass"]')
.click('div.actions.actions-fixed button[type="button"] span.glyphicon.glyphicon-chevron-left')
.typeText('veda-control.-view.edit.search[property="rdfs:label"]', label)
.wait(1000)
.typeText('veda-control.-view.edit.search[property="rdfs:comment"]', timeStamp)
.wait(1000)
.hover('em[about="v-ui:testFile"]')
.typeText('veda-control[property="v-ui:testString"]', 'Предопределенное значение 1')
.wait(1000)
.click('veda-control[data-type="select"][property="v-ui:testInteger"]')
.click(number)
async navigateAppearanceLink () {
await t
.click(link('#tab_pdf', 'Add New'))
.click(this.appearanceLink)
}
export async function createLanguageVersion(language: LanguageVersion) {
await t.click('mesh-node-language-switcher');
await t.click(Selector('gtx-dropdown-item').withText(`Create ${language} version`));
}
async click () {
await t.click(Selector(this.selector))
}
async navigateTemplateLink () {
await t
.click(link('#tab_pdf', 'Add New'))
.click(this.templateLink)
}
}
static async discardAll() {
await t
.click(this.publishDropdown)
.click(this.publishDropdownDiscardAll);
const confirmButtonExists = await Selector('#neos-DiscardDialog-Confirm').exists;
if (confirmButtonExists) {
await t.click(Selector('#neos-DiscardDialog-Confirm'));
}
await Page.waitForIframeLoading();
}
}
async function click_and_type(input, text) {
await t.click(input).typeText(input, text, { replace: true });
}
async linkJoin(pipelineClass: string, index: number, joinIndex: number) {
await t
.click(Selector(pipelineClass).nth(index))
.click(Selector('a.link.join.item'))
.click(Selector('.node.workflowJoin.pointing > svg').nth(0))
}
}, {
dependencies: { selector: sel, value, fieldname }
})();
await t.click(input);
}
else if (['Data', 'Currency', 'Float', 'Text Editor', `Small Text`].includes(fieldtype)) {
await click_and_type(input, value);
}
else if(fieldtype === 'Check') {
await t.click(input);
}
else if(fieldtype === 'Date') {
await this.pause(1);
await click_and_type(input, value);
await t.click(input, {
offsetY: 40
});
}
else {
await click_and_type(input, value);
}
async function click_and_type(input, text) {
await t.click(input).typeText(input, text, { replace: true });
}
},