eliminate incorrect excel file

This commit is contained in:
mildred 2024-03-25 13:30:46 +01:00
parent d43f893c74
commit 3c6cb39956
3 changed files with 2 additions and 33 deletions

View file

@ -35,11 +35,9 @@ test.describe('USER Section Tests', () => {
const userPersonalInformationPage = new UserPersonalInformationPage(page); const userPersonalInformationPage = new UserPersonalInformationPage(page);
for (let user of testingUsers) { for (let user of testingUsers) {
console.log("Modifying user: ", user)
await gotoBasicInfoPageOfTheUser(page, user); await gotoBasicInfoPageOfTheUser(page, user);
await userPersonalInformationPage.selectModifyUser(); await userPersonalInformationPage.selectModifyUser();
await basicInfoPage.updateUserBasicInfo(user.firstName, user.lastName, user.email, false); await basicInfoPage.updateUserBasicInfo(user.firstName, user.lastName, user.email, false);
console.log("Updated basic data for user: ", user.email)
} }
}); });
@ -55,14 +53,12 @@ test.describe('USER Section Tests', () => {
const addMembershipPage = new AddMembershipPage(page); const addMembershipPage = new AddMembershipPage(page);
for (let user of testingUsers) { for (let user of testingUsers) {
console.log("Modifying membership for user: ", user)
// Update the membership // Update the membership
await gotoBasicInfoPageOfTheUser(page, user); await gotoBasicInfoPageOfTheUser(page, user);
await userPersonalInformationPage.selectModifyUser(); await userPersonalInformationPage.selectModifyUser();
await membershipSectionPage.selectAddMembershipButton(); await membershipSectionPage.selectAddMembershipButton();
await addMembershipPage.addNewUserMembership('2', '2022-01-12', '2026-01-12') await addMembershipPage.addNewUserMembership('2', '2022-01-12', '2026-01-12')
console.log("Create a new membership for user: ", user.email)
// Validate the updated user data // Validate the updated user data
await gotoBasicInfoPageOfTheUser(page, user); await gotoBasicInfoPageOfTheUser(page, user);
@ -79,12 +75,10 @@ test.describe('USER Section Tests', () => {
const basicInfoPage = new BasicUserInfoSectionPage(page); const basicInfoPage = new BasicUserInfoSectionPage(page);
const userPersonalInformationPage = new UserPersonalInformationPage(page); const userPersonalInformationPage = new UserPersonalInformationPage(page);
console.log("Modifying user: ", testingUsers[4]);
let user = testingUsers[4]; let user = testingUsers[4];
await gotoBasicInfoPageOfTheUser(page, user); await gotoBasicInfoPageOfTheUser(page, user);
await userPersonalInformationPage.selectModifyUser(); await userPersonalInformationPage.selectModifyUser();
await basicInfoPage.updateUserBasicInfo(user.firstName, user.lastName, user.email, true); await basicInfoPage.updateUserBasicInfo(user.firstName, user.lastName, user.email, true);
console.log("Updated basic data for user: ", user.email)
}); });
@ -97,9 +91,6 @@ test.describe('USER Section Tests', () => {
test.skip('USERS -> Add user: Add random users with basic data', async ({ page }) => { test.skip('USERS -> Add user: Add random users with basic data', async ({ page }) => {
const randomUsers = createUsersRandomList(6) const randomUsers = createUsersRandomList(6)
for (let user of randomUsers) {
console.log(user)
}
// Initialize pages // Initialize pages
const basicInfoPage = new BasicUserInfoSectionPage(page); const basicInfoPage = new BasicUserInfoSectionPage(page);
@ -170,7 +161,6 @@ test.describe('USER Section Tests', () => {
expect(await membershipPage.alertUserCreationMessageIsValid()).toBeTruthy(); expect(await membershipPage.alertUserCreationMessageIsValid()).toBeTruthy();
await membershipPage.addUserMembership(user.membershipType, user.startDate, user.endDate); await membershipPage.addUserMembership(user.membershipType, user.startDate, user.endDate);
await addUserLink.click(); await addUserLink.click();
console.log("Created user: ", user.email)
// Validate the newly created user // Validate the newly created user
await gotoBasicInfoPageOfTheUser(page, user); await gotoBasicInfoPageOfTheUser(page, user);
@ -181,8 +171,6 @@ test.describe('USER Section Tests', () => {
await userPersonalInformationPage.selectModifyUser(); await userPersonalInformationPage.selectModifyUser();
await basicInfoPage.updateUserBasicInfo(updateData.firstName, updateData.lastName, updateData.email, false); await basicInfoPage.updateUserBasicInfo(updateData.firstName, updateData.lastName, updateData.email, false);
console.log("Updated basic data for user: ", user.email)
// Validate the updated user data // Validate the updated user data
await gotoBasicInfoPageOfTheUser(page, updateData); await gotoBasicInfoPageOfTheUser(page, updateData);
await checkIfTheInformationIsValid(page, updateData); await checkIfTheInformationIsValid(page, updateData);
@ -190,7 +178,6 @@ test.describe('USER Section Tests', () => {
//Delete the user //Delete the user
await gotoBasicInfoPageOfTheUser(page, updateData); await gotoBasicInfoPageOfTheUser(page, updateData);
await userPersonalInformationPage.deleteUser(page); await userPersonalInformationPage.deleteUser(page);
console.log("Deleted user: ", user.email)
}); });
@ -237,7 +224,6 @@ test.describe('USER Section Tests', () => {
expect(await addMembershipPage.alertUserCreationMessageIsValid()).toBeTruthy(); expect(await addMembershipPage.alertUserCreationMessageIsValid()).toBeTruthy();
await addMembershipPage.addUserMembership(user.membershipType, user.startDate, user.endDate); await addMembershipPage.addUserMembership(user.membershipType, user.startDate, user.endDate);
await addUserLink.click(); await addUserLink.click();
console.log("Created user: ", user.email)
// Validate the newly created user // Validate the newly created user
await gotoBasicInfoPageOfTheUser(page, user); await gotoBasicInfoPageOfTheUser(page, user);
@ -249,7 +235,6 @@ test.describe('USER Section Tests', () => {
await membershipSectionPage.gotoModifyMembershipPage(page, user.membershipType); await membershipSectionPage.gotoModifyMembershipPage(page, user.membershipType);
await addMembershipPage.updateExistingUserMembership(page, user.membershipType, updateData.membershipType, updateData.startDate, updateData.endDate) await addMembershipPage.updateExistingUserMembership(page, user.membershipType, updateData.membershipType, updateData.startDate, updateData.endDate)
console.log("Updated membership for user: ", user.email)
// Validate the updated user data // Validate the updated user data
await gotoBasicInfoPageOfTheUser(page, updateData); await gotoBasicInfoPageOfTheUser(page, updateData);
@ -260,7 +245,6 @@ test.describe('USER Section Tests', () => {
await userPersonalInformationPage.selectModifyUser(); await userPersonalInformationPage.selectModifyUser();
await membershipSectionPage.selectAddMembershipButton(); await membershipSectionPage.selectAddMembershipButton();
await addMembershipPage.addNewUserMembership('3', '2022-01-12', '2025-01-12'); await addMembershipPage.addNewUserMembership('3', '2022-01-12', '2025-01-12');
console.log("Updated with second membership for user: ", user.email);
// Validate the updated user data // Validate the updated user data
await gotoBasicInfoPageOfTheUser(page, updateData); await gotoBasicInfoPageOfTheUser(page, updateData);
@ -270,7 +254,6 @@ test.describe('USER Section Tests', () => {
await gotoBasicInfoPageOfTheUser(page, user); await gotoBasicInfoPageOfTheUser(page, user);
await userPersonalInformationPage.selectModifyUser(); await userPersonalInformationPage.selectModifyUser();
await membershipSectionPage.gotoDeleteSpecificMembership(page, updateData.membershipType) await membershipSectionPage.gotoDeleteSpecificMembership(page, updateData.membershipType)
console.log("Deleted membership for user: ", user.email)
// Validate the updated user data // Validate the updated user data
await gotoBasicInfoPageOfTheUser(page, updateData); await gotoBasicInfoPageOfTheUser(page, updateData);
@ -279,7 +262,6 @@ test.describe('USER Section Tests', () => {
//Delete the user //Delete the user
await gotoBasicInfoPageOfTheUser(page, updateData); await gotoBasicInfoPageOfTheUser(page, updateData);
await userPersonalInformationPage.deleteUser(page); await userPersonalInformationPage.deleteUser(page);
console.log("Deleted user: ", user.email)
}); });
/** /**
* Create a pre-defined group of users * Create a pre-defined group of users
@ -291,9 +273,7 @@ test.describe('USER Section Tests', () => {
const basicInfoPage = new BasicUserInfoSectionPage(page); const basicInfoPage = new BasicUserInfoSectionPage(page);
const membershipPage = new AddMembershipPage(page); const membershipPage = new AddMembershipPage(page);
const userPersonalInformationPage = new UserPersonalInformationPage(page); const userPersonalInformationPage = new UserPersonalInformationPage(page);
for (let user of users) {
console.log(user)
}
// Navigate to the Add User page // Navigate to the Add User page
const { addUserLink } = await clickAddUserOnLeftMenu(page); const { addUserLink } = await clickAddUserOnLeftMenu(page);

View file

@ -34,17 +34,6 @@ test.describe('ADMIN-> DATA Section Tests - Testing with Membership Credential',
}); });
test('DATA -> Import data file - Happy path - Membership Card Credential - membership_card2.xlsx ', async ({ page }) => {
//test with a second excel file
const fileToImport = FILE_TO_IMPORT_MC_2;
const jsonSchema = JSON_SCHEMA_MC;
const schema = SCHEMA_MC;
await testImportDataFile_HappyPath(page, fileToImport, jsonSchema, schema);
});
/** /**
* Load of an excel file - Sad Path: * Load of an excel file - Sad Path:
* Try to load a well-formatted excel file but without data. * Try to load a well-formatted excel file but without data.

Binary file not shown.