Skip to content

Commit 0c154ff

Browse files
authored
[5.2][cypress] clean user session (joomla#45059)
1 parent 2e81829 commit 0c154ff

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tests/System/integration/site/components/com_users/Registration.cy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ describe('Test in frontend that the users registration view', () => {
55
});
66
afterEach(() => {
77
cy.db_updateExtensionParameter('allowUserRegistration', '0', 'com_users');
8+
cy.task('queryDB', "DELETE FROM #__user_usergroup_map WHERE user_id = (SELECT id FROM #__users WHERE username = 'testuser')");
89
cy.task('queryDB', "DELETE FROM #__users WHERE username = 'testuser'");
910
});
1011

tests/System/plugins/db.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ function deleteInsertedItems(config) {
165165
if (item.table === `${config.env.db_prefix}users`) {
166166
promises.push(queryTestDB(`DELETE FROM #__user_usergroup_map WHERE user_id IN (${item.rows.join(',')})`, config));
167167
promises.push(queryTestDB(`DELETE FROM #__user_profiles WHERE user_id IN (${item.rows.join(',')})`, config));
168+
promises.push(queryTestDB(`DELETE FROM #__session WHERE userid IN (${item.rows.join(',')})`, config));
168169
}
169170

170171
if (item.table === `${config.env.db_prefix}content`) {

0 commit comments

Comments
 (0)