Skip to content

some code syntax & style improvements #53

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

Merged
merged 26 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a330e2b
renaming page object to match naming conventions
koebel Aug 14, 2024
abb93a4
fix typo in feature file
koebel Aug 14, 2024
760a8c6
rename apiHelper file to comply with naming conventions
koebel Aug 14, 2024
aa3a6ad
update wording of user story to match the user story given by project…
koebel Aug 14, 2024
41ff2f9
adding error if trashbin wasn't deleted properly
koebel Aug 14, 2024
d1571bc
adding error if file hasn't been properly deleted
koebel Aug 14, 2024
7ff32d4
removing unnecessary return values
koebel Aug 14, 2024
4ed9e13
adding try & catch to API request
koebel Aug 14, 2024
82ded73
remove purple border around dicom image
koebel Aug 15, 2024
9eb5a2e
change flip icon
koebel Aug 15, 2024
69ebf41
improve readability of code
koebel Aug 15, 2024
749f281
Merge pull request #57 from owncloud/change-icons-for-flip-image
koebel Aug 15, 2024
508368e
figure out how to refresh viewport after changing parallel scale factor
koebel Aug 15, 2024
c5d583a
add missing mock function
Salipa-Gurung Aug 15, 2024
6dfbe0c
Merge pull request #59 from owncloud/unit-test-missing-mock
koebel Aug 15, 2024
3aacc19
add setZoom back
koebel Aug 15, 2024
70722a9
correcting the parallel scale factor in mocks to match with changes i…
koebel Aug 15, 2024
12df68f
Merge pull request #56 from owncloud/initial-scale-factor-of-preview
koebel Aug 16, 2024
e528bd1
Merge pull request #54 from owncloud/error-checking-for-helper-functions
koebel Aug 20, 2024
53cc50e
Apply suggestions from code review
koebel Aug 20, 2024
133efbe
renaming page object to match naming conventions
koebel Aug 14, 2024
5c8f1f3
fix typo in feature file
koebel Aug 14, 2024
cc2185c
rename apiHelper file to comply with naming conventions
koebel Aug 14, 2024
b078fec
update wording of user story to match the user story given by project…
koebel Aug 14, 2024
af5f19a
Apply suggestions from code review
koebel Aug 20, 2024
fe19b65
Merge branch 'code-syntax-&-style-improvements' of https://github.com…
koebel Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/e2e/api/apiUpload.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs'
import { config } from '../config.js'
import { sendRequest } from './APIHelper'
import { sendRequest } from './apiHelper'

export const apiUpload = async function ({ filename }): Promise<void> {
const response = await sendRequest({
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/features/dicomViewer.feature
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Feature: Preview dicom image
As a user
I want to preview a DICOM file
so that I can preview DICOM image and its metadata
As a user who has a DICOM file
I want to preview the file
so that I can reassure that it contains the right image and check its metadata


Scenario: user previews dicom image
Given the dicom file "MRBRAIN.dcm" has been uploaded
And the user "Admin" has logged in
And the user "admin" has logged in
When the user previews the dicom file "MRBRAIN.dcm"
Then the user should see the dicom file "MRBRAIN.dcm"
And the user should see patient name "MR/BRAIN/GRASE/1024" in the VIP metadata section
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { chromium } from '@playwright/test'
import { xml2js } from 'xml-js'
import { _ } from 'lodash'
import { config } from './config.js'
import { sendRequest } from './api/APIHelper'
import { sendRequest } from './api/apiHelper'

setDefaultTimeout(config.timeout * 1000)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import util from 'util'
import { getUser } from '../userStore'

export class DicomViewer {
export class dicomViewerPage {
elements: Readonly<Record<string, string>> = {
userNameSelector: '#oc-login-username',
passwordSelector: '#oc-login-password',
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/steps/dicomViewerContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { expect } from '@playwright/test'
import util from 'util'
import { config } from '../config.js'

import { DicomViewer } from '../pageObjects/DicomViewer'
import { dicomViewerPage } from '../pageObjects/dicomViewerPage'

const dicomViewer = new DicomViewer()
const dicomViewer = new dicomViewerPage()
import { apiUpload } from '../api/apiUpload'

Given('the user {string} has logged in', async function (user: string): Promise<void> {
Expand Down