Skip to content

Commit

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

test('Testing delete teachers', async t => {
await t.navigateTo("/addTeacher");
await t.navigateTo("/dbinitialize");
await t.typeText("#teacher-id", "300000");
await t.typeText("#teacher-name", "Hasitha Fernando");
await t.typeText("#teacher-age", "45");
await t.click("#teacher-add");
await t.click("#teacher-delete");

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

await t.click("#teacher-delete-300000");

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

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

0 comments on commit 315817d

Please sign in to comment.