Skip to content

Commit

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

test('Testing add students', async t => {
await t.navigateTo("/Students");
await t.navigateTo("/dbinitialize");
await t.typeText("#student-id", "999999");
await t.typeText("#student-name", "Pasindu Basnayaka");
await t.typeText("#student-age", "45");
await t.typeText("#student-Hometown", "Catholic");
await t.click("#student-add");

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

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



0 comments on commit 7d1b77d

Please sign in to comment.