<?php

use Tribe\Events\Test\Acceptance\Steps\EventSteps;
$scenario->group('settings');
$I = new EventSteps($scenario);
//Activate TEC Calendar
$I->am('administrator');
$I->wantTo("verify that deleted events can't be viewed on front end");
$I->loginAsAdmin();
$I->amOnPluginsPage();
$I->activatePlugin('the-events-calendar');
$I->amOnPluginsPage();
// skip the welcome message
$I->seePluginActivated('the-events-calendar');
//Set Permalinks to pretty
$I->amOnPage('wp-admin/options-permalink.php');
$I->see('Permalink Settings');
$I->selectOption('form input[name=selection]', '/%postname%/');
$I->click('Save Changes');
//Set up test Event and test it exists
$I->createEvent(array('title' => "Test Event A"));
$I->amOnPage("event/test-event-a");
$I->see('Test Event A');
//Delete Event
$I->click('Edit Page');
$I->click('Move to Trash');
$I->amOnPage('event/test-event-a');
$I->see('Oops! Page Not Found.');
<?php

use Tribe\Events\Test\Acceptance\Steps\EventSteps;
$scenario->group('settings');
$I = new EventSteps($scenario);
$I->am('administrator');
$I->wantTo('verify that TEC Single Event Slug Setting');
// Activate The Events Calendar Plugin
$I->loginAsAdmin();
$I->amOnPluginsPage();
$I->activatePlugin('the-events-calendar');
$I->see('Thanks for Updating');
// Set Permalink to "pretty"
$I->amOnPage('/wp-admin/options-permalink.php');
$I->see('Permalink Settings');
$I->selectOption('form input[name=selection]', '/%postname%/');
$I->click('Save Changes');
// Create new Event
$I->createEvent(array('title' => "Sample Event"));
// Navigate to new Event
// Verify Event is at default URL
$I->amOnPage("/event/sample-event");
$I->see('Sample Event');
// Change Event URL
$I->amOnPage('/wp-admin/edit.php?post_type=tribe_events&page=tribe-events-calendar');
$I->fillField('singleEventSlug', 'box');
$I->click('Save Changes');
// Verify Event is at new URL.
$I->amOnPage('/box/sample-event');
$I->see('Sample Event');