Skip to content

Commit

Permalink
Update teacher-add.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedNufais5891 authored Jan 1, 2025
1 parent 9f006fb commit 0ca6e5f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/test/teacher-add.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@ fixture`Testing Teacher UI`

test('Testing add teachers', async t => {
await t.navigateTo("/dbinitialize");

await t.navigateTo("/addTeacher");
await t.typeText("#teacher-id", "123456");
await t.typeText("#teacher-name", "Mohan Perera");
await t.typeText("#teacher-age", "45");
await t.click("#teacher-add");

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

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).contains("Mohan Perera");
await t.expect(tdText).contains("dbinitialize");
});

0 comments on commit 0ca6e5f

Please sign in to comment.