mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
fix: revert document patches (#10278)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
@@ -86,7 +86,6 @@ async function createDocument (
|
||||
seqNumber: 0,
|
||||
major: 1,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
commentSequence: 0,
|
||||
template: templateId,
|
||||
state: DocumentState.Draft,
|
||||
@@ -171,7 +170,6 @@ async function createTemplateIfNotExist (
|
||||
category,
|
||||
major: 0,
|
||||
minor: 1,
|
||||
patch: 0,
|
||||
commentSequence: 0,
|
||||
state: DocumentState.Draft,
|
||||
author: owner,
|
||||
|
||||
@@ -151,7 +151,6 @@ async function createProductChangeControlTemplate (tx: TxOperations): Promise<vo
|
||||
seqNumber: 0,
|
||||
major: 1,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
state: DocumentState.Effective,
|
||||
commentSequence: 0,
|
||||
content: null
|
||||
@@ -528,19 +527,6 @@ async function migrateExternalApprovers (client: MigrationClient): Promise<void>
|
||||
)
|
||||
}
|
||||
|
||||
async function migratePatchVersion (client: MigrationClient): Promise<void> {
|
||||
await client.update(
|
||||
DOMAIN_DOCUMENTS,
|
||||
{
|
||||
_class: documents.class.ControlledDocument,
|
||||
patch: { $exists: false }
|
||||
},
|
||||
{
|
||||
patch: 0
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
export const documentsOperation: MigrateOperation = {
|
||||
async migrate (client: MigrationClient, mode): Promise<void> {
|
||||
await tryMigrate(mode, client, documentsId, [
|
||||
@@ -582,10 +568,6 @@ export const documentsOperation: MigrateOperation = {
|
||||
{
|
||||
state: 'migrateExternalApprovers',
|
||||
func: migrateExternalApprovers
|
||||
},
|
||||
{
|
||||
state: 'migratePatchVersion',
|
||||
func: migratePatchVersion
|
||||
}
|
||||
])
|
||||
},
|
||||
|
||||
@@ -250,9 +250,6 @@ export class TDocument extends TDoc implements Document {
|
||||
@Prop(TypeNumber(), documents.string.Minor)
|
||||
minor!: number
|
||||
|
||||
@Prop(TypeNumber(), documents.string.Patch)
|
||||
patch!: number
|
||||
|
||||
@Prop(TypeRef(documents.class.DocumentCategory), documents.string.Category)
|
||||
category?: Ref<DocumentCategory>
|
||||
|
||||
|
||||
@@ -692,7 +692,6 @@ export class HulyFormatImporter {
|
||||
code: codeMatch?.[1],
|
||||
major: 0,
|
||||
minor: 1,
|
||||
patch: 0,
|
||||
state: DocumentState.Draft,
|
||||
category,
|
||||
author,
|
||||
@@ -736,7 +735,6 @@ export class HulyFormatImporter {
|
||||
code: codeMatch?.[1],
|
||||
major: 0,
|
||||
minor: 1,
|
||||
patch: 0,
|
||||
state: DocumentState.Draft,
|
||||
category,
|
||||
author,
|
||||
|
||||
@@ -740,7 +740,6 @@ export class ImportWorkspaceBuilder {
|
||||
// Validate numbers are positive
|
||||
if (!this.validatePossitiveNumber(doc.major)) errors.push('invalid value for field "major"')
|
||||
if (!this.validatePossitiveNumber(doc.minor)) errors.push('invalid value for field "minor"')
|
||||
if (!this.validatePossitiveNumber(doc.patch)) errors.push('invalid value for field "patch"')
|
||||
|
||||
// Validate arrays
|
||||
errors.push(...this.validateArray(doc.reviewers, 'string', 'reviewers'))
|
||||
@@ -823,7 +822,6 @@ export class ImportWorkspaceBuilder {
|
||||
// Validate numbers are positive
|
||||
if (!this.validatePossitiveNumber(template.major)) errors.push('invalid value for field "major"')
|
||||
if (!this.validatePossitiveNumber(template.minor)) errors.push('invalid value for field "minor"')
|
||||
if (!this.validatePossitiveNumber(template.patch)) errors.push('invalid value for field "patch"')
|
||||
|
||||
// Validate arrays
|
||||
errors.push(...this.validateArray(template.reviewers, 'string', 'reviewers'))
|
||||
|
||||
@@ -197,7 +197,6 @@ export interface ImportControlledDocumentTemplate extends ImportDoc {
|
||||
code?: string
|
||||
major: number
|
||||
minor: number
|
||||
patch: number
|
||||
state: DocumentState
|
||||
category: Ref<DocumentCategory>
|
||||
author?: Ref<Employee>
|
||||
@@ -221,7 +220,6 @@ export interface ImportControlledDocument extends ImportDoc {
|
||||
code?: string
|
||||
major: number
|
||||
minor: number
|
||||
patch: number
|
||||
state: DocumentState
|
||||
category?: Ref<DocumentCategory>
|
||||
reviewers?: Ref<Employee>[]
|
||||
@@ -996,7 +994,6 @@ export class WorkspaceImporter {
|
||||
title: template.title,
|
||||
major: template.major,
|
||||
minor: template.minor,
|
||||
patch: template.patch,
|
||||
state: template.state,
|
||||
author: template.author,
|
||||
owner: template.owner,
|
||||
@@ -1118,7 +1115,6 @@ export class WorkspaceImporter {
|
||||
title: document.title,
|
||||
major: document.major,
|
||||
minor: document.minor,
|
||||
patch: document.patch,
|
||||
state: document.state,
|
||||
author: document.author,
|
||||
owner: document.owner,
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"EditorPlaceholder": "Začněte psát...",
|
||||
"Version": "Verze",
|
||||
"TemplateVersion": "Verze šablony",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "Vyhledat dokument...",
|
||||
"CreateEnVersion": "Vytvořit verzi pro revizi",
|
||||
"Approvers": "Schvalovatelé",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"EditorPlaceholder": "Tippen Sie, um mit der Bearbeitung zu beginnen...",
|
||||
"Version": "Version",
|
||||
"TemplateVersion": "Vorlagenversion",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "Dokument suchen...",
|
||||
"CreateEnVersion": "Version zur Überprüfung erstellen",
|
||||
"Approvers": "Genehmiger",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"EditorPlaceholder": "type to start editing...",
|
||||
"Version": "Version",
|
||||
"TemplateVersion": "Template version",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "Search document...",
|
||||
"CreateEnVersion": "Create version for review",
|
||||
"Approvers": "Approvers",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"EditorPlaceholder": "tapez pour commencer à éditer...",
|
||||
"Version": "Version",
|
||||
"TemplateVersion": "Version du modèle",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "Rechercher un document...",
|
||||
"CreateEnVersion": "Créer une version pour révision",
|
||||
"Approvers": "Approuveurs",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"EditorPlaceholder": "digita per iniziare a modificare...",
|
||||
"Version": "Versione",
|
||||
"TemplateVersion": "Versione del modello",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "Cerca documento...",
|
||||
"CreateEnVersion": "Crea versione per revisione",
|
||||
"Approvers": "Approvatori",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"EditorPlaceholder": "入力して編集を開始...",
|
||||
"Version": "バージョン",
|
||||
"TemplateVersion": "テンプレートバージョン",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "ドキュメントを検索...",
|
||||
"CreateEnVersion": "レビュー用バージョンを作成",
|
||||
"Approvers": "承認者",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"EditorPlaceholder": "Digite para começar a editar...",
|
||||
"Version": "Versão",
|
||||
"TemplateVersion": "Versão do modelo",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "Buscar documento...",
|
||||
"CreateEnVersion": "Criar versão para revisão",
|
||||
"Approvers": "Aprovadores",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"EditorPlaceholder": "введите для начала...",
|
||||
"Version": "Версия",
|
||||
"TemplateVersion": "Версия шаблона",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "Найти документ...",
|
||||
"CreateEnVersion": "Создать версию для оценки",
|
||||
"Approvers": "Утверждающие",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"EditorPlaceholder": "düzenlemeye başlamak için yazın...",
|
||||
"Version": "Sürüm",
|
||||
"TemplateVersion": "Şablon sürümü",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "Doküman ara...",
|
||||
"CreateEnVersion": "İnceleme için sürüm oluştur",
|
||||
"Approvers": "Onaylayanlar",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"EditorPlaceholder": "开始编辑...",
|
||||
"Version": "版本",
|
||||
"TemplateVersion": "模板版本",
|
||||
"VersionValue": "v{major}.{minor}.{patch}",
|
||||
"VersionValue": "v{major}.{minor}",
|
||||
"SearchDocument": "搜索文档...",
|
||||
"CreateEnVersion": "创建审核版本",
|
||||
"Approvers": "批准人",
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
labels: 0,
|
||||
major: 1,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
commentSequence: 0,
|
||||
author: currentUser,
|
||||
owner: currentUser,
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
}
|
||||
|
||||
const latest = $documentLatestVersion
|
||||
const version = { major: latest.major, minor: latest.minor + 1, patch: 0 }
|
||||
const version = { major: latest.major, minor: latest.minor + 1 }
|
||||
const project = await getLatestProjectId($controlledDocument.space)
|
||||
|
||||
if (project === undefined) {
|
||||
|
||||
-1
@@ -106,7 +106,6 @@
|
||||
labels: 0,
|
||||
major: 1,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
seqNumber: 0,
|
||||
commentSequence: 0,
|
||||
category: '' as Ref<DocumentCategory>,
|
||||
|
||||
-1
@@ -101,7 +101,6 @@
|
||||
labels: 0,
|
||||
major: 1,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
commentSequence: 0,
|
||||
seqNumber: 0,
|
||||
category: undefined,
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@
|
||||
}
|
||||
|
||||
if (isDocument(document)) {
|
||||
return `v${document.major}.${document.minor}.${document.patch} | ${translatedStates ? translatedStates[state] : ''}`
|
||||
return `v${document.major}.${document.minor} | ${translatedStates ? translatedStates[state] : ''}`
|
||||
} else {
|
||||
return `${document.name} | ${translatedStates ? translatedStates[state] : ''}`
|
||||
}
|
||||
|
||||
+1
-4
@@ -51,10 +51,7 @@
|
||||
|
||||
return (
|
||||
doc.major < $controlledDocument.major ||
|
||||
(doc.major === $controlledDocument.major && doc.minor < $controlledDocument.minor) ||
|
||||
(doc.major === $controlledDocument.major &&
|
||||
doc.minor === $controlledDocument.minor &&
|
||||
doc.patch <= $controlledDocument.patch)
|
||||
(doc.major === $controlledDocument.major && doc.minor <= $controlledDocument.minor)
|
||||
)
|
||||
})
|
||||
.sort(documentCompareFn)
|
||||
|
||||
+6
-34
@@ -52,7 +52,6 @@
|
||||
} from '../../stores/editors/document/editor'
|
||||
|
||||
enum Severity {
|
||||
Patch = 'patch',
|
||||
Minor = 'minor',
|
||||
Major = 'major'
|
||||
}
|
||||
@@ -155,10 +154,7 @@
|
||||
allVersionsDesc: ControlledDocument[]
|
||||
): ControlledDocument | undefined {
|
||||
return allVersionsDesc.find(
|
||||
(d) =>
|
||||
(d.major === document.major && d.minor === document.minor && d.patch < document.patch) ||
|
||||
(d.major === document.major && d.minor < document.minor) ||
|
||||
d.major < document.major
|
||||
(d) => (d.major === document.major && d.minor < document.minor) || d.major < document.major
|
||||
)
|
||||
}
|
||||
|
||||
@@ -170,17 +166,13 @@
|
||||
const prevDocument = getPreviousDocument(document, allVersionsDesc)
|
||||
|
||||
if (prevDocument == null) {
|
||||
return document.major > 0 ? Severity.Major : document.minor > 0 ? Severity.Minor : Severity.Patch
|
||||
return document.major > 0 ? Severity.Major : Severity.Minor
|
||||
} else {
|
||||
return prevDocument.major < document.major
|
||||
? Severity.Major
|
||||
: prevDocument.minor < document.minor
|
||||
? Severity.Minor
|
||||
: Severity.Patch
|
||||
return prevDocument.major < document.major ? Severity.Major : Severity.Minor
|
||||
}
|
||||
}
|
||||
|
||||
function getVersionForSeverity (severity: Severity): { major: number, minor: number, patch: number } | undefined {
|
||||
function getVersionForSeverity (severity: Severity): { major: number, minor: number } | undefined {
|
||||
if ($controlledDocument == null) {
|
||||
return
|
||||
}
|
||||
@@ -190,20 +182,12 @@
|
||||
if (severity === Severity.Major) {
|
||||
return {
|
||||
major: (prevDocument?.major ?? 0) + 1,
|
||||
minor: 0,
|
||||
patch: 0
|
||||
}
|
||||
} else if (severity === Severity.Minor) {
|
||||
return {
|
||||
major: prevDocument?.major ?? 0,
|
||||
minor: (prevDocument?.minor ?? 0) + 1,
|
||||
patch: 0
|
||||
minor: 0
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
major: prevDocument?.major ?? 0,
|
||||
minor: prevDocument?.minor ?? 0,
|
||||
patch: (prevDocument?.patch ?? 0) + 1
|
||||
minor: (prevDocument?.minor ?? 0) + 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,18 +218,6 @@
|
||||
<Label label={documentsRes.string.ChangeSeverity} />
|
||||
</header>
|
||||
<div class="flex-col">
|
||||
<RadioButton
|
||||
group={severity}
|
||||
id={Severity.Patch}
|
||||
labelIntl={documentsRes.string.Patch}
|
||||
labelGap="large"
|
||||
value={Severity.Patch}
|
||||
disabled={!canEdit}
|
||||
action={() => {
|
||||
void handleSeverityChanged(Severity.Patch)
|
||||
}}
|
||||
gap="large"
|
||||
/>
|
||||
<RadioButton
|
||||
group={severity}
|
||||
id={Severity.Minor}
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@
|
||||
</script>
|
||||
|
||||
{#if value}
|
||||
<Label label={document.string.VersionValue} params={{ major: value.major, minor: value.minor, patch: value.patch }} />
|
||||
<Label label={document.string.VersionValue} params={{ major: value.major, minor: value.minor }} />
|
||||
{/if}
|
||||
|
||||
@@ -77,7 +77,7 @@ export async function createNewDraftForControlledDoc (
|
||||
client: TxOperations,
|
||||
document: ControlledDocument,
|
||||
space: Ref<DocumentSpace>,
|
||||
version: { major: number, minor: number, patch: number },
|
||||
version: { major: number, minor: number },
|
||||
project: Ref<Project>,
|
||||
newDraftDocId?: Ref<ControlledDocument>
|
||||
): Promise<{ success: boolean, id: Ref<ControlledDocument> }> {
|
||||
@@ -118,7 +118,6 @@ export async function createNewDraftForControlledDoc (
|
||||
seqNumber: document.seqNumber,
|
||||
major: version.major,
|
||||
minor: version.minor,
|
||||
patch: version.patch,
|
||||
commentSequence: 0,
|
||||
abstract: document.abstract ?? '',
|
||||
reviewers: document.reviewers,
|
||||
|
||||
@@ -103,8 +103,7 @@ const queryDocumentVersionsFx = createEffect((payload: ControlledDocument) => {
|
||||
{
|
||||
sort: {
|
||||
major: SortingOrder.Descending,
|
||||
minor: SortingOrder.Descending,
|
||||
patch: SortingOrder.Descending
|
||||
minor: SortingOrder.Descending
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -156,8 +156,7 @@ export async function getDocumentMetaLinkFragment (document: Doc): Promise<Locat
|
||||
{
|
||||
sort: {
|
||||
major: SortingOrder.Descending,
|
||||
minor: SortingOrder.Descending,
|
||||
patch: SortingOrder.Descending
|
||||
minor: SortingOrder.Descending
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -864,15 +863,11 @@ export async function projectDocumentReferenceObjectProvider (
|
||||
}
|
||||
|
||||
export function documentCompareFn (doc1: Document, doc2: Document): number {
|
||||
return doc1.major - doc2.major !== 0
|
||||
? doc1.major - doc2.major
|
||||
: doc1.minor - doc2.minor !== 0
|
||||
? doc1.minor - doc2.minor
|
||||
: doc1.patch - doc2.patch
|
||||
return doc1.major - doc2.major !== 0 ? doc1.major - doc2.major : doc1.minor - doc2.minor
|
||||
}
|
||||
|
||||
export function getDocumentVersionString (doc: Document): string {
|
||||
return `v${doc.major}.${doc.minor}.${doc.patch}`
|
||||
return `v${doc.major}.${doc.minor}`
|
||||
}
|
||||
|
||||
export async function getControlledDocumentTitle (
|
||||
|
||||
@@ -121,7 +121,6 @@ export interface Document extends Doc<DocumentSpace> {
|
||||
seqNumber: number
|
||||
major: number
|
||||
minor: number
|
||||
patch: number
|
||||
category?: Ref<DocumentCategory>
|
||||
author?: Ref<Employee> // Employee who created/released the document
|
||||
owner?: Ref<Employee> // Employee responsible for working on the document
|
||||
|
||||
@@ -155,7 +155,7 @@ export function isFolder (doc: ProjectDocument | undefined): boolean {
|
||||
}
|
||||
|
||||
function getDocumentSortSequence (doc: ControlledDocument | undefined): number[] {
|
||||
return doc !== undefined ? [doc.seqNumber, doc.major, doc.minor, doc.patch, doc.createdOn ?? 0] : [0, 0, 0, 0, 0]
|
||||
return doc !== undefined ? [doc.seqNumber, doc.major, doc.minor, doc.createdOn ?? 0] : [0, 0, 0, 0]
|
||||
}
|
||||
|
||||
export function compareDocumentVersions (
|
||||
|
||||
@@ -39,7 +39,7 @@ test.describe('@PDF. QMS. PDF Download and Preview', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -72,7 +72,7 @@ test.describe('@PDF. QMS. PDF Download and Preview', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ test.describe('QMS. PDF Download and Preview', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -90,7 +90,7 @@ test.describe('QMS. PDF Download and Preview', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -135,7 +135,7 @@ test.describe('QMS. PDF Download and Preview', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -199,7 +199,7 @@ test.describe('QMS. PDF Download and Preview', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -253,7 +253,7 @@ test.describe('QMS. PDF Download and Preview', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
|
||||
@@ -47,7 +47,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents, ensure that the current re
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -63,7 +63,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents, ensure that the current re
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.IN_APPROVAL,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
})
|
||||
@@ -80,7 +80,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents, ensure that the current re
|
||||
await documentContentPageSecond.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPageSecond.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -92,7 +92,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents, ensure that the current re
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -104,98 +104,98 @@ test.describe('ISO 13485, 4.2.4 Control of documents, ensure that the current re
|
||||
await documentHistoryPage.checkHistoryEventExist('New document creation')
|
||||
await attachScreenshot('TESTS-325_check_history_tab.png', page)
|
||||
})
|
||||
await test.step('6. Send for Approval v1.1.0', async () => {
|
||||
await test.step('6. Send for Approval v1.1', async () => {
|
||||
await documentContentPage.sendForApproval(
|
||||
'Minor',
|
||||
'v1.1.0',
|
||||
'Reason 1.1.0',
|
||||
'impact 1.1.0',
|
||||
'v1.0.0',
|
||||
'v1.1.0',
|
||||
'v1.1',
|
||||
'Reason 1.1',
|
||||
'impact 1.1',
|
||||
'v1.0',
|
||||
'v1.1',
|
||||
userSecondPage,
|
||||
completeDocument,
|
||||
documentDetails
|
||||
)
|
||||
})
|
||||
|
||||
await test.step('7. Send for Approval minor v1.2.0', async () => {
|
||||
await test.step('7. Send for Approval minor v1.2', async () => {
|
||||
await documentContentPage.sendForApproval(
|
||||
'Minor',
|
||||
'v1.2.0',
|
||||
'Reason 1.2.0',
|
||||
'impact 1.2.0',
|
||||
'v1.1.0',
|
||||
'v1.2.0',
|
||||
'v1.2',
|
||||
'Reason 1.2',
|
||||
'impact 1.2',
|
||||
'v1.1',
|
||||
'v1.2',
|
||||
userSecondPage,
|
||||
completeDocument,
|
||||
documentDetails
|
||||
)
|
||||
})
|
||||
|
||||
await test.step('8. Send for Approval major v2.0.0', async () => {
|
||||
await test.step('8. Send for Approval major v2.0', async () => {
|
||||
await documentContentPage.sendForApproval(
|
||||
'Major',
|
||||
'v2.0.0',
|
||||
'Reason 2.0.0',
|
||||
'impact 2.0.0',
|
||||
'v1.2.0',
|
||||
'v2.0.0',
|
||||
'v2.0',
|
||||
'Reason 2.0',
|
||||
'impact 2.0',
|
||||
'v1.2',
|
||||
'v2.0',
|
||||
userSecondPage,
|
||||
completeDocument,
|
||||
documentDetails
|
||||
)
|
||||
})
|
||||
|
||||
await test.step('9. Send for Approval major v3.0.0', async () => {
|
||||
await test.step('9. Send for Approval major v3.0', async () => {
|
||||
await documentContentPage.sendForApproval(
|
||||
'Major',
|
||||
'v3.0.0',
|
||||
'Reason 3.0.0',
|
||||
'impact 3.0.0',
|
||||
'v2.0.0',
|
||||
'v3.0.0',
|
||||
'v3.0',
|
||||
'Reason 3.0',
|
||||
'impact 3.0',
|
||||
'v2.0',
|
||||
'v3.0',
|
||||
userSecondPage,
|
||||
completeDocument,
|
||||
documentDetails
|
||||
)
|
||||
})
|
||||
|
||||
await test.step('10. Send for Approval minor v3.1.0', async () => {
|
||||
await test.step('10. Send for Approval minor v3.1', async () => {
|
||||
await documentContentPage.sendForApproval(
|
||||
'Minor',
|
||||
'v3.1.0',
|
||||
'Reason 3.1.0',
|
||||
'impact 3.1.0',
|
||||
'v3.0.0',
|
||||
'v3.1.0',
|
||||
'v3.1',
|
||||
'Reason 3.1',
|
||||
'impact 3.1',
|
||||
'v3.0',
|
||||
'v3.1',
|
||||
userSecondPage,
|
||||
completeDocument,
|
||||
documentDetails
|
||||
)
|
||||
})
|
||||
|
||||
await test.step('11. Send for Approval minor v3.2.0', async () => {
|
||||
await test.step('11. Send for Approval minor v3.2', async () => {
|
||||
await documentContentPage.sendForApproval(
|
||||
'Minor',
|
||||
'v3.2.0',
|
||||
'Reason 3.2.0',
|
||||
'impact 3.2.0',
|
||||
'v3.1.0',
|
||||
'v3.2.0',
|
||||
'v3.2',
|
||||
'Reason 3.2',
|
||||
'impact 3.2',
|
||||
'v3.1',
|
||||
'v3.2',
|
||||
userSecondPage,
|
||||
completeDocument,
|
||||
documentDetails
|
||||
)
|
||||
})
|
||||
|
||||
await test.step('12. Send for Approval minor v3.3.0', async () => {
|
||||
await test.step('12. Send for Approval minor v3.3', async () => {
|
||||
await documentContentPage.sendForApproval(
|
||||
'Minor',
|
||||
'v3.3.0',
|
||||
'Reason 3.3.0',
|
||||
'impact 3.3.0',
|
||||
'v3.2.0',
|
||||
'v3.3.0',
|
||||
'v3.3',
|
||||
'Reason 3.3',
|
||||
'impact 3.3',
|
||||
'v3.2',
|
||||
'v3.3',
|
||||
userSecondPage,
|
||||
completeDocument,
|
||||
documentDetails
|
||||
|
||||
@@ -37,7 +37,7 @@ test.describe('@PDF. QMS. PDF Download and Preview', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -65,7 +65,7 @@ test.describe('@PDF. QMS. PDF Download and Preview', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -94,7 +94,7 @@ test.describe('@PDF. QMS. PDF Download and Preview', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -122,7 +122,7 @@ test.describe('@PDF. QMS. PDF Download and Preview', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -162,7 +162,7 @@ test.describe('@PDF. QMS. PDF Download and Preview', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -185,11 +185,7 @@ test.describe('@PDF. QMS. PDF Download and Preview', () => {
|
||||
|
||||
await test.step('4. Check the document and status', async () => {
|
||||
await documentContentPage.checkDocumentStatus(DocumentStatus.EFFECTIVE)
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
})
|
||||
await documentContentPage.checkDocument({ ...documentDetails, status: DocumentStatus.EFFECTIVE, version: 'v1.0' })
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
await documentContentPage.openApprovals()
|
||||
|
||||
@@ -44,7 +44,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -63,7 +63,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.IN_APPROVAL,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
})
|
||||
@@ -80,7 +80,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents', () => {
|
||||
await documentContentPageSecond.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPageSecond.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -113,7 +113,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -131,7 +131,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.IN_APPROVAL,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
})
|
||||
@@ -148,7 +148,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents', () => {
|
||||
await documentContentPageSecond.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPageSecond.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
type: 'N/A',
|
||||
category: newTemplate.category ?? '',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -181,7 +181,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
type: 'N/A',
|
||||
category: newTemplate.category ?? '',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
|
||||
@@ -70,7 +70,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents ensure that documents of ex
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Dirak Kainin',
|
||||
author: 'Dirak Kainin'
|
||||
@@ -78,7 +78,7 @@ test.describe('ISO 13485, 4.2.4 Control of documents ensure that documents of ex
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.DRAFT,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.clickLeaveFolder(folderName)
|
||||
await attachScreenshot('TESTS-347_manager_document_created.png', page)
|
||||
|
||||
@@ -44,7 +44,7 @@ test.describe('QMS. Documents tests for Control of documents ISO 13485, 4.2.4 FS
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -60,7 +60,7 @@ test.describe('QMS. Documents tests for Control of documents ISO 13485, 4.2.4 FS
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.IN_APPROVAL,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
})
|
||||
@@ -77,7 +77,7 @@ test.describe('QMS. Documents tests for Control of documents ISO 13485, 4.2.4 FS
|
||||
await documentContentPageSecond.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPageSecond.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -89,7 +89,7 @@ test.describe('QMS. Documents tests for Control of documents ISO 13485, 4.2.4 FS
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -101,14 +101,14 @@ test.describe('QMS. Documents tests for Control of documents ISO 13485, 4.2.4 FS
|
||||
await documentHistoryPage.checkHistoryEventExist('New document creation')
|
||||
await attachScreenshot('TESTS-384_check_history_tab.png', page)
|
||||
})
|
||||
await test.step('6. Send for Approval v1.1.0', async () => {
|
||||
await test.step('6. Send for Approval v1.1', async () => {
|
||||
await documentContentPage.sendForApproval(
|
||||
'Minor',
|
||||
'v1.1.0',
|
||||
'Reason 1.1.0',
|
||||
'impact 1.1.0',
|
||||
'v1.0.0',
|
||||
'v1.1.0',
|
||||
'v1.1',
|
||||
'Reason 1.1',
|
||||
'impact 1.1',
|
||||
'v1.0',
|
||||
'v1.1',
|
||||
userSecondPage,
|
||||
completeDocument,
|
||||
documentDetails
|
||||
@@ -116,12 +116,12 @@ test.describe('QMS. Documents tests for Control of documents ISO 13485, 4.2.4 FS
|
||||
})
|
||||
await test.step('7. Check archived status', async () => {
|
||||
const documentContentPageSecond = new DocumentContentPage(userSecondPage)
|
||||
await documentContentPage.clickPreviousVersionHeader(userSecondPage, completeDocument, 'v1.1.0')
|
||||
await documentContentPage.clickPreviousVersionHeader(userSecondPage, completeDocument, 'v1.0.0')
|
||||
await documentContentPage.clickPreviousVersionHeader(userSecondPage, completeDocument, 'v1.1')
|
||||
await documentContentPage.clickPreviousVersionHeader(userSecondPage, completeDocument, 'v1.0')
|
||||
await documentContentPageSecond.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.ARCHIVED,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await attachScreenshot('TESTS-384_archived_status.png', page)
|
||||
})
|
||||
|
||||
@@ -142,7 +142,7 @@ test.describe('QMS. Categories tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
type: 'N/A',
|
||||
category: canNotDeleteCategoryTemplate.category ?? '',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
|
||||
@@ -144,7 +144,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -179,7 +179,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -218,7 +218,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -257,7 +257,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -320,7 +320,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.DRAFT,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await attachScreenshot('TESTS-136_check_edit_document_flow.png', page)
|
||||
})
|
||||
@@ -337,7 +337,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -365,7 +365,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -388,7 +388,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -436,7 +436,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -505,7 +505,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.DRAFT,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await attachScreenshot('TESTS-139_check_document.png', page)
|
||||
})
|
||||
@@ -522,7 +522,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -567,7 +567,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.DRAFT,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
|
||||
await documentContentPage.replaceContent(updateContentFirst)
|
||||
@@ -592,7 +592,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -697,7 +697,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -728,7 +728,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPageQara.checkDocument({
|
||||
...documentDetails,
|
||||
owner: newDocumentOwner,
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.EFFECTIVE
|
||||
})
|
||||
await attachScreenshot('TESTS-155_change_document_owner.png', page)
|
||||
@@ -738,7 +738,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
owner: newDocumentOwner,
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.EFFECTIVE
|
||||
})
|
||||
await expect(documentContentPage.buttonDraftNewVersion).toBeVisible({ visible: false })
|
||||
@@ -757,7 +757,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPageSecond.checkDocument({
|
||||
...documentDetails,
|
||||
owner: newDocumentOwner,
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.EFFECTIVE
|
||||
})
|
||||
await attachScreenshot('TESTS-155_new_owner.png', page)
|
||||
@@ -775,7 +775,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -833,7 +833,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
const documentDetails: DocumentDetails = {
|
||||
type: 'HR',
|
||||
category: 'Human Resources',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
@@ -921,7 +921,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.DRAFT,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await attachScreenshot('TESTS-206_check_document.png', page)
|
||||
})
|
||||
@@ -955,7 +955,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.IN_APPROVAL,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
})
|
||||
@@ -972,7 +972,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPageSecond.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPageSecond.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -984,7 +984,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
...documentDetails,
|
||||
status: DocumentStatus.EFFECTIVE,
|
||||
version: 'v1.0.0'
|
||||
version: 'v1.0'
|
||||
})
|
||||
await documentContentPage.checkCurrentRights(DocumentRights.VIEWING)
|
||||
|
||||
@@ -1065,7 +1065,7 @@ test.describe('QMS. Documents tests', () => {
|
||||
id: 'HR-1',
|
||||
type: 'HR',
|
||||
category: 'N/A',
|
||||
version: 'v0.0.2',
|
||||
version: 'v0.0',
|
||||
status: DocumentStatus.IN_REVIEW,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
|
||||
@@ -48,7 +48,7 @@ test.describe('QMS. Templates tests', () => {
|
||||
await documentContentPage.checkDocument({
|
||||
type: 'N/A',
|
||||
category: newTemplate.category ?? '',
|
||||
version: 'v1.0.0',
|
||||
version: 'v1.0',
|
||||
status: DocumentStatus.DRAFT,
|
||||
owner: 'Appleseed John',
|
||||
author: 'Appleseed John'
|
||||
|
||||
@@ -690,7 +690,7 @@ export class DocumentContentPage extends DocumentCommonPage {
|
||||
async checkIfHistoryVersionExists (description: string): Promise<void> {
|
||||
await this.page.waitForTimeout(200)
|
||||
await expect(this.page.getByText(description)).toBeVisible()
|
||||
await expect(this.page.getByText('v1.0.0', { exact: true })).toBeVisible()
|
||||
await expect(this.page.getByText('v1.0', { exact: true })).toBeVisible()
|
||||
}
|
||||
|
||||
async checkDocumentStatus (status: DocumentStatus): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user