diff --git a/tests/_output/.gitkeep b/tests/_output/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 256ee39..07524bc 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -9,7 +9,7 @@ modules: enabled: - Asserts - WebDriver: - url: http://test:80 + url: http://gist-it-php.servidor:80 browser: phantomjs port: 4444 window_size: 1024x800 diff --git a/tests/acceptance/EmbedCest.php b/tests/acceptance/EmbedCest.php index 492ac91..353167b 100644 --- a/tests/acceptance/EmbedCest.php +++ b/tests/acceptance/EmbedCest.php @@ -7,10 +7,26 @@ public function _before(AcceptanceTester $I) { } - // tests - public function embed(AcceptanceTester $I) + /** + * Run: php ../vendor/bin/codecept run --steps from 'tests' directory + * + * @param AcceptanceTester $I + */ + public function testEmbedExample(AcceptanceTester $I) { $I->wantTo('generate code embed for Github URL'); - $I->amOnPage('/trasweb/Team/blob/develop/Team.php'); + $I->amOnPage('/example.html'); + $I->canSeeInTitle('Gist-it-php - Example'); + + //piece of code + $I->cansee('namespace gist_it_php'); + $I->cansee('const _APP_ = __DIR__;'); + + //Relative links + $I->canSeeLink('view raw', 'https://github.com/trasweb/gist-it-php/raw/master/index.php'); + $I->canSeeLink('index.php', 'https://github.com/trasweb/gist-it-php/blob/master/index.php'); + + //line numbers in gutter + $I->cansee('28', '.gist-gutter'); } -} +} \ No newline at end of file