Skip to content
Snippets Groups Projects
Commit 28c654f0 authored by Jovan Fang's avatar Jovan Fang Committed by Lily Yan
Browse files

ISTWCMS-6985: Codeception: Media above test error fix

parent 38bd02f6
No related branches found
No related tags found
1 merge request!71ISTWCMS-6985: Hero Banner Deleted Test
...@@ -234,26 +234,26 @@ class WcmsTestsMediaAboveCest { ...@@ -234,26 +234,26 @@ class WcmsTestsMediaAboveCest {
$counter == 0 $counter == 0
); );
// Delete banner image. // Increment the counter for the test image flag.
$i->amOnPage('admin/content/media'); $counter++;
$i->checkOption('input[id="edit-media-bulk-form-0"]'); }
$i->click('#edit-submit');
$i->waitForText('Are you sure you want to delete this media item?');
$i->click('#edit-submit');
// Return to content page. // Delete banner image.
$i->amOnPage($path); $i->amOnPage('admin/content/media');
$i->checkOption('input[id="edit-media-bulk-form-0"]');
$i->click('#edit-submit');
$i->waitForText('Are you sure you want to delete this media item?');
$i->click('#edit-submit');
// Check title still displays. // Return to content page.
$i->waitForText($node_title); $i->amOnPage($path);
$i->seeElement(Locator::contains('h1', $node_title));
// Re-upload image to media. // Check title still displays.
$this->setImageForMedia($i, $images[0]); $i->waitForText($node_title);
$i->seeElement(Locator::contains('h1', $node_title));
// Increment the counter for the test image flag. // Re-upload image to media.
$counter++; $this->setImageForMedia($i, $images[array_key_last($images)]);
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment