Skip to content

Commit

Permalink
Add Search nonexisting task scenario test case
Browse files Browse the repository at this point in the history
  • Loading branch information
RidwanMiftahulFalah committed Jun 16, 2023
1 parent fc6184f commit fbd5657
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion e2e/Task_CRUD.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Scenario('Read The Recently Updated Task and Check it`s Data Validity', async ({

Feature('Search Task');
Scenario('Search existing task', async ({I}) => {
I.say('I am going to search an existing task');
I.say('I am going to search an existing Task');
I.waitForElement('input#search-bar');
I.seeElement('input#search-bar');
I.fillField('input#search-bar', 'Updated Dummy Task Title');
Expand All @@ -199,6 +199,19 @@ Scenario('Search existing task', async ({I}) => {
I.seeElement(locate('h3.card-custom__title').withText('Updated Dummy Task Title'.toUpperCase()));
});

Scenario('Search nonexisting task', async ({I}) => {
I.waitForElement('input#search-bar');
I.seeElement('input#search-bar');
I.fillField('input#search-bar', 'Completely random task');
I.click('button#search-button');

I.say('I expect to see a "Task Not Found" warning message modal, and then close it');
I.waitForElement(locate('h2#swal2-title').withText('Task Not Found'));
I.seeElement(locate('h2#swal2-title').withText('Task Not Found'));
I.seeElement('button.swal2-confirm');
I.click('button.swal2-confirm');
});

Feature('Delete Task');
Scenario('Delete the existing task', async ({I}) => {
I.say('I expect to see the card element of a task, and then click it');
Expand Down

0 comments on commit fbd5657

Please sign in to comment.