SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import {browser, element, by, ExpectedConditions} from 'protractor';
  2. import {LogPage} from './pageobjects/login.po';
  3. import {DomainsPo} from './pageobjects/domain.po';
  4. import {DashboardPo} from './pageobjects/dashboard.po';
  5. import {Utils} from "./utils";
  6. import {waitForMap} from "@angular/router/src/utils/collection";
  7.  
  8.  
  9.  
  10. let Faker = require('faker');
  11. let randomEmail = Faker.internet.email();
  12. let randomName = Faker.lorem.word();
  13. let q = require('chai')
  14.  
  15. describe('create domain', function () {
  16.     let page = new LogPage();
  17.     let domains = new DomainsPo();
  18.     let dashboard = new DashboardPo();
  19.     let utils = new Utils();
  20.  
  21.  
  22.     it('click domains', async function () {
  23.         browser.ignoreSynchronization = true
  24.         browser.sleep(14000).then(() => expect(element(by.xpath("//*[@class='m-menu__link'][contains(text(),'Domains')]")).click())
  25.         )
  26.       })
  27.  
  28.     it('click New', function () {
  29.         browser.sleep(5000)
  30.         domains.new().click()
  31.     })
  32.  
  33.     it('click Name', function () {
  34.         expect(domains.name().click())
  35.     })
  36.  
  37.     it('fill Name', function () {
  38.         expect(domains.name().sendKeys(randomName + '.actest.pro'));
  39.     })
  40.  
  41.     it('choose type', function () {
  42.         expect(domains.type().click());
  43.         expect(domains.type_landing().click());
  44.     })
  45.  
  46.     it('click offer', function () {
  47.         expect(domains.offer().click());
  48.         expect(domains.search_offer().click());
  49.         expect(domains.search_offer().sendKeys('4'));
  50.         expect(domains.braslet().click());
  51.     })
  52.  
  53.     it('choose landing', function () {
  54.         // expect(!domains.loader().isDisplayed());
  55.         expect(domains.landing().click());
  56.     })
  57.  
  58.  
  59.     it('click and choose status', function () {
  60.         expect(domains.status_form().click());
  61.         expect(domains.status_enable().click());
  62.     })
  63.  
  64.     // it('check domain name', function () {
  65.     //     expect(domains.add_form_btn().click().then(
  66.     //         () => domain_header("Domains")));
  67.     //     expect(Utils.find_by_name(randomName  + '.actest.pro'));
  68.     // })
  69.  
  70.  
  71. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top