예제 #1
0
 public function create(AcceptanceTester $I)
 {
     $clientEmail = $this->faker->safeEmail;
     $productKey = $this->faker->text(10);
     $amount = rand(1, 10);
     $I->wantTo('enter a payment');
     // create client
     $I->amOnPage('/clients/create');
     $I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
     $I->click('Save');
     $I->see($clientEmail);
     // create product
     $I->amOnPage('/products/create');
     $I->fillField(['name' => 'product_key'], $productKey);
     $I->fillField(['name' => 'notes'], $this->faker->text(80));
     $I->fillField(['name' => 'cost'], $this->faker->numberBetween(11, 20));
     $I->click('Save');
     $I->see($productKey);
     // create invoice
     $I->amOnPage('/invoices/create');
     $I->selectDropdown($I, $clientEmail, '.client_select .dropdown-toggle');
     $I->fillField('table.invoice-table tbody tr:nth-child(1) #product_key', $productKey);
     $I->click('Save');
     $I->see($clientEmail);
     $I->amOnPage('/payments/create');
     $I->selectDropdown($I, $clientEmail, '.client-select .dropdown-toggle');
     $I->selectDropdownRow($I, 1, '.invoice-select .combobox-container');
     $I->fillField(['name' => 'amount'], $amount);
     $I->selectDropdown($I, 'Cash', '.payment-type-select .dropdown-toggle');
     $I->selectDataPicker($I, '#payment_date', 'now + 1 day');
     $I->fillField(['name' => 'transaction_reference'], $this->faker->text(12));
     $I->click('Save');
     $I->see('Successfully created payment');
     $I->seeInDatabase('payments', ['amount' => number_format($amount, 2)]);
 }
예제 #2
0
 private function EtsySpamCest(\AcceptanceTester $I)
 {
     $I->amOnPage("/");
     $I->waitForElement('//*[@id="sign-in"]', 100);
     $I->click('//*[@id="sign-in"]');
     $I->wait(3);
     $I->fillField('input#username-existing', 'sammacad');
     $I->fillField('input#password-existing', '1!2@3#4$5%');
     $I->click('//*[@id="signin-button"]');
     $I->waitForElement('.user-nav');
     // send spam
     $result = $this->db->query("SELECT * FROM `etsy_user_list` WHERE `sent_at` is null");
     while ($row = $result->fetch_array()) {
         $shop = $row['from_where'];
         $temp = explode('/', $row['user_slug']);
         $user = $temp[sizeof($temp) - 1];
         $I->amOnPage("/people/{$user}");
         $I->click('//*[@id="tabbed-navigation-list"]/li[4]/a');
         $I->waitForElement('//*[@id="conversation-send-form"]/div[2]/div[2]/input', 100);
         $I->fillField('//*[@id="conversation-send-form"]/div[2]/div[2]/input', "Hi {$user}");
         $I->fillField('//*[@id="conversation-send-form"]/div[2]/div[2]/textarea', "Dear {$user}, I read your review on Etsy's {$shop} shop. How was your experience with them? We are creating a community for Etsy shoppers just like you! Please visit http://storeplore.com and get early access!");
         $this->db->real_query("UPDATE `etsy_user_list` SET `sent_at`= CURRENT_TIMESTAMP WHERE `user_slug` = '" . $row['user_slug'] . "'");
         $I->click('//*[@id="conversation-send-form"]/div[3]/div/button');
         $rand_sec = rand(80, 120);
         $I->wait($rand_sec);
     }
 }
예제 #3
0
 private function submitTheForm(AcceptanceTester $I, $attributes)
 {
     $I->waitForElement('form', 2);
     $I->fillField('form #title', $attributes['title']);
     $I->fillField('form #content', $attributes['content']);
     $I->click('form .btn-primary');
 }
예제 #4
0
 public function editCategoryNotVisibleTime(AcceptanceTester $I)
 {
     $I->logInAsAnAdmin();
     $I->amOnEditCategory(CI_EDITABLE_CATEGORY_ID);
     $title = time() . 'title';
     $I->fillField('title', $title);
     $I->checkOption('#exposed');
     $from = date_time(time() - 10000);
     $until = date_time(time() - 100);
     $I->fillField('available_from', $from);
     $I->fillField('available_until', $until);
     $I->click('Save changes');
     $I->waitForText('Edit category');
     $I->seeCheckboxIsChecked('#exposed');
     $I->seeInField('available_from', $from);
     $I->seeInField('available_until', $until);
     $I->amOnPage('/challenges');
     $I->see($title);
     $I->amOnPage('/challenges?category=' . to_permalink($title));
     $I->see('Category unavailable');
     $I->see('This category is not available. It is open from ' . $from);
     $I->see('until ' . $until);
     $I->amOnAdminHome();
     $I->see($title);
 }
예제 #5
0
 public function createExpense(AcceptanceTester $I)
 {
     $I->wantTo('Create an expense');
     $vendorName = $this->faker->name;
     $clientEmail = $this->faker->safeEmail;
     $amount = $this->faker->numberBetween(10, 20);
     // create vendor
     $I->amOnPage('/vendors/create');
     $I->fillField(['name' => 'name'], $vendorName);
     $I->click('Save');
     $I->see($vendorName);
     $vendorId = $I->grabFromDatabase('vendors', 'id', ['name' => $vendorName]);
     // create client
     $I->amOnPage('/clients/create');
     $I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
     $I->click('Save');
     $I->see($clientEmail);
     // create expense
     $I->amOnPage('/expenses/create');
     $I->fillField(['name' => 'amount'], $amount);
     $I->selectDropdown($I, $vendorName, '.vendor-select .dropdown-toggle');
     $I->selectDropdown($I, $clientEmail, '.client-select .dropdown-toggle');
     $I->click('Save');
     $I->seeInDatabase('expenses', ['vendor_id' => $vendorId]);
     // invoice expense
     $I->executeJS('submitAction(\'invoice\')');
     $I->click('Save');
     $I->wait(1);
     $I->see($clientEmail);
     $I->see($amount);
 }
예제 #6
0
 public function doAddMenuOptionValue(\AcceptanceTester $I, $num, $name, $price, $quantity)
 {
     $I->click('#tfoot .action .btn-primary');
     $I->selectOption("#option-value{$num} select", $name);
     $I->fillField("menu_options[1][option_values][{$num}][price]", $price);
     $I->fillField("menu_options[1][option_values][{$num}][quantity]", $quantity);
     $I->click("#option-value{$num} label.btn:not(.active)");
 }
예제 #7
0
 /**
  * Define custom actions here
  */
 function checkIfLogin(\AcceptanceTester $I)
 {
     //if ($I->loadSessionSnapshot('login')) return;
     $I->amOnPage('/login');
     $I->fillField(['name' => 'email'], Fixtures::get('username'));
     $I->fillField(['name' => 'password'], Fixtures::get('password'));
     $I->click('Let\'s go');
     //$I->saveSessionSnapshot('login');
 }
예제 #8
0
 private function logIn(\AcceptanceTester $I)
 {
     $I->amOnPage("/");
     $I->waitForElement('//*[@id="doc"]/div[1]/div/div[1]/div[2]/button', 100);
     $I->click('//*[@id="doc"]/div[1]/div/div[1]/div[2]/button');
     $I->fillField('//*[@id="signin-email"]', '*****@*****.**');
     $I->fillField('//*[@id="signin-password"]', 'lovelove79');
     $I->click('//*[@id="login-dialog-dialog"]/div[2]/div[2]/div[2]/form/input[1]');
     $I->waitForElement('.bird-topbar-etched', 100);
 }
예제 #9
0
 private function logIn(\AcceptanceTester $I)
 {
     $I->amOnPage("/");
     $I->waitForElement('//*[@id="welcome"]/div[1]/div[1]/a[2]', 100);
     $I->click('//*[@id="welcome"]/div[1]/div[1]/a[2]');
     $I->waitForElement('//*[@id="signin-login-field"]', 100);
     $I->fillField('//*[@id="signin-login-field"]', '*****@*****.**');
     $I->fillField('//*[@id="signin-password-field"]', '1!2@3#4$5%');
     $I->click('//*[@id="new_user"]/div[2]/input');
     $I->waitForElement('//*[@id="navbar-user-dynamic"]/ul/li[2]/a[1]/img', 100);
 }
예제 #10
0
 /**
  * Submit the project create/update form.
  * @param \AcceptanceTester|\FunctionalTester $I
  * @param array                               $fields
  */
 public static function submit($I, $fields)
 {
     if ($fields['image']) {
         $I->attachFile('#uploadform-newimage', $fields['image']);
     }
     $I->fillField(['name' => 'Project[name]'], $fields['name']);
     $I->selectOption(['name' => 'Project[coordinator]'], $fields['coordinator']);
     $I->fillField(['name' => 'Project[status]'], $fields['status']);
     $I->fillField(['name' => 'UploadForm[newImageDescription][]'], $fields['imageDescription']);
     $I->click('#project-form button');
 }
예제 #11
0
 public function login(AcceptanceTester $I)
 {
     $I->amOnPage(Url::toRoute('/site/login'));
     $I->see('Введите логин и пароль для входа в систему:');
     $I->fillField('LoginForm[username]', 'admin');
     $I->fillField('LoginForm[password]', 'admin');
     $I->click('login-button');
     $I->wait(2);
     // wait for button to be clicked
     $I->see('Главное меню');
 }
예제 #12
0
 public function register(\AcceptanceTester $I)
 {
     $I->amGoingTo('register');
     $I->amOnPage('/auth/register');
     $I->fillField('name', 'codeception');
     $I->fillField('password', 'acceptance');
     $I->fillField('email', '*****@*****.**');
     $I->click('submit');
     $I->see('Registered successfully!');
     $I->seeLink('Go back to Home');
     $I->click('Go back to Home');
     $I->seeInCurrentUrl('/');
 }
예제 #13
0
 public function ensureThatLoginWorks(AcceptanceTester $I)
 {
     $I->amOnPage(Url::toRoute('/user/login'));
     $I->see('Login', 'h1');
     $I->amGoingTo('try to login with correct credentials');
     $I->fillField('input[name="LoginForm[username]"]', 'admin');
     $I->fillField('input[name="LoginForm[password]"]', 'admin');
     $I->click('login-button');
     $I->wait(2);
     // wait for button to be clicked
     $I->expectTo('see user info');
     $I->see('Logout');
 }
 public function logsInUserWithProperCredentials(AcceptanceTester $I)
 {
     $I->am('Site Owner');
     $I->wantTo('login to a password-protected area');
     $I->lookForwardTo('perform administrative tasks');
     $I->amOnPage('/admin');
     $I->seeCurrentUrlEquals('/login');
     $I->fillField('email', '*****@*****.**');
     $I->fillField('password', '1234');
     $I->click('Login');
     $I->seeCurrentUrlEquals('/admin');
     $I->see('Admin Area', 'h1');
 }
예제 #15
0
 public function contactFormCanBeSubmitted(AcceptanceTester $I)
 {
     $I->amGoingTo('submit contact form with correct data');
     $I->fillField('#contactform-name', 'tester');
     $I->fillField('#contactform-email', '*****@*****.**');
     $I->fillField('#contactform-subject', 'test subject');
     $I->fillField('#contactform-body', 'test content');
     $I->fillField('#contactform-verifycode', 'testme');
     $I->click('contact-button');
     $I->wait(2);
     // wait for button to be clicked
     $I->dontSeeElement('#contact-form');
     $I->see('Thank you for contacting us. We will respond to you as soon as possible.');
 }
 /**
  * Create the first site user
  *
  * @param \AcceptanceTester $I
  */
 public function createFirstUserTest(\AcceptanceTester $I)
 {
     $I->wantTo('create the first user');
     // Ensure we're on the first user page
     $I->amOnPage('/bolt/userfirst');
     $I->see('Please create the first user');
     // Fill in the form and submit
     $I->fillField('form[username]', $this->user['admin']['username']);
     $I->fillField('form[password]', $this->user['admin']['password']);
     $I->fillField('form[password_confirmation]', $this->user['admin']['password']);
     $I->fillField('form[email]', $this->user['admin']['email']);
     $I->fillField('form[displayname]', $this->user['admin']['displayname']);
     $I->click('button[type=submit]');
 }
예제 #17
0
 public function taxRates(AcceptanceTester $I)
 {
     $I->wantTo('test tax rates');
     $clientEmail = $this->faker->safeEmail;
     $productKey = $this->faker->text(10);
     $itemTaxRate = $this->faker->randomFloat(2, 5, 15);
     $itemTaxName = $this->faker->word();
     $invoiceTaxRate = $this->faker->randomFloat(2, 5, 15);
     $invoiceTaxName = $this->faker->word();
     $itemCost = $this->faker->numberBetween(1, 20);
     $total = $itemCost;
     $total += round($itemCost * $itemTaxRate / 100, 2);
     $total += round($itemCost * $invoiceTaxRate / 100, 2);
     // create tax rates
     $I->amOnPage('/tax_rates/create');
     $I->fillField(['name' => 'name'], $itemTaxName);
     $I->fillField(['name' => 'rate'], $itemTaxRate);
     $I->click('Save');
     $I->see($itemTaxName);
     $I->amOnPage('/tax_rates/create');
     $I->fillField(['name' => 'name'], $invoiceTaxName);
     $I->fillField(['name' => 'rate'], $invoiceTaxRate);
     $I->click('Save');
     $I->see($invoiceTaxName);
     // enable line item taxes
     $I->amOnPage('/settings/tax_rates');
     $I->checkOption('#invoice_item_taxes');
     $I->click('Save');
     // create product
     $I->amOnPage('/products/create');
     $I->fillField(['name' => 'product_key'], $productKey);
     $I->fillField(['name' => 'notes'], $this->faker->text(80));
     $I->fillField(['name' => 'cost'], $itemCost);
     $I->selectOption('select[name=default_tax_rate_id]', $itemTaxName . ' ' . $itemTaxRate . '%');
     $I->click('Save');
     $I->wait(1);
     $I->see($productKey);
     // create client
     $I->amOnPage('/clients/create');
     $I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
     $I->click('Save');
     $I->see($clientEmail);
     // create invoice
     $I->amOnPage('/invoices/create');
     $I->selectDropdown($I, $clientEmail, '.client_select .dropdown-toggle');
     $I->fillField('table.invoice-table tbody tr:nth-child(1) #product_key', $productKey);
     $I->selectOption('#taxRateSelect', $invoiceTaxName . ' ' . $invoiceTaxRate . '%');
     $I->wait(2);
     // check total is right before saving
     $I->see("\${$total}");
     $I->click('Save');
     $I->wait(1);
     $I->see($clientEmail);
     // check total is right after saving
     $I->see("\${$total}");
     $I->amOnPage('/invoices');
     // check total is right in list view
     $I->see("\${$total}");
 }
예제 #18
0
 /**
  * Create the first site user
  *
  * @param \AcceptanceTester $I
  */
 public function createFirstUserTest(\AcceptanceTester $I)
 {
     $I->wantTo('create the first user');
     // Ensure we're on the first user page
     $I->amOnPage('/');
     $I->see('Please create the first user');
     // Fill in the form and submit
     $I->fillField('form[username]', $this->user['admin']['username']);
     $I->fillField('form[password]', $this->user['admin']['password']);
     $I->fillField('form[password_confirmation]', $this->user['admin']['password']);
     $I->fillField('form[email]', $this->user['admin']['email']);
     $I->fillField('form[displayname]', $this->user['admin']['displayname']);
     $I->click('button[type=submit]');
     // We should now be logged in an greeted!
     $I->see('Welcome to your new Bolt site');
 }
 public function updateInvoiceDesign(AcceptanceTester $I)
 {
     $I->wantTo('Design my invoice');
     $I->amOnPage('/settings/invoice_design');
     $I->click('select#invoice_design_id');
     $I->click('select#invoice_design_id option:nth-child(2)');
     $I->fillField('#font_size', 10);
     $I->click('#primary_color + .sp-replacer');
     $I->executeJS('$("#primary_color").val("#7364b6")');
     $I->executeJS('$(".sp-container:nth-child(1) .sp-choose").click()');
     $I->click('#secondary_color + .sp-replacer');
     $I->executeJS('$("#secondary_color").val("#aa6709")');
     $I->executeJS('$(".sp-container:nth-child(2) .sp-choose").click()');
     /*
     $I->fillField(['name' => 'labels_item'], $this->faker->text(6));
     $I->fillField(['name' => 'labels_description'], $this->faker->text(12));
     $I->fillField(['name' => 'labels_unit_cost'], $this->faker->text(12));
     $I->fillField(['name' => 'labels_quantity'], $this->faker->text(8));
     
     $I->uncheckOption('#hide_quantity');
     $I->checkOption('#hide_paid_to_date');
     */
     $I->click('Save');
     $I->wait(3);
     $I->seeInDatabase('accounts', ['font_size' => 10]);
 }
예제 #20
0
 public function i_can_edit_the_users_email(\AcceptanceTester $I)
 {
     $I->clickNode('#attribute3-node');
     $I->fillField('text', '*****@*****.**');
     $I->click('button.dvs-sidebar-save-group');
     $I->wait(self::WAIT_TIME);
     $I->seeInDatabase('users', array('email' => '*****@*****.**'));
 }
예제 #21
0
 /**
  * Tests One Page Checkout
  *
  * @group checkout
  *
  * @param $I \AcceptanceTester
  *
  * @depends testAddProductToCart
  */
 public function testOnePageCheckout(AT $I)
 {
     $I->am('Guest Customer');
     $I->wantTo('use One Page Checkout');
     $I->lookForwardTo('experience flawless checkout');
     $I->amGoingTo('place an order as a guest');
     $I->amOnPage(Page\Checkout::$URL);
     $I->amGoingTo('select the checkout type');
     $I->selectOption(Page\Checkout::$radioTypeGuest, 'guest');
     $I->click(Page\Checkout::$continueButton);
     $I->amGoingTo('fill my address');
     $I->fillField(Page\Checkout::$billingFirstname, $this->getConfig('firstname'));
     $I->fillField(Page\Checkout::$billingLastname, $this->getConfig('lastname'));
     $I->fillField(Page\Checkout::$billingEmail, $this->getConfig('email'));
     $I->selectOption(Page\Checkout::$billingCountryId, $this->getConfig('country_id'));
     $I->fillField(Page\Checkout::$billingStreet1, $this->getConfig('street'));
     $I->fillField(Page\Checkout::$billingPostcode, $this->getConfig('postcode'));
     $I->fillField(Page\Checkout::$billingCity, $this->getConfig('city'));
     $I->fillField(Page\Checkout::$billingTelephone, $this->getConfig('phone'));
     $I->click('button', Page\Checkout::$billingAddressContainer);
     $I->amGoingTo('select shipping method');
     $I->waitForElementVisible(Page\Checkout::$shippingButtonsContainer);
     $I->selectOption(Page\Checkout::$shippingMethodInput, Page\Checkout::$shippingMethod);
     $I->click('button', Page\Checkout::$shippingButtonsContainer);
     $I->waitForElementVisible(Page\Checkout::$paymentButtonsContainer);
     // $I->amGoingTo('select payment method');
     // $I->click(Page\Checkout::$paymentMethod);
     $I->click('button', Page\Checkout::$paymentButtonsContainer);
     $I->waitForElementVisible(Page\Checkout::$checkoutReviewContainer);
     $I->amGoingTo('review and finish my order');
     $I->click('button', Page\Checkout::$checkoutReviewContainer);
     $I->wait(7);
 }
예제 #22
0
 /**
  * @depends createNews
  */
 public function editNews(AcceptanceTester $I)
 {
     $I->logInAsAnAdmin();
     $I->amOnListNews();
     $I->click('Edit');
     $I->waitForText('Edit news item');
     $I->seeInCurrentUrl('/edit_news');
     $title = time() . 'title';
     $body = time() . 'body';
     $I->fillField('title', $title);
     $I->fillField('body', $body);
     $I->click('Save changes');
     $I->seeInCurrentUrl('/edit_news');
     $I->seeInField('title', $title);
     $I->seeInField('body', $body);
     $I->amOnPage('/home');
     $I->see($title);
     $I->see($body);
 }
예제 #23
0
 public function editTask(AcceptanceTester $I)
 {
     $description = $this->faker->text(100);
     $I->wantTo('edit a task');
     $I->amOnPage('/tasks/1/edit');
     $I->seeCurrentUrlEquals('/tasks/1/edit');
     $I->fillField('#description', $description);
     $I->click('Save');
     $I->seeInDatabase('tasks', ['description' => $description]);
 }
예제 #24
0
 /**
  * @depends openUpdateMatvid
  */
 public function saveUpdateMatvid(AcceptanceTester $I)
 {
     $I->seeInField(['name' => 'Matvid[matvid_name]'], 'Монитор');
     $I->fillField('Matvid[matvid_name]', 'Монитор ЖК');
     $I->click('//button[contains(text(), "Обновить")]');
     $I->wait(2);
     $I->seeElement(['id' => 'matvidgrid_gw']);
     $I->see('Монитор ЖК');
     $I->seeElement('button', ['title' => 'Удалить']);
 }
 public function _before(AcceptanceTester $I)
 {
     // Login Procedure
     $I->wantTo('Further Configure WC');
     $I->amOnPage('/wp-admin/');
     $I->fillField('#user_login', 'admin');
     $I->fillField('#user_pass', '123456');
     $I->click('Log In');
     $I->see('Dashboard');
     //////////////////////
     // Create Product
     $I->amOnPage('/wp-admin/post-new.php?post_type=product');
     $I->see('Add New Product');
     $I->fillField('Product name', 'Test Product');
     $I->fillField('.mce-edit-arear', 'Test Product');
     $I->fillField('_regular_price', '10');
     $I->click('#publish');
     $I->wait(2);
 }
예제 #26
0
 public function i_can_save_this_model(\AcceptanceTester $I)
 {
     $value = $I->generateRandomString();
     $I->clickNode('#model0-node');
     $I->click('.dvs-sidebar-elements button');
     $I->waitForElement('#dvs-sidebar-field-form', 5);
     $I->fillField('text', $value);
     $I->click('button.dvs-sidebar-save-group');
     $I->wait(10);
     $I->seeInDatabase('dvs_test_models', array('id' => 1, 'name' => $value));
 }
예제 #27
0
 public function i_can_create_a_new_user(\AcceptanceTester $I)
 {
     $I->clickNode('#creatorcreator-933e76acb06dec2ba6c31ba9c058a4e9-node');
     $I->click('button[data-creator-attribute-name="Name"]');
     $I->waitForElement('#dvs-sidebar-field-form', self::WAIT_TIME);
     $I->fillField('text', 'tester');
     $I->click('a[data-breadcrumb-id="0"]');
     $I->wait(1);
     $I->click('button[data-creator-attribute-name="Email"]');
     $I->waitForElement('#dvs-sidebar-field-form', self::WAIT_TIME);
     $I->fillField('text', '*****@*****.**');
     $I->click('a[data-breadcrumb-id="0"]');
     $I->wait(1);
     $I->click('button[data-creator-attribute-name="Password"]');
     $I->waitForElement('#dvs-sidebar-field-form', self::WAIT_TIME);
     $I->fillField('text', 'password');
     $I->click('button.dvs-sidebar-save-group');
     $I->wait(self::WAIT_TIME);
     $I->seeInDatabase('users', array('email' => '*****@*****.**'));
 }
 public function _before(AcceptanceTester $I)
 {
     $I->wantTo('Further Configure WC');
     $I->loginAsAdmin();
     //Only if Run this test Seperately
     //////////////////////
     $I->amGoingTo('Configure the Selling Country');
     $I->amOnPage('/wp-admin/admin.php?page=wc-settings');
     $I->click('#select2-chosen-2');
     $I->fillField('#s2id_autogen2_search', 'Αττική');
     $I->click('.select2-match');
     //////////////////////
     $I->amGoingTo('Configure the Default Currency');
     $I->click('#select2-chosen-7');
     $I->fillField('#s2id_autogen7_search', 'Euro');
     $I->click('.select2-result-label');
     $I->click('Save changes');
     //////////////////////
     $I->wait(3);
 }
예제 #29
0
 public function tryToTransferFundsBetweenMembers(AcceptanceTester $I)
 {
     $I->am('ewallet member');
     $I->wantTo('pay a debt');
     $I->lookForwardTo('transfer funds to my friend');
     $I->amOnPage(TransferFundsPage::$formPage);
     $I->selectOption(TransferFundsPage::$toMember, 'Luis Montealegre');
     $I->fillField(TransferFundsPage::$amount, 5);
     $I->click(TransferFundsPage::$transfer);
     $I->seeCurrentUrlMatches('/' . TransferFundsPage::$transferPage . '/');
     $I->seeElement(TransferFundsPage::$successMessage);
 }
예제 #30
0
 public function submitCorrect(AcceptanceTester $I)
 {
     $I->logInAsANormalUser();
     $I->amOnPage('/challenges?category=' . to_permalink(CI_DEFAULT_CATEGORY_TITLE));
     $I->see(CI_DEFAULT_CHALLENGE_TITLE);
     $I->see(CI_DEFAULT_CHALLENGE_DESCRIPTION);
     $flag_field = '#flag-input-' . CI_DEFAULT_CHALLENGE_ID;
     $I->fillField($flag_field, CI_DEFAULT_CHALLENGE_FLAG);
     $I->click('#flag-submit-' . CI_DEFAULT_CHALLENGE_ID);
     $I->seeInCurrentUrl('status=correct');
     $I->dontSeeElement($flag_field);
 }