-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
103 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/// <reference types="cypress" /> | ||
|
||
import { elSelector, withLang } from '@@/cypress/utils' | ||
import { withLang } from '@@/cypress/utils' | ||
import { EDataTest, EDataTestClass } from '@/enums/EDataTest' | ||
|
||
describe('user sign-in, sign-up and logout', () => { | ||
|
@@ -20,9 +20,12 @@ describe('user sign-in, sign-up and logout', () => { | |
cy | ||
.el(EDataTest.landing_sign_in_button).click() | ||
// To make close button unfocused | ||
.elByClass(EDataTestClass.app_card_content).should('be.visible').click() | ||
.elByClass(EDataTestClass.app_dialog).should('be.visible').click() | ||
.get('html').toMatchSnapshot('Sign in modal') | ||
.get(`${elSelector(EDataTest.authentication_modal)} .n-base-close`).click() | ||
.elByClass(EDataTestClass.app_dialog).within(() => { | ||
cy.elByClass(EDataTestClass.app_close_button).click() | ||
}) | ||
|
||
|
||
.authWithoutSession() | ||
.elByClass(EDataTestClass.app_notifications).should('be.visible').and('contain', 'successful_authorization') | ||
|
@@ -53,7 +56,9 @@ describe('user sign-in, sign-up and logout', () => { | |
.toMatchSnapshotForEl(EDataTestClass.app_notifications, 'Sign in error notification') | ||
cy | ||
.el(EDataTest.authentication_modal_error).should('be.visible').contains(errorMessageInvalidEmail) | ||
.get(`${elSelector(EDataTest.authentication_modal)} .n-base-close`).click() | ||
.elByClass(EDataTestClass.app_dialog).within(() => { | ||
cy.elByClass(EDataTestClass.app_close_button).click() | ||
}) | ||
|
||
cy.authWithoutSession({ | ||
username: '', | ||
|
@@ -68,7 +73,9 @@ describe('user sign-in, sign-up and logout', () => { | |
.and('contain', errorMessageInvalidEmail) | ||
cy | ||
.el(EDataTest.authentication_modal_error).should('be.visible').contains(errorMessageInvalidEmail) | ||
.get(`${elSelector(EDataTest.authentication_modal)} .n-base-close`).click() | ||
.elByClass(EDataTestClass.app_dialog).within(() => { | ||
cy.elByClass(EDataTestClass.app_close_button).click() | ||
}) | ||
|
||
cy.authWithoutSession({ | ||
username: '[email protected]', | ||
|
@@ -83,7 +90,9 @@ describe('user sign-in, sign-up and logout', () => { | |
.and('contain', errorMessageInvalidCredential) | ||
cy | ||
.el(EDataTest.authentication_modal_error).should('be.visible').contains(errorMessageInvalidCredential) | ||
.get(`${elSelector(EDataTest.authentication_modal)} .n-base-close`).click() | ||
.elByClass(EDataTestClass.app_dialog).within(() => { | ||
cy.elByClass(EDataTestClass.app_close_button).click() | ||
}) | ||
|
||
cy.authWithoutSession({ | ||
username: '[email protected]', | ||
|
@@ -98,16 +107,20 @@ describe('user sign-in, sign-up and logout', () => { | |
.and('contain', errorMessageMissingPassword) | ||
cy | ||
.el(EDataTest.authentication_modal_error).should('be.visible').contains(errorMessageMissingPassword) | ||
.get(`${elSelector(EDataTest.authentication_modal)} .n-base-close`).click() | ||
.elByClass(EDataTestClass.app_dialog).within(() => { | ||
cy.elByClass(EDataTestClass.app_close_button).click() | ||
}) | ||
}) | ||
|
||
it('should display sign-up error for existing use', () => { | ||
cy | ||
.el(EDataTest.landing_sign_up_button).click() | ||
// To make close button unfocused | ||
.elByClass(EDataTestClass.app_card_content).should('be.visible').click() | ||
.elByClass(EDataTestClass.app_dialog).should('be.visible').click() | ||
.get('html').toMatchSnapshot('Sign up modal') | ||
.get(`${elSelector(EDataTest.authentication_modal)} .n-base-close`).click() | ||
.elByClass(EDataTestClass.app_dialog).within(() => { | ||
cy.elByClass(EDataTestClass.app_close_button).click() | ||
}) | ||
|
||
.authWithoutSession({ | ||
...(Cypress.env('testUser') ?? {}), | ||
|
Binary file modified
BIN
+508 Bytes
(110%)
...s/snapshots/base/auth.cy.ts/[Desktop] [1100x660] Sign in error notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+35.6 KB
(150%)
cypress/snapshots/base/auth.cy.ts/[Desktop] [1100x660] Sign in modal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+35.3 KB
(150%)
cypress/snapshots/base/auth.cy.ts/[Desktop] [1100x660] Sign up modal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.68 KB
(120%)
...ess/snapshots/base/auth.cy.ts/[Mobile] [400x660] Sign in error notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+27.9 KB
(310%)
cypress/snapshots/base/auth.cy.ts/[Mobile] [400x660] Sign in modal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+28 KB
(310%)
cypress/snapshots/base/auth.cy.ts/[Mobile] [400x660] Sign up modal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...modules/landing/modules/authenticate/components/AuthenticateModal/useAuthenticateModal.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { defineAsyncComponent } from 'vue' | ||
import { type ModalReactive } from 'naive-ui' | ||
import { type ModalApiInjection } from 'naive-ui/lib/modal/src/ModalProvider' | ||
import { type EAuthenticateModalType } from '@/modules/landing/modules/authenticate/components/AuthenticateModal/EAuthenticateModalType' | ||
const AuthenticateModal = defineAsyncComponent(() => import('@/modules/landing/modules/authenticate/components/AuthenticateModal/AuthenticateModal.vue')) | ||
|
||
export const useAuthenticateModal = (modal: ModalApiInjection) => { | ||
const { t } = useI18n() | ||
const modalInst = ref<ModalReactive>() | ||
|
||
const openAuthenticateModal = (type: EAuthenticateModalType) => { | ||
modalInst.value = modal.create({ | ||
title: t('authentication'), | ||
content: () => h(AuthenticateModal, { type }), | ||
preset: 'dialog', | ||
transformOrigin: 'center', | ||
showIcon: false, | ||
}) | ||
} | ||
|
||
return { | ||
openAuthenticateModal, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/modules/workspace/modules/office/pages/settings/OfficeSettingsPage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../words/components/WordsContainer/components/WordsContainerHeader/WordsContainerHeader.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...onents/WordsContainerHeader/WordsContainerHeaderStatuses/WordsContainerHeaderStatuses.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.