I am using protractor/js for automating end to end tests for our website. We have a test data set that we have saved in different JS files and we use this data while executing test cases. We are using POM. So, generally the calls to data files are originated from the page files only.
So, here is the issue: We have started creating a suite for component tests which uses page files from the same suite as mentioned above. But the issue is that the component tests require different data for execution.
How can we achieve that when the regression tests are executing, then page files should use different set of data but when component tests are executing, they should use different sets of data. However, calls to the data files will be made from the page files which are common.
Let me know in case you need any more details