Skip to content

Commit

Permalink
Update student-delete.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedNufais5891 authored Jan 1, 2025
1 parent 45a3fb3 commit 7516c26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/test/student-delete.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ fixture`Testing Student UI`
.page`http://localhost:4401/student`

test('Testing delete students', async t => {
await t.navigateTo("/dbinitialize");
await t.navigateTo("/addStudent");
await t.typeText("#student-id", "222222");
await t.typeText("#student-name", "Hiruni Gajanayake");
await t.typeText("#student-age", "45");
await t.typeText("#student-Hometown", "buddhist");
await t.click("#student-delete");
await t.click("#student-add");

await t.navigateTo("/dbinitialize");
await t.navigateTo("/student");

await t.click("#student-delete-222222");

const table = Selector('#student-table')
const rowCount = await table.find('tr').count;

let tdText = await table.find('tr').nth(rowCount - 1).innerText;
await t.expect(tdText).notContains("dbinitialize");
await t.expect(tdText).notContains("Hiruni Gajanayake");
});

0 comments on commit 7516c26

Please sign in to comment.