@@ -35,9 +35,9 @@ test('test that organization name can be updated', async ({ page }) => {
3535 await page . getByLabel ( 'Organization Name' ) . fill ( 'NEW ORG NAME' ) ;
3636 await page . getByLabel ( 'Organization Name' ) . press ( 'Enter' ) ;
3737 await page . getByLabel ( 'Organization Name' ) . press ( 'Meta+r' ) ;
38- await expect (
39- page . locator ( '[data-testid="organization_switcher"]:visible' )
40- ) . toContainText ( 'NEW ORG NAME' ) ;
38+ await expect ( page . locator ( '[data-testid="organization_switcher"]:visible' ) ) . toContainText (
39+ 'NEW ORG NAME'
40+ ) ;
4141} ) ;
4242
4343test ( 'test that organization billable rate can be updated with all existing time entries' , async ( {
@@ -46,19 +46,15 @@ test('test that organization billable rate can be updated with all existing time
4646 await goToOrganizationSettings ( page ) ;
4747 const newBillableRate = Math . round ( Math . random ( ) * 10000 ) ;
4848 await page . getByLabel ( 'Organization Billable Rate' ) . click ( ) ;
49- await page
50- . getByLabel ( 'Organization Billable Rate' )
51- . fill ( newBillableRate . toString ( ) ) ;
49+ await page . getByLabel ( 'Organization Billable Rate' ) . fill ( newBillableRate . toString ( ) ) ;
5250 await page
5351 . locator ( 'form' )
5452 . filter ( { hasText : 'Organization Billable' } )
5553 . getByRole ( 'button' , { name : 'Save' } )
5654 . click ( ) ;
5755
5856 await Promise . all ( [
59- page
60- . getByRole ( 'button' , { name : 'Yes, update existing time entries' } )
61- . click ( ) ,
57+ page . getByRole ( 'button' , { name : 'Yes, update existing time entries' } ) . click ( ) ,
6258 page . waitForRequest (
6359 async ( request ) =>
6460 request . url ( ) . includes ( '/organizations/' ) &&
@@ -70,15 +66,12 @@ test('test that organization billable rate can be updated with all existing time
7066 response . url ( ) . includes ( '/organizations/' ) &&
7167 response . request ( ) . method ( ) === 'PUT' &&
7268 response . status ( ) === 200 &&
73- ( await response . json ( ) ) . data . billable_rate ===
74- newBillableRate * 100
69+ ( await response . json ( ) ) . data . billable_rate === newBillableRate * 100
7570 ) ,
7671 ] ) ;
7772} ) ;
7873
79- test ( 'test that organization format settings can be updated' , async ( {
80- page,
81- } ) => {
74+ test ( 'test that organization format settings can be updated' , async ( { page } ) => {
8275 await goToOrganizationSettings ( page ) ;
8376
8477 // Test number format
@@ -113,8 +106,7 @@ test('test that organization format settings can be updated', async ({
113106 response . url ( ) . includes ( '/organizations/' ) &&
114107 response . request ( ) . method ( ) === 'PUT' &&
115108 response . status ( ) === 200 &&
116- ( await response . json ( ) ) . data . currency_format ===
117- 'iso-code-after-with-space'
109+ ( await response . json ( ) ) . data . currency_format === 'iso-code-after-with-space'
118110 ) ,
119111 ] ) ;
120112
@@ -132,8 +124,7 @@ test('test that organization format settings can be updated', async ({
132124 response . url ( ) . includes ( '/organizations/' ) &&
133125 response . request ( ) . method ( ) === 'PUT' &&
134126 response . status ( ) === 200 &&
135- ( await response . json ( ) ) . data . date_format ===
136- 'slash-separated-dd-mm-yyyy'
127+ ( await response . json ( ) ) . data . date_format === 'slash-separated-dd-mm-yyyy'
137128 ) ,
138129 ] ) ;
139130
@@ -169,19 +160,14 @@ test('test that organization format settings can be updated', async ({
169160 response . url ( ) . includes ( '/organizations/' ) &&
170161 response . request ( ) . method ( ) === 'PUT' &&
171162 response . status ( ) === 200 &&
172- ( await response . json ( ) ) . data . interval_format ===
173- 'hours-minutes-colon-separated'
163+ ( await response . json ( ) ) . data . interval_format === 'hours-minutes-colon-separated'
174164 ) ,
175165 ] ) ;
176166} ) ;
177167
178- test ( 'test that format settings are reflected in the dashboard' , async ( {
179- page,
180- } ) => {
168+ test ( 'test that format settings are reflected in the dashboard' , async ( { page } ) => {
181169 // check that 0h 00min is displayed
182- await expect (
183- page . getByText ( '0h 00min' , { exact : true } ) . nth ( 0 )
184- ) . toBeVisible ( ) ;
170+ await expect ( page . getByText ( '0h 00min' , { exact : true } ) . nth ( 0 ) ) . toBeVisible ( ) ;
185171
186172 // First set the format settings
187173 await goToOrganizationSettings ( page ) ;
@@ -213,10 +199,8 @@ test('test that format settings are reflected in the dashboard', async ({
213199 response . url ( ) . includes ( '/organizations/' ) &&
214200 response . request ( ) . method ( ) === 'PUT' &&
215201 response . status ( ) === 200 &&
216- ( await response . json ( ) ) . data . interval_format ===
217- 'hours-minutes-colon-separated' &&
218- ( await response . json ( ) ) . data . currency_format ===
219- 'symbol-after' &&
202+ ( await response . json ( ) ) . data . interval_format === 'hours-minutes-colon-separated' &&
203+ ( await response . json ( ) ) . data . currency_format === 'symbol-after' &&
220204 ( await response . json ( ) ) . data . number_format === 'comma-point'
221205 ) ,
222206 ] ) ;
@@ -232,16 +216,12 @@ test('test that format settings are reflected in the dashboard', async ({
232216 // check that 00:00 is displayed
233217 await expect ( page . getByText ( '0:00' , { exact : true } ) . nth ( 0 ) ) . toBeVisible ( ) ;
234218 // check that 0h 00min is not displayed
235- await expect (
236- page . getByText ( '0h 00min' , { exact : true } ) . nth ( 0 )
237- ) . not . toBeVisible ( ) ;
219+ await expect ( page . getByText ( '0h 00min' , { exact : true } ) . nth ( 0 ) ) . not . toBeVisible ( ) ;
238220
239221 // check that the current date is displayed in the dd/mm/yyyy format on the time page
240222 await page . goto ( PLAYWRIGHT_BASE_URL + '/time' ) ;
241223 await expect (
242- page
243- . getByText ( new Date ( ) . toLocaleDateString ( 'en-GB' ) , { exact : true } )
244- . nth ( 0 )
224+ page . getByText ( new Date ( ) . toLocaleDateString ( 'en-GB' ) , { exact : true } ) . nth ( 0 )
245225 ) . toBeVisible ( ) ;
246226} ) ;
247227
0 commit comments