Skip to content

Latest commit

 

History

History
113 lines (86 loc) · 2.04 KB

MIGRATION-2.0.0.MD

File metadata and controls

113 lines (86 loc) · 2.04 KB

Kakunin - automated testing framework

Migration to 2.0.0 version

What needs to be done:

  1. Remove all locators from Page Objects
this.exampleLocator = by.css('.unique-class');

needs to be changed to:

this.exampleLocator = $('.unique-class');
  1. Remove headers | element | value | from all steps
And there are "equal 1" following elements for element "rows":
   | element   | value  |
   | firstName | t:John |
   | lastName  | t:Doe  |

needs to be changed to:

And there are "equal 1" following elements for element "rows":
   | firstName | t:John |
   | lastName  | t:Doe  |
  1. Delete isExternal from all Page Objects, if you are using Angular application
class ExamplePage extends BasePage {
  constructor() {
    super();
    this.isExternal = true;

    this.url = '/';

    this.selector = $('.some-class');
  }

needs to be changed to:

class ExamplePage extends BasePage {
  constructor() {
    super();

    this.url = '/';

    this.selector = $('.some-class');
  }
  1. Change exports in Page Objects: The last line in each of the page objects
module.exports = new ExamplePage();

needs to be changed to:

module.exports = ExamplePage;
  1. Change dictionaries, example:
const { dictionaries } = require('kakunin');

class TestDictionary {
  constructor() {
    this.values = {
      'test-name': 'Janek',
      'test-value': 'lux'
    };

    this.name = 'test-dictionary';
  }

  isSatisfiedBy(name) {
    return this.name === name;
  }

  getMappedValue(key) {
    return this.values[key];
  }
}

dictionaries.addDictionary(new TestDictionary());

needs to be changed to:

const { dictionaries } = require('kakunin');
const { BaseDictionary } = require('kakunin');

class TestDictionary extends BaseDictionary {
  constructor() {
    super('test-dictionary', {
      'test-name': 'Janek',
      'test-value': 'lux'
    });
  }
}

dictionaries.addDictionary(new TestDictionary());