-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#12048] Migrate student notification page e2e test #12773
[#12048] Migrate student notification page e2e test #12773
Conversation
.orShould().accessClassesThat(new DescribedPredicate<>("") { | ||
@Override | ||
public boolean apply(JavaClass input) { | ||
return input.getPackageName().startsWith(UI_PACKAGE) | ||
&& !input.getPackageName().startsWith(UI_OUTPUT_PACKAGE); | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wld like to point this out, here we are letting e2e tests access the output, as its needed to do assertions (the old way with datastore was to convert the Data to the actual DTO, but that cannot be done now as the Data does not actually contain all the required fields to create the entity (this is due to SQL being relational, e.g. return FeedbackResponseData, we do not actually have the full course to create the entity)
see AbstractBackDoor.java for examples of how this Data -> Entity is done in datastore, and i think its not possible for our new SQL setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
public void verifyNotificationTab(Notification notification, Set<String> readNotificationIds) { | ||
boolean isRead = readNotificationIds.contains(notification.getId().toString()); | ||
WebElement notificationTab = notificationTabs.findElement(By.id(notification.getId().toString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much cleaner than putting id in the title, thanks for the change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Part of #12048
Outline of Solution
Persist ReadNotifications in data bundle
Add removeAndStoreSqlDataBundle to e2e base test case
Split out the non-course related entities into its own bundle to be loaded
Migrated the page object methods to use sqlentity
Removed some code that checked if account was migrated for certain actions
Return SqlDataBundle so we can read the ID