1
00:00:00,120 --> 00:00:06,870
All right, so now that we have written all of our fixtures in line code and be able to see that it

2
00:00:06,870 --> 00:00:12,660
is working fine without any problem, and I was telling you before we can write this particular in line

3
00:00:12,660 --> 00:00:21,690
code or the inline fixture into another de'ath file, which is going to make your code more simpler,

4
00:00:21,840 --> 00:00:27,210
look more simpler, because you can reuse this particular fixture across many different testifiers,

5
00:00:27,210 --> 00:00:32,310
because you can see that currently this particular fixture is just fixed for this particular test.

6
00:00:32,460 --> 00:00:37,350
But let's say if you want to run your test or maybe you want to use this regular fixture for multiple

7
00:00:37,350 --> 00:00:41,940
different test, which is what he will basically be doing for most of the scenarios, you need to probably

8
00:00:41,940 --> 00:00:47,220
use this particular fixture in a separate file so that you can use them for different testify.

9
00:00:47,330 --> 00:00:53,370
So what I'm going to do is I'm just going to do a cut off this particular code and I'm just going to

10
00:00:53,370 --> 00:00:55,480
go all the way over here.

11
00:00:55,510 --> 00:01:00,270
I want to create a file and might call this as maybe a fixture like we did in our earlier video.

12
00:01:00,750 --> 00:01:05,100
And I'm just going to put it over here and paste this whole code like this.

13
00:01:05,280 --> 00:01:11,970
But the only change that we have to do is on the receiver decided to decide where it tells that it cannot

14
00:01:11,970 --> 00:01:12,910
be resolved.

15
00:01:13,170 --> 00:01:17,400
Do you want to install any dependencies for test or something like that?

16
00:01:17,760 --> 00:01:23,250
Then probably you need to do the import, like how we used to in our earlier videos when we're trying

17
00:01:23,250 --> 00:01:26,570
to do the fixture in the folio example.

18
00:01:26,940 --> 00:01:34,650
So I'm just going to do this fixture import from our colon dot slash and you can see that the fixture

19
00:01:34,650 --> 00:01:35,160
comes in.

20
00:01:35,430 --> 00:01:42,000
So I can just like this picture fixture and then we need to get the constant that it if not the code

21
00:01:42,000 --> 00:01:43,560
isn't going to work as expected.

22
00:01:44,490 --> 00:01:45,450
So I'm going to do that.

23
00:01:45,720 --> 00:01:50,580
And I guess we have really sent this to it.

24
00:01:50,580 --> 00:01:57,690
But I think for some reason it's not working now because we have not really did that, that expert correctly.

25
00:01:57,900 --> 00:02:00,750
So I'm just going to because this is not in line code.

26
00:02:00,750 --> 00:02:04,040
So I think that's why we have to make this particular change as well.

27
00:02:04,050 --> 00:02:08,820
So I just need to make a simple change in here so that the court can be even more better.

28
00:02:09,630 --> 00:02:15,210
So I just made this play recognized as Foleo and then pretty much like how we used to do while we tried

29
00:02:15,210 --> 00:02:18,180
doing this particular fixture code like this.

30
00:02:18,190 --> 00:02:21,600
That's exactly what I'm going to do to keep things more simpler.

31
00:02:22,410 --> 00:02:23,500
So I'm just going to do this.

32
00:02:23,500 --> 00:02:28,970
So it adds Foleo dot it like that.

33
00:02:28,980 --> 00:02:32,490
And now if you go to the inland code, you can see that the code is actually looking fine without any

34
00:02:32,490 --> 00:02:34,610
problem and it's going to work as expected.

35
00:02:34,680 --> 00:02:39,270
So this is the only change that we need to make on the on the external file code change.

36
00:02:39,390 --> 00:02:42,710
And I guess there's is going to be a problem if I just scroll there.

37
00:02:42,960 --> 00:02:47,400
We have already used this Bechler variable, so maybe I'm just going to make this like folios or something

38
00:02:47,400 --> 00:02:53,370
like that so that the whole code will be happy and now it looks looking pretty good without any problem.

39
00:02:53,730 --> 00:02:59,650
So now in order to execute this code once again, all we have to do is we just need to go to the test

40
00:02:59,730 --> 00:03:08,670
runner and then we do NBCs Foleo of the inline fixture spec like that.

41
00:03:09,030 --> 00:03:15,390
And if we try to execute this particular code here.

42
00:03:17,630 --> 00:03:22,580
Oops, I think I have to say it and again, see that it is working fine, but any problems?

43
00:03:22,580 --> 00:03:26,540
Just just that I have to say of the particular value that I couldn't even to save it.

44
00:03:26,810 --> 00:03:32,240
And now you can see that the court is working fine and the browsers are spawning pretty much like how

45
00:03:32,240 --> 00:03:33,190
it was working before.

46
00:03:33,200 --> 00:03:40,010
So this is how we can actually use the external files of the fixer and we can reuse the speaker fixture

47
00:03:40,010 --> 00:03:42,860
across multiple tests and we can see how it actually works.

48
00:03:43,100 --> 00:03:43,630
So that's it, guy.

49
00:03:43,640 --> 00:03:49,710
This is how we can actually work with the external file fixtures in the playwright or using Foleo.

50
00:03:49,900 --> 00:03:56,120
Now, next video, we'll discuss how we can make use of the perimeters in the fixtures and how we can

51
00:03:56,240 --> 00:04:03,170
write our own custom parameters to be passed from the command line using the folio of our particular

52
00:04:03,170 --> 00:04:03,530
test.

53
00:04:03,530 --> 00:04:09,170
And then we can even use it for different configuration to be used while running the test and make our

54
00:04:09,170 --> 00:04:12,320
test to be more available across the board.

55
00:04:12,560 --> 00:04:13,640
Meeting our next video.
