Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Use arrow functions

Josiah Sprague1e879cf23b49
diff --git a/e2e/step_definitions/app.js b/e2e/step_definitions/app.js
index 0327c9523..212aee7d7 100644
--- a/e2e/step_definitions/app.js
+++ b/e2e/step_definitions/app.js
@@ -9,62 +9,62 @@ defineSupportCode(({Given, Then, When}) => {
});
// Scroll to an element by predefined selector
- When('I scroll to the {string}', function (label) {
+ When('I scroll to the {string}', (label) => {
return client.useCss().moveToElement(selectors[label], 10, 10);
});
// Click any element that contains the string
- When('I click {string}', function (string) {
+ When('I click {string}', (string) => {
return client.useXpath().click('//*[contains(text(),"' + string + '")]');
});
// Click a link by link text
- When('I click the {string} link', function (text) {
+ When('I click the {string} link', (text) => {
return client.useXpath().click('//a[text()="'+ text +'"]');
});
// Click an element by predefined selector
- When('I click the {string}', function (label) {
+ When('I click the {string}', (label) => {
return client.useCss().click(selectors[label]);
});
// Click a Worldview tab
- When('I click the {string} tab', function(name) {
+ When('I click the {string} tab', (name) => {
return client.useCss().click('[data-tab="' + name + '"]');
});
// Input a value into a labeled element
- When('I input {string} in the {string}', function(value, label) {
+ When('I input {string} in the {string}', (value, label) => {
return client.useCss().setValue(selectors[label], value);
});
// Wait until an element is visible
- When('I wait to see {string}', function(label) {
+ When('I wait to see {string}', (label) => {
return client.useCss().waitForElementVisible(selectors[label], delay);
});
// Pause for n seconds
- When('I wait {int} seconds', function(seconds) {
+ When('I wait {int} seconds', (seconds) => {
return client.pause(seconds*1000);
});
// Check for a string
- Then('I should see {string}', function (text) {
+ Then('I should see {string}', (text) => {
return client.useCss().assert.containsText('body', text);
});
// Check for a string
- Then('I should not see {string}', function (text) {
+ Then('I should not see {string}', (text) => {
return client.useCss().expect.element('body').text.not.contains(text);
});
// Check for an element by predefined selector
- Then('I should see the {string}', function (label) {
+ Then('I should see the {string}', (label) => {
return client.useCss().expect.element(selectors[label]).to.be.visible;
});
// Check for abscense of an element by predefined selector
- Then('I should not see the {string}', function (label) {
+ Then('I should not see the {string}', (label) => {
return client.useCss().expect.element(selectors[label]).to.not.be.present;
});