public function topページ_初期表示(\AcceptanceTester $I)
 {
     $I->wantTo('EA0101-UC01-T01 TOPページ 初期表示');
     // TOP画面に現在の受注状況、お知らせ、売り上げ状況、ショップ状況が表示されている
     $I->see('受注状況', TopPage::$受付状況);
     $I->see('お知らせ', TopPage::$お知らせ);
     $I->see('売り上げ状況', TopPage::$売上状況);
     $I->see('ショップ状況', TopPage::$ショップ状況);
     // 新規受付をクリックすると受注管理画面に遷移することを確認
     $I->click(TopPage::$受付状況_新規受付);
     $I->see('受注マスター', self::ページタイトル);
     $I->goToAdminPage();
     // 購入された商品が受注管理画面のページにて反映されていることを確認
     $config = Fixtures::get('config');
     $findOrders = Fixtures::get('findOrders');
     $NewOrders = array_filter($findOrders(), function ($Order) use($config) {
         return $Order->getOrderStatus()->getId() == $config['order_new'];
     });
     $I->see(count($NewOrders), TopPage::$受付状況_新規受付数);
     // FIXME [issue] ソート順が指定されていないのでテストが失敗する
     // https://github.com/EC-CUBE/ec-cube/issues/1908
     // // 入金待ちをクリックすると「受注管理>入金待ち」のページに遷移することを確認
     // $I->click(TopPage::$受付状況_入金待ち);
     // $I->see('受注マスター', self::ページタイトル);
     // $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '2'/*入金待ち*/);
     // $I->goToAdminPage();
     //
     // // 入金済みをクリックすると「受注管理>入金済み」のページに遷移することを確認
     // $I->click(TopPage::$受付状況_入金済み);
     // $I->see('受注マスター', self::ページタイトル);
     // $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '6'/*入金済み*/);
     // $I->goToAdminPage();
     //
     // // 取り寄せ中をクリックすると「受注管理>取り寄せ」のページに遷移することを確認
     // $I->click(TopPage::$受付状況_取り寄せ中);
     // $I->see('受注マスター', self::ページタイトル);
     // $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '4'/*取り寄せ中*/);
     // $I->goToAdminPage();
     // お知らせの記事をクリックすると設定されたURLに遷移することを確認
     $I->executeJS('document.querySelector("iframe.link_list_wrap").setAttribute("name", "news_frame")');
     $I->switchToIFrame("news_frame");
     $I->click(['css' => '.news_area .link_list .tableish a:nth-child(3)']);
     $I->switchToNewWindow();
     $I->seeInTitle("全商品 / ECサイト構築・リニューアルは「ECオープンプラットフォームEC-CUBE」");
     $I->switchToWindow();
     $I->switchToIFrame();
     // ショップ情報の在庫切れ商品をクリックすると商品管理ページに遷移することを確認
     $I->click(TopPage::$ショップ状況_在庫切れ商品);
     $I->see('商品マスター', self::ページタイトル);
     $I->goToAdminPage();
     // ショップ情報の会員数をクリックすると会員管理に遷移することを確認
     $I->click(TopPage::$ショップ状況_会員数);
     $I->see('会員マスター', self::ページタイトル);
     $I->dontSeeCheckboxIsChecked(CustomerManagePage::$検索条件_仮会員);
     $I->seeCheckboxIsChecked(CustomerManagePage::$検索条件_本会員);
 }
 public function topページ_新着情報(\AcceptanceTester $I)
 {
     $I->wantTo('EF0101-UC01-T02 TOPページ 新着情報');
     $I->amOnPage('/');
     // 各新着情報の箇所を押下する
     // Knowhow: javascriptでclick eventハンドリングしている場合はclick('表示文字列')では探せない
     $I->click('#news_area .newslist dt');
     // 押下された新着情報のセクションが広がり、詳細情報、リンクが表示される
     $I->see('一人暮らしからオフィスなどさまざまなシーンで あなたの生活をサポートするグッズをご家庭へお届けします!', '#news_area .newslist dd');
     // 「詳しくはこちら」リンクを押下する
     $today = new DateTime();
     $I->haveInDatabase('dtb_news', array('news_id' => rand(999, 9999), 'news_date' => $today->format('Y-m-d 00:00:00'), 'news_title' => 'タイトル1', 'news_comment' => 'コメント1', 'creator_id' => 1, 'news_url' => 'http://www.ec-cube.net', 'rank' => 2, 'create_date' => $today->format('Y-m-d 00:00:00'), 'update_date' => $today->format('Y-m-d 00:00:00')));
     $I->reloadPage();
     $I->click('#news_area .newslist dt');
     $I->see('詳しくはこちら', '#news_area .newslist dd');
     $I->click('#news_area .newslist dd a');
     $I->seeInTitle('ECサイト構築・リニューアルは「ECオープンプラットフォームEC-CUBE」');
 }
示例#3
0
<?php

/**
 *  Acceptance test for the Readorium Word Wizard World screen.
 * 
 *  @author Andrew Lee
 */
$I = new AcceptanceTester($scenario);
//  Set up
$I->loadSessionSnapshot('login');
$I->am('student');
$I->wantTo('make sure the word wizard world page displays correctly');
//  Navigate to page and confirm things look right
$I->amOnPage('/student/word_wizard_world');
$I->seeInTitle('Rising Reader Word Wizard World');
$I->makeScreenshot('rkWord_wizard_world');
//  Check each category return back to the main screen
$I->click('//input[@value = "Earth Science"]');
$I->makeScreenshot('rlWww_earth');
$I->click('//input[@value = "Back to Categories"]');
/*$I->click('//input[@value = "History and Nature of Science"]');
$I->makeScreenshot('www_history'); 
$I->click('//input[@value = "Back to Categories"]');

$I->click('//input[@value = "Life Science"]');
$I->makeScreenshot('www_life'); 
$I->click('//input[@value = "Back to Categories"]');

$I->click('//input[@value = "Physical Science"]');
$I->makeScreenshot('www_physical'); 
$I->click('//input[@value = "Back to Categories"]');
 * He also uploads four photos of the plant.
 */
$I->attachFile('input[name=photo_0]', 'test.jpg');
$I->attachFile('input[name=photo_1]', 'test.jpg');
$I->attachFile('input[name=photo_2]', 'test.jpg');
$I->attachFile('input[name=photo_3]', 'test.jpg');
/*
 * Then he clicks on the submit button.
 */
$I->click('addNewPlant');
/*
 * Now the website redirects him to the cropping page for the photos.
 * The title of the page has now change to "Beskær billeder" and
 * a welcome message says "Beskær billeder".
 */
$I->seeInTitle('Beskær billeder');
$I->see('Beskær billeder');
/*
 * He does not want to crop the photos yet so he press the skip button.
 */
$I->click('Spring over', 'a');
/*
 * Now the website redirects him to the detail page of the new created plant.
 */
$plantID = $I->grabRecord('plants', array('name' => 'Test plant'))->id;
$I->seeInCurrentUrl('plant-detail/' . $plantID);
/*
 * Here he can see all the information on the plant that he did previously
 */
$I->see('Test plant', '.page-header h1');
$I->see('Test plant latin', '.page-header h1');
<?php
use Page\Acceptance\Home;

$I = new AcceptanceTester($scenario);
$I->wantTo('see that the home page exists');
$I->amOnPage(Home::$URL);
$I->seeInTitle(Home::$pageTitle);
$I->see(Home::welcome(), Home::$elementWelcome);
$I->see(Home::latestActivity(), Home::$elementLatestActivity);
$I->see(Home::registryNews(), Home::$elementRegistryNews);
$I->see(Home::sideMenu(), Home::$elementSideMenu);
$I->see(Home::signin(), Home::$elementSignin);
$I->seeElement(Home::$elementSearchElementForm);
$I->seeElement(Home::$elementSearchVocabForm);

<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('access the homepage of a subdomain site');
$I->amOnSubdomain(getenv('wpSubdomain1') ?: 'test1');
$I->amOnPage('/');
$I->seeElement('body.home');
$I->seeInTitle(getenv('wpSubdomain1Title') ?: 'Test Subdomain 1');
$I->amOnSubdomain(getenv('wpSubdomain2') ?: 'test2');
$I->amOnPage('/');
$I->seeElement('body.home');
$I->seeInTitle(getenv('wpSubdomain2Title') ?: 'Test Subdomain 2');
<?php

// @group single
$I = new AcceptanceTester($scenario);
$I->wantTo('Test Google\'s Search Functionality');
$I->amOnPage('/ncr');
$I->fillField('q', 'BrowserStack');
$I->click('btnG');
$I->seeInTitle('BrowserStack - Google Search');
示例#8
0
<?php

/**
 *  Acceptance test for the Readorium Quiz Bowl screen.
 * 
 *  @author Andrew Lee
 */
$I = new AcceptanceTester($scenario);
//  Set up
$I->loadSessionSnapshot('login');
$I->am('student');
$I->wantTo('make sure the quiz bowl screen displays correctly');
//  Navigate to page and confirm things look right
$I->amOnPage('/student/quiz_bowl');
$I->seeInTitle('Rising Reader Quiz Bowl');
$I->seeElement("//input[@value = 'Earth Science']");
$I->makeScreenshot('smQuiz_bowl');
//  Open page 1 and make it looks right
$I->click(['xpath' => "//input[@value = 'Earth Science']"]);
$I->makeScreenshot('snQb_page1');
//  Back to Categories and check page 2
$I->click(['xpath' => "//input[@value = 'Back to Categories']"]);
// $I->makeScreenshot('oQb_page2');
//  Press the back button to return to the village
$I->click(['xpath' => "//input[@value = 'Back']"]);
$I->seeInCurrentURL('/student/village');
示例#9
0
<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('see that the about page exists');
$I->amOnPage("/");

$I->seeResponseCodeIs(200);
$I->click('about', '#header');
$I->seeResponseCodeIs(200);
$I->canSeeInCurrentUrl('about');
$I->seeInTitle('about');
示例#10
0
<?php 
$I = new AcceptanceTester($scenario);
$I->wantTo('perform actions and see result');
$I->amOnPage("/");
$I->seeResponseCodeIs(200);
$I->seeInTitle("home");
<?php 
$I = new AcceptanceTester($scenario);
$I->wantTo('perform actions and see result');
$I->amOnPage('vocabulary/list.html');
$I->seeInTitle('Vocabularies');
示例#12
0
<?php

/**
 *  Acceptance test for the Readorium Game Garage screen.
 * 
 *  @author Andrew Lee
 */
$I = new AcceptanceTester($scenario);
//  Set up
$I->loadSessionSnapshot('login');
$I->am('student');
$I->wantTo('make sure the game garage page displays correctly');
//  Navigate to page and confirm things look right
$I->amOnPage('/student/game_garage');
$I->seeInTitle('Rising Reader Game Garage');
$I->seeElement("//div[@id='c2canvasdiv']/input[@type='button'][1]");
$I->makeScreenshot('spGame_garage');
//  Open the first game
$I->click(['xpath' => "//div[@id='c2canvasdiv']/input[@type='button'][1]"]);
$I->makeScreenshot('sqGg_game1');
//  Go back to main game page in order to test more games
$I->amOnPage('/student/game_garage');
// $I->click(['xpath' => "//div[@id='c2canvasdiv']/input[@type='button'][3]"]);
// $I->makeScreenshot('gg_game2');
// $I->amOnPage('/student/game_garage');
// $I->click(['xpath' => "//div[@id='c2canvasdiv']/input[@type='button'][4]"]);
// $I->makeScreenshot('gg_game3');
// $I->amOnPage('/student/game_garage');
//  Press the back button to return to the village
$I->click(['xpath' => "//div[@id='c2canvasdiv']/input[@type='button'][2]"]);
<?php
use Page\Acceptance\Home;

$I = new AcceptanceTester($scenario);
$I->wantTo('see that the home page exists');
$I->amOnPage(Home::$URL);
$I->seeInTitle(Home::$pageTitle);

$I->click('//*[@id="panel_default"]/div/ul/li[3]/a');
$I->canSeeInCurrentUrl('schema/list');
$I->seeInTitle('The Registry! :: Element Sets :: List');

示例#14
0
<?php 
$I = new AcceptanceTester($scenario);
$I->wantTo('perform actions and see result');
$I->amOnPage('endpoint.php');
$I->seeInTitle('SPARQL');
示例#15
0
<?php 
$I = new AcceptanceTester($scenario);
$I->wantTo('perform actions and see result');
$I->amOnPage('schema/list.html');
$I->seeInTitle('Element Sets');
<?php
use Page\Acceptance\Home;

$I = new AcceptanceTester($scenario);
$I->wantTo('see that the agent list page exists');
$I->amOnPage(Home::$URL);

$I->click('//*[@id="panel_default"]/div/ul/li[1]/a');
$I->canSeeInCurrentUrl('agent/list');
$I->seeInTitle('The Registry! :: Owners :: List Owners');

示例#17
0
<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('Admin login page');
$I->amOnPage('/admin');
$I->seeInCurrentUrl('/admin/index/login');
$I->seeInTitle('Login');
$I->seeElement('#login');
$I->seeElement('#password');
示例#18
0
<?php
use Page\Acceptance\Home;

$I = new AcceptanceTester($scenario);
$I->wantTo('see that the login page exists');
$I->amOnPage(Home::$URL);

$I->click('//*[@id="header"]/ul/li[1]/a'); //login
$I->canSeeInCurrentUrl('login');
$I->seeInTitle('The Registry! :: sign in / register');

示例#19
0
<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that frontpage works');
$I->amOnPage('/');
$I->seeInTitle('Free The Geek.fm - The podcast about the business of freelancing as a software developer, writer, content producer, and all round PHP lover.');
// Test the "about" section
$I->see("What's It About?");
$I->see("It's a fireside chat on the ins and outs of being a freelance writer, screencaster, teacher, and software developer. Looking at what it’s like to do it, warts and all, as well as how to get started, what to expect, the good, the bad, and the ugly. When we’re not talking that, we’re talking tech, code, apps, development, and of course PHP.");
// Test the subscribe buttons
$I->seeLink("Subscribe via RSS", "/rss.xml");
$I->seeLink("Subscribe on iTunes!", "https://itunes.apple.com/de/podcast/free-geek.fm-matthew-setter/id1018923368?l=en&mt=2");
// Test the "contact" section
$I->see('Got Questions');
$I->see("If you want to get in touch with me you'll, find all the contact details you need below");
$I->see("settermjd (skype)");
$I->see("*****@*****.**");
$I->seeLink("Matthew Setter", "http://www.matthewsetter.com");
$I->seeLink("the Slim Framework", "http://slimframework.com");
// Test the links
$I->seeLink("Free The Geek.fm", "/");
$I->seeLink("About", "/#about");
$I->seeLink("Contact", "/#contact");
$I->seeLink("Episodes", "/episodes");
// Test that the episodes appear on the home page
$I->see("Episodes", "//h2[@class='section-heading']");
$I->see("13.07.2015 / Episode 1", "//h3/a");
<?php
use Page\Acceptance\Home;

$I = new AcceptanceTester($scenario);
$I->wantTo('see that the vocabulary page exists');
$I->amOnPage(Home::$URL);

$I->click('//*[@id="panel_default"]/div/ul/li[2]/a');
$I->canSeeInCurrentUrl('vocabulary/list');
$I->seeInTitle('The Registry! :: Vocabularies :: List');

示例#21
0
<?php 
$I = new AcceptanceTester($scenario);
$I->wantTo('perform actions and see result');
$I->amOnPage('agent/list.html');
$I->seeInTitle('Owners');
示例#22
0
<?php

$I = new AcceptanceTester($scenario);
$I->am('student');
$I->wantTo('ensure that frontpage works');
$I->amOnPage('/');
$I->makeScreenshot('aLogin');
//Testing all the text fields
$I->seeInTitle('Readorium Student Login');
$I->seeLink('username');
$I->seeLink('password');
//Fill fields
$I->fillField(['xpath' => "//input[@name='userid']"], 'juth');
$I->fillField(['xpath' => "//input[@name='password']"], 'r3aD0riUm');
$I->fillField(['xpath' => "//input[@name='classroomid']"], '1');
$I->click('Login');
$I->makeScreenshot('bLibrary');
$I->saveSessionSnapshot('login');