aboutsummaryrefslogtreecommitdiffstats
path: root/cypress
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2024-02-13 11:03:11 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2024-02-13 21:08:08 +0100
commitb1a47f79f31d5173750c1d8766f8b22d0a3841e6 (patch)
treefd23eabe0da3341e6724f50d88396c7819fc05fa /cypress
parent4a509dfe8ec3287b513cc7d68342adc859870ee5 (diff)
downloadnextcloud-server-b1a47f79f31d5173750c1d8766f8b22d0a3841e6.tar.gz
nextcloud-server-b1a47f79f31d5173750c1d8766f8b22d0a3841e6.zip
fix: cypress
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/e2e/login/login.cy.ts24
-rw-r--r--cypress/e2e/settings/users.cy.ts6
-rw-r--r--cypress/e2e/settings/users_columns.cy.ts14
-rw-r--r--cypress/e2e/settings/users_disable.cy.ts8
4 files changed, 26 insertions, 26 deletions
diff --git a/cypress/e2e/login/login.cy.ts b/cypress/e2e/login/login.cy.ts
index 7d1dd2a5b9c..6c2ab306e1b 100644
--- a/cypress/e2e/login/login.cy.ts
+++ b/cypress/e2e/login/login.cy.ts
@@ -44,12 +44,12 @@ describe('Login', () => {
cy.logout()
})
- it('log in with valid user and password', () => {
+ it('log in with valid account and password', () => {
// Given I visit the Home page
cy.visit('/')
// I see the login page
cy.get('form[name="login"]').should('be.visible')
- // I log in with a valid user
+ // I log in with a valid account
cy.get('form[name="login"]').within(() => {
cy.get('input[name="user"]').type(user.userId)
cy.get('input[name="password"]').type(user.password)
@@ -63,12 +63,12 @@ describe('Login', () => {
cy.url().should('match', /apps\/dashboard(\/|$)/)
})
- it('try to log in with valid user and invalid password', () => {
+ it('try to log in with valid account and invalid password', () => {
// Given I visit the Home page
cy.visit('/')
// I see the login page
cy.get('form[name="login"]').should('be.visible')
- // I log in with a valid user but invalid password
+ // I log in with a valid account but invalid password
cy.get('form[name="login"]').within(() => {
cy.get('input[name="user"]').type(user.userId)
cy.get('input[name="password"]').type(`${user.password}--wrong`)
@@ -85,12 +85,12 @@ describe('Login', () => {
cy.get('input[name="password"]:invalid').should('exist')
})
- it('try to log in with valid user and invalid password', () => {
+ it('try to log in with valid account and invalid password', () => {
// Given I visit the Home page
cy.visit('/')
// I see the login page
cy.get('form[name="login"]').should('be.visible')
- // I log in with a valid user but invalid password
+ // I log in with a valid account but invalid password
cy.get('form[name="login"]').within(() => {
cy.get('input[name="user"]').type(user.userId)
cy.get('input[name="password"]').type(`${user.password}--wrong`)
@@ -103,11 +103,11 @@ describe('Login', () => {
// Then I see that the current page is the Login page
cy.url().should('match', /\/login/)
// And I see that a wrong password message is shown
- cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/Wrong.+password/i).and.to.match(/Wrong.+username/))
+ cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/Wrong.+password/i).and.to.match(/Wrong.+account/))
cy.get('input[name="password"]:invalid').should('exist')
})
- it('try to log in with invalid user', () => {
+ it('try to log in with invalid account', () => {
// Given I visit the Home page
cy.visit('/')
// I see the login page
@@ -125,11 +125,11 @@ describe('Login', () => {
// Then I see that the current page is the Login page
cy.url().should('match', /\/login/)
// And I see that a wrong password message is shown
- cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/Wrong.+password/i).and.to.match(/Wrong.+username/))
+ cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/Wrong.+password/i).and.to.match(/Wrong.+account/))
cy.get('input[name="password"]:invalid').should('exist')
})
- it('try to log in as disabled user', () => {
+ it('try to log in as disabled account', () => {
// Given I visit the Home page
cy.visit('/')
// I see the login page
@@ -146,8 +146,8 @@ describe('Login', () => {
// Then I see that the current page is the Login page
cy.url().should('match', /\/login/)
- // And I see that the disabled user message is shown
- cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/User.+disabled/i))
+ // And I see that the disabled account message is shown
+ cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/Account.+disabled/i))
cy.get('input[name="password"]:invalid').should('exist')
})
diff --git a/cypress/e2e/settings/users.cy.ts b/cypress/e2e/settings/users.cy.ts
index 48d518e58c7..da2b934af92 100644
--- a/cypress/e2e/settings/users.cy.ts
+++ b/cypress/e2e/settings/users.cy.ts
@@ -26,7 +26,7 @@ import { getUserListRow, handlePasswordConfirmation } from './usersUtils'
const admin = new User('admin', 'admin')
const john = new User('john', '123456')
-describe('Settings: Create and delete users', function() {
+describe('Settings: Create and delete accounts', function() {
beforeEach(function() {
cy.listUsers().then((users) => {
if ((users as string[]).includes(john.userId)) {
@@ -124,8 +124,8 @@ describe('Settings: Create and delete users', function() {
.click({ force: true })
})
- // The "Delete user" action in the actions menu is shown and clicked
- cy.get('.action-item__popper .action').contains('Delete user').should('exist').click({ force: true })
+ // The "Delete account" action in the actions menu is shown and clicked
+ cy.get('.action-item__popper .action').contains('Delete account').should('exist').click({ force: true })
// And confirmation dialog accepted
cy.get('.oc-dialog button').contains(`Delete ${testUser.userId}`).click({ force: true })
diff --git a/cypress/e2e/settings/users_columns.cy.ts b/cypress/e2e/settings/users_columns.cy.ts
index 452c6f2e8f5..363e0628508 100644
--- a/cypress/e2e/settings/users_columns.cy.ts
+++ b/cypress/e2e/settings/users_columns.cy.ts
@@ -34,11 +34,11 @@ describe('Settings: Show and hide columns', function() {
beforeEach(function() {
// open the settings dialog
- cy.get('.app-navigation-entry__settings').contains('User management settings').click()
+ cy.get('.app-navigation-entry__settings').contains('Account management settings').click()
// reset all visibility toggles
cy.get('.modal-container #settings-section_visibility-settings input[type="checkbox"]').uncheck({ force: true })
- cy.contains('.modal-container', 'User management settings').within(() => {
+ cy.contains('.modal-container', 'Account management settings').within(() => {
// enable the last login toggle
cy.get('[data-test="showLastLogin"] input[type="checkbox"]').check({ force: true })
// close the settings dialog
@@ -57,9 +57,9 @@ describe('Settings: Show and hide columns', function() {
})
// open the settings dialog
- cy.get('.app-navigation-entry__settings').contains('User management settings').click()
+ cy.get('.app-navigation-entry__settings').contains('Account management settings').click()
- cy.contains('.modal-container', 'User management settings').within(() => {
+ cy.contains('.modal-container', 'Account management settings').within(() => {
// enable the language toggle
cy.get('[data-test="showLanguages"] input[type="checkbox"]').should('not.be.checked')
cy.get('[data-test="showLanguages"] input[type="checkbox"]').check({ force: true })
@@ -88,9 +88,9 @@ describe('Settings: Show and hide columns', function() {
})
// open the settings dialog
- cy.get('.app-navigation-entry__settings').contains('User management settings').click()
+ cy.get('.app-navigation-entry__settings').contains('Account management settings').click()
- cy.contains('.modal-container', 'User management settings').within(() => {
+ cy.contains('.modal-container', 'Account management settings').within(() => {
// disable the last login toggle
cy.get('[data-test="showLastLogin"] input[type="checkbox"]').should('be.checked')
cy.get('[data-test="showLastLogin"] input[type="checkbox"]').uncheck({ force: true })
@@ -98,7 +98,7 @@ describe('Settings: Show and hide columns', function() {
// close the settings dialog
cy.get('button.modal-container__close').click()
})
- cy.waitUntil(() => cy.contains('.modal-container', 'User management settings').should(el => assertNotExistOrNotVisible(el)))
+ cy.waitUntil(() => cy.contains('.modal-container', 'Account management settings').should(el => assertNotExistOrNotVisible(el)))
// see that the last login column is not in the header
cy.get('[data-cy-user-list-header-last-login]').should('not.exist')
diff --git a/cypress/e2e/settings/users_disable.cy.ts b/cypress/e2e/settings/users_disable.cy.ts
index 1218d4f770b..dd555c64f91 100644
--- a/cypress/e2e/settings/users_disable.cy.ts
+++ b/cypress/e2e/settings/users_disable.cy.ts
@@ -56,8 +56,8 @@ describe('Settings: Disable and enable users', function() {
cy.get('[data-cy-user-list-cell-actions] button.action-item__menutoggle').click({ scrollBehavior: 'center' })
})
- // The "Disable user" action in the actions menu is shown and clicked
- cy.get('.action-item__popper .action').contains('Disable user').should('exist').click()
+ // The "Disable account" action in the actions menu is shown and clicked
+ cy.get('.action-item__popper .action').contains('Disable account').should('exist').click()
// When clicked the section is not shown anymore
getUserListRow(testUser.userId).should('not.exist')
// But the disabled user section now exists
@@ -85,8 +85,8 @@ describe('Settings: Disable and enable users', function() {
cy.get('[data-cy-user-list-cell-actions] button.action-item__menutoggle').click({ scrollBehavior: 'center' })
})
- // The "Enable user" action in the actions menu is shown and clicked
- cy.get('.action-item__popper .action').contains('Enable user').should('exist').click()
+ // The "Enable account" action in the actions menu is shown and clicked
+ cy.get('.action-item__popper .action').contains('Enable account').should('exist').click()
// When clicked the section is not shown anymore
cy.get('#disabled').should('not.exist')
// Make sure it is still gone after the reload reload