Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,21 @@ public function navigateUsingBreadcrumb(Media $I)
public function uploadSingleFileUsingToolbarButton(Media $I)
{
$testFileName = 'test-image-1.png';
$testFileItem = MediaListPage::item($testFileName);

$I->wantToTest('the upload of a single file using toolbar button.');
$I->amOnPage(MediaListPage::$url . $this->testDirectory);
$I->waitForJsOnPageLoad();
$I->uploadFile('com_media/' . $testFileName);
$I->seeSystemMessage('Item uploaded.');
$I->seeContents([$testFileName]);
$I->click($testFileItem);
$I->click(MediaListPage::$toolbarDeleteButton);
$I->waitForElement(MediaListPage::$toolbarModalDeleteButton);
$I->waitForJsOnPageLoad();
$I->click(MediaListPage::$toolbarModalDeleteButton);
$I->seeSystemMessage('Item deleted.');
$I->waitForElementNotVisible($testFileItem);
}

/**
Expand Down Expand Up @@ -437,16 +445,20 @@ public function deleteMultipleFiles(Media $I)
$testFileItem1 = MediaListPage::item($testFileName1);
$testFileItem2 = MediaListPage::item($testFileName2);

$I->wantToTest('that it is possible to delete a single file.');
$I->wantToTest('that it is possible to delete a Multiple file.');
$I->amOnPage(MediaListPage::$url . $this->testDirectory);
$I->uploadFile('com_media/' . $testFileName1);
$I->waitForText('Item uploaded.');
$I->wait(10);
$I->waitForElement($testFileItem1);
$I->waitForMediaLoaded();
$I->uploadFile('com_media/' . $testFileName2);
$I->waitForText('Item uploaded.');
$I->wait(10);
$I->waitForMediaLoaded();
$I->waitForElement($testFileItem2);
$I->click($testFileItem1);
$I->clickHoldingShiftkey($testFileItem2);
$I->waitForText('Item uploaded.');
$I->wait(10);
$I->click(MediaListPage::$toolbarDeleteButton);
$I->waitForElement(MediaListPage::$toolbarModalDeleteButton);
$I->click(MediaListPage::$toolbarModalDeleteButton);
Expand Down