From a98ab0b56bdc54deb9a7c3bd19082fe65acefe2e Mon Sep 17 00:00:00 2001 From: Dominik Broj <19861998+thetric@users.noreply.github.com> Date: Wed, 16 Sep 2020 21:52:23 +0200 Subject: [PATCH] test: remove remaining protractor references --- n2e/commands/addTaskWithReminder.ts | 3 +-- n2e/commands/openPanelForTask.ts | 3 +-- n2e/src/daily-summary.e2e.ts | 3 +-- n2e/src/work-view.e2e.ts | 11 +++++------ 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/n2e/commands/addTaskWithReminder.ts b/n2e/commands/addTaskWithReminder.ts index a2dab639ff..313ed0e74a 100644 --- a/n2e/commands/addTaskWithReminder.ts +++ b/n2e/commands/addTaskWithReminder.ts @@ -1,5 +1,4 @@ import { AddTaskWithReminderParams, NBrowser, } from '../n-browser-interface'; -import { Key } from 'protractor'; const TASK = 'task'; const SCHEDULE_TASK_ITEM = 'task-additional-info-item:nth-child(2)'; @@ -38,7 +37,7 @@ module.exports = { .pause(50) .setValue(TIME_INP_H, h.toString()) .pause(50) - .setValue(TIME_INP_H, Key.ARROW_RIGHT) + .setValue(TIME_INP_H, this.Keys.ARROW_RIGHT) .pause(50) .setValue(TIME_INP_M, m.toString()) .waitForElementVisible(DIALOG_SUBMIT) diff --git a/n2e/commands/openPanelForTask.ts b/n2e/commands/openPanelForTask.ts index dd5744ab5d..413092aa01 100644 --- a/n2e/commands/openPanelForTask.ts +++ b/n2e/commands/openPanelForTask.ts @@ -1,5 +1,4 @@ import {NBrowser} from '../n-browser-interface'; -import {Key} from 'protractor'; const SIDE_INNER = '.additional-info-panel'; @@ -11,7 +10,7 @@ module.exports = { .pause(50) .moveToElement(taskSel, 100, 15) .click(taskSel) - .sendKeys(taskSel, Key.ARROW_RIGHT) + .sendKeys(taskSel, this.Keys.ARROW_RIGHT) .waitForElementVisible(SIDE_INNER) .pause(50) ; diff --git a/n2e/src/daily-summary.e2e.ts b/n2e/src/daily-summary.e2e.ts index 43e9a171dc..b7613a3019 100644 --- a/n2e/src/daily-summary.e2e.ts +++ b/n2e/src/daily-summary.e2e.ts @@ -1,4 +1,3 @@ -import {Key} from 'protractor'; import {BASE} from '../e2e.const'; import {NBrowser} from '../n-browser-interface'; @@ -22,6 +21,6 @@ module.exports = { .waitForElementVisible(ADD_TASK_GLOBAL_SEL) .setValue(ADD_TASK_GLOBAL_SEL, 'test task hohoho') - .setValue(ADD_TASK_GLOBAL_SEL, Key.ENTER) + .setValue(ADD_TASK_GLOBAL_SEL, browser.Keys.ENTER) .end(), }; diff --git a/n2e/src/work-view.e2e.ts b/n2e/src/work-view.e2e.ts index dba7584a29..4aa56627d8 100644 --- a/n2e/src/work-view.e2e.ts +++ b/n2e/src/work-view.e2e.ts @@ -1,4 +1,3 @@ -import {Key} from 'protractor'; import {BASE} from '../e2e.const'; import {NBrowser} from '../n-browser-interface'; @@ -27,7 +26,7 @@ module.exports = { .waitForElementVisible(ADD_TASK_INITIAL) .setValue(ADD_TASK_INITIAL, '1 test task hihi') - .setValue(ADD_TASK_INITIAL, Key.ENTER) + .setValue(ADD_TASK_INITIAL, browser.Keys.ENTER) .waitForElementVisible(TASK) .assert.visible(TASK) @@ -39,9 +38,9 @@ module.exports = { .waitForElementVisible(ADD_TASK_INITIAL) .setValue(ADD_TASK_INITIAL, '2 test task hihi') - .setValue(ADD_TASK_INITIAL, Key.ENTER) + .setValue(ADD_TASK_INITIAL, browser.Keys.ENTER) .setValue(ADD_TASK_INITIAL, '3 some other task') - .setValue(ADD_TASK_INITIAL, Key.ENTER) + .setValue(ADD_TASK_INITIAL, browser.Keys.ENTER) .waitForElementVisible(TASK) .assert.visible(TASK) @@ -57,9 +56,9 @@ module.exports = { .waitForElementVisible(ADD_TASK_GLOBAL) .setValue(ADD_TASK_GLOBAL, '4 test task hohoho') - .setValue(ADD_TASK_GLOBAL, Key.ENTER) + .setValue(ADD_TASK_GLOBAL, browser.Keys.ENTER) .setValue(ADD_TASK_GLOBAL, '5 some other task xoxo') - .setValue(ADD_TASK_GLOBAL, Key.ENTER) + .setValue(ADD_TASK_GLOBAL, browser.Keys.ENTER) .waitForElementVisible(TASK) .assert.visible(TASK)