@@ -31,7 +31,7 @@ describe("ProvisionerTagsPopover", () => {
31
31
await userEvent . click ( btn ) ;
32
32
33
33
// Check for existing tags
34
- const el = await screen . findByText ( / s c o p e : o r g a n i z a t i o n / i) ;
34
+ const el = await screen . findByText ( / s c o p e / i) ;
35
35
expect ( el ) . toBeInTheDocument ( ) ;
36
36
37
37
// Add key and value
@@ -62,8 +62,10 @@ describe("ProvisionerTagsPopover", () => {
62
62
) ;
63
63
64
64
// Check for new tag
65
- const el4 = await screen . findByText ( / f o o : b a r / i) ;
66
- expect ( el4 ) . toBeInTheDocument ( ) ;
65
+ const fooTag = await screen . findByText ( / f o o / i) ;
66
+ expect ( fooTag ) . toBeInTheDocument ( ) ;
67
+ const barValue = await screen . findByText ( / b a r / i) ;
68
+ expect ( barValue ) . toBeInTheDocument ( ) ;
67
69
} ) ;
68
70
it ( "can remove a tag" , async ( ) => {
69
71
const onSubmit = jest . fn ( ) . mockImplementation ( ( { key, value } ) => {
@@ -87,7 +89,7 @@ describe("ProvisionerTagsPopover", () => {
87
89
await userEvent . click ( btn ) ;
88
90
89
91
// Check for existing tags
90
- const el = await screen . findByText ( / w o w z e r s : w h a t a t a g / i) ;
92
+ const el = await screen . findByText ( / w o w z e r s / i) ;
91
93
expect ( el ) . toBeInTheDocument ( ) ;
92
94
93
95
// Find Delete button
@@ -110,7 +112,7 @@ describe("ProvisionerTagsPopover", () => {
110
112
) ;
111
113
112
114
// Expect deleted tag to be gone
113
- const el2 = screen . queryByText ( / w o w z e r s : w h a t a t a g / i) ;
115
+ const el2 = screen . queryByText ( / w o w z e r s / i) ;
114
116
expect ( el2 ) . not . toBeInTheDocument ( ) ;
115
117
} ) ;
116
118
} ) ;
0 commit comments