This suite contains manual tests for the e-commerce checkout functionality, covering cart management, shipping options, payment processing, and order completion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const inventory = [ | |
{ name: 'sword', weight: 3}, | |
{ name: 'pickaxe', weight: 2}, | |
{ name: 'bow', weight: 1}, | |
] | |
var inventoryWeight = 0; | |
function addToInventory(item) { | |
// if weight of items in inventory | |
// less than 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run it as DEBUG=true rails test | |
if ENV['DEBUG'] | |
Rails.logger = Logger.new(STDOUT) | |
Rails.logger.level = Logger::INFO | |
Rails.logger.datetime_format = "" | |
Rails.logger.formatter = proc do |severity, _time, _progname, msg| | |
"#{severity.green}: #{msg}\n" | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Codeception\Module; | |
use Codeception\Exception\ConfigurationException; | |
use Codeception\Exception\ModuleException; | |
use Codeception\Test\Test; | |
use Codeception\TestInterface; | |
use PhpPact\Consumer\Model\Interaction; | |
use PhpPact\Exception\ConnectionException; | |
use PhpPact\Http\GuzzleClient; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
get model() { | |
return [{ | |
id: 1, | |
name: 'Write tests from scratch', | |
isVisible: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="post" action="/update" id="update_form"> | |
<label for="user_name">Name</label> | |
<input type="text" name="user[name]" id="user_name" /> | |
<label for="user_email">Email</label> | |
<input type="text" name="user[email]" id="user_email" /> | |
<label for="user_role">Role</label> | |
<select id="user_role" name="user[role]"> | |
<option value="0">Admin</option> | |
<option value="1">User</option> | |
</select> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Codeception\TestInterface; | |
use FR3D\SwaggerAssertions\PhpUnit\AssertsTrait; | |
use FR3D\SwaggerAssertions\SchemaManager; | |
class Api extends \Codeception\Module | |
{ | |
use AssertsTrait; | |
public function _before(TestInterface $test) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Helper; | |
// here you can define custom actions | |
// all public methods declared in helper class will be available in $I | |
class Raml extends \Codeception\Module | |
{ | |
public function parseSchemaFor($type) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should create todo item', (I) => { | |
browser.get("http://todomvc.com/examples/angularjs/#/"); | |
expect(element(by.css("#todo-count")).isPresent()).toBeFalsy(); | |
var inputField = element(by.model("newTodo")); | |
inputField.sendKeys("Write a guide"); | |
inputField.sendKeys(protractor.Key.ENTER); | |
var todos = element.all(by.repeater("todo in todos")); | |
expect(todos.last().getText()).toEqual("Write a guide")); | |
element(by.css("#todo-count")).getText()).toContain('1 items left'); | |
}); |
NewerOlder