File tree Expand file tree Collapse file tree
tests-playwright/components/complex_lookup Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // @ts -check
2+ // Check Loading a class number from a NAR then saving from the shelflisting tool
3+ import { test , expect } from '@playwright/test' ;
4+ import { preferences } from '../../configs/subjectBuilderConfig.json'
5+
6+ test ( 'Add GenreForm term' , async ( { page } ) => {
7+ await page . goto ( 'http://localhost:5555/marva/' ) ;
8+
9+ // Update the preferences for this test
10+ let prefs = JSON . stringify ( preferences )
11+ await page . evaluate ( prefs => localStorage . setItem ( "marva-preferences" , prefs ) , prefs )
12+ await page . reload ( ) ;
13+
14+ await page . getByText ( 'Click Here' ) . click ( ) ;
15+ await page . getByRole ( 'button' , { name : 'Monograph' , exact : true } ) . nth ( 1 ) . click ( ) ;
16+
17+ await page . locator ( 'form' ) . filter ( { hasText : 'Search LCGFT' } ) . getByRole ( 'textbox' ) . click ( ) ;
18+ await page . locator ( 'form' ) . filter ( { hasText : 'Search LCGFTbolt' } ) . getByRole ( 'textbox' ) . fill ( 'n' ) ;
19+ await page . getByRole ( 'dialog' ) . getByRole ( 'textbox' ) . nth ( 1 ) . fill ( 'novels' ) ;
20+ await page . getByRole ( 'listbox' ) . selectOption ( 'http://id.loc.gov/authorities/genreForms/gf2015026020' ) ;
21+ await expect ( page . getByRole ( 'heading' ) ) . toContainText ( 'bookmark Novelsgf2015026020' ) ;
22+ await page . getByRole ( 'button' , { name : 'Add [Shift+Enter]' } ) . click ( ) ;
23+ await page . getByText ( 'bf:Work' ) . click ( ) ;
24+ await expect ( page . locator ( '#app' ) ) . toContainText ( '<rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Novels</rdfs:label><bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">155 $aNovels</bflc:marcKey><bf:source><bf:Sourcerdf:about="http://id.loc.gov/authorities/genreForms/collection_LCGFT_General"><rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Library of Congress genre/form terms for library and archival materials</rdfs:label></bf:Source></bf:source>' ) ;
25+ } ) ;
Original file line number Diff line number Diff line change 1+ // @ts -check
2+ // Check Loading a class number from a NAR then saving from the shelflisting tool
3+ import { test , expect } from '@playwright/test' ;
4+ import { preferences } from '../../configs/subjectBuilderConfig.json'
5+
6+ test ( 'Add GeoCoverage' , async ( { page } ) => {
7+ await page . goto ( 'http://localhost:5555/marva/' ) ;
8+
9+ // Update the preferences for this test
10+ let prefs = JSON . stringify ( preferences )
11+ await page . evaluate ( prefs => localStorage . setItem ( "marva-preferences" , prefs ) , prefs )
12+ await page . reload ( ) ;
13+
14+ await page . getByText ( 'Click Here' ) . click ( ) ;
15+ await page . getByRole ( 'button' , { name : 'Monograph' , exact : true } ) . nth ( 1 ) . click ( ) ;
16+
17+ await page . locator ( '[id="edit_lc:RT:bf2:Monograph:Work_id_loc_gov_ontologies_bibframe_geographicCoverage__geographic_coverage"]' ) . getByRole ( 'textbox' ) . click ( ) ;
18+ await page . locator ( '[id="edit_lc:RT:bf2:Monograph:Work_id_loc_gov_ontologies_bibframe_geographicCoverage__geographic_coverage"]' ) . getByRole ( 'textbox' ) . fill ( 's' ) ;
19+ await page . getByRole ( 'dialog' ) . getByRole ( 'textbox' ) . nth ( 1 ) . fill ( 'spain' ) ;
20+ await page . getByRole ( 'listbox' ) . selectOption ( 'http://id.loc.gov/authorities/names/n79006971' ) ;
21+ await expect ( page . getByRole ( 'heading' ) ) . toContainText ( 'map Spainn79006971' ) ;
22+ await page . getByRole ( 'button' , { name : 'Add [Shift+Enter]' } ) . click ( ) ;
23+ await page . getByText ( 'bf:Work' ) . click ( ) ;
24+ await expect ( page . locator ( '#app' ) ) . toContainText ( '<rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Spain</rdfs:label><madsrdf:codexmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"rdf:datatype="http://id.loc.gov/datatypes/codes/gac">e-sp---</madsrdf:code><bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">151 $aSpain</bflc:marcKey>' ) ;
25+ } ) ;
You can’t perform that action at this time.
0 commit comments